Game Development Community

Help With Simple Control

by Steve Santos · in Torque Game Engine Advanced · 05/24/2009 (11:16 pm) · 0 replies

I'm tryin to implement a icon control. Bascially I'm tryin to make an icon that sits next to the highlighted menu option of GuiGameListMenuCtrl. I was tryin to figure out how I can access the index or w/e the engine uses to know which menu item is currently selected or highlighted Not sure how to figure it out I looked at the engine code but Im totally new to this engine and im not sure if the engine itself is exposed to torque script liek I think it is or I jsut dont know the function to call to see which index is highlighted. Would I have to implement something into the engine myself to allow me to see what is currently highlighted an do an a case switch according to which is highlighted?

this kinda of bascially what I want it to do

%index = 1;

<--- this is what I think is how the engine gets which index is highlighted but I could be wrong-->
hitRow = getRow(event.mousePoint);

switch (index)
{
case 1:
MenuIcon.position = "100 100"
break;

case 2:
MenuIcon.position = "200 200"
break;

case 3:
MenuIcon.position = "300 300"
break;
}

any help would be apprciated plz
Any Ill probally get on alot of ur nervous eventually Ill be askin alot of questions lol Im use to c# coding everything on my own so using this engine + torque script is somewhat out of place for me