button in hud element

Grab your favourite IDE and tinker with the innards of game engines

button in hud element

Postby Yourself on Thu Oct 30, 2008 11:53 am

hi,

I'm working on a small project (school) and i made a system that creates a new hud element in an overlay.
screeny :
ImageImage
I added some buttons but whenever I click on them , nothing happens..

here's an extract form the code :
Code: Select all
void TicTacToeGame::OnCommand(const char* command)
{
DevMsg (2, "TicTacToeGame::OnCommand() - %s\n", command);

if(Q_strcmp(command,"Sound1") == 0)
{
SetTitle("Clicked",true);
Frame::Repaint();
}
}

and the button is declaration (in HudLayout.res) by
Code: Select all
   "Button1"
   {
   "controlName" "Button"
   "labelText" "Sound 1"
   "fieldName" "Button1"
   "xpos" "20"
   "ypos" "30"
   "Command" "Sound1"
   "enabled" "1"
   }


here's a rar with the specific code of of my prob (if somebody needs it) :
http://www.box.net/shared/n5c6fekhji

thx
Yourself
Dumpling
Dumpling
 
Joined: Thu Oct 30, 2008 11:42 am

Return to Programming

Who is online

Users browsing this forum: No registered users