Author Topic: GUI Help  (Read 795 times)

I made a GUI with a checkbox and it does not work and I don't know why. Could a good GUI maker please take a look at it?

Please have the foresight to explain your problem more than "it does not work"

How a checkbox control works:
Assign a variable to it.
I think it goes like this:
   variable = "$something";
$somthing will be true while the box is checked.
Add that variable to your code to do different things if $something is true or false.

Ok here I go
1. the GUI will not open and idk why
2. Here is the code
Code: [Select]
exec("./HiAndByegui.gui");
moveMap.bind(keyboard, "command h", pushHiAndByegui);

if($HiAndByeGUI::CheckboxToggle == 1)
I put what I want it to toggle here.

oh god that code needs work
the exec part is good
then you need a function to open the gui, and a function to close it.
Please do this instead:
Quote
$remapdivision[$remapcount] = "division";
$remapname[$remapcount] = "Toggle";
$remapcmd[$remapcount] = "openmygui"
$remapcount++;

function openmygui(%x)
{
   if(%x)
   {
      if(myguiname.isawake())
         canvas.popdialog(myguiname);
      else
         canvas.pushdialog(myguiname);
   }
}

function whatevertheguidoes()
{
   if($boxischecked)
   {
      //do something
   }
   else
   {
      //do something else
   }
}

oh god that code needs work
the exec part is good
then you need a function to open the gui, and a function to close it.
Please do this instead:
Thank you. I'm new to GUIs.
EDIT: There is no keybind setting in the options menu : /
« Last Edit: July 08, 2011, 08:32:02 AM by jes00 »