Author Topic: GUI Help  (Read 1114 times)

Ok I currently made some equations using different variables that spit out certain numbers much like a calculator. I was wondering how i would make those into a gui script where you could just type in the different variables and it would spit out the number without having to go through a calculator. any help would be outstanding. thank you.

If your trying to make a calculator, go away, I'm about to realease a non scientific version then a scientific one later. If your not, then if I'm reading you correctly, your trying to enter an input into a text box, then a second input to come out with an output. In order to help you, I need you to be a bit more specific.

yes i would have up to four inputs to give me an output. It is not going to be a calculator, just one calculator that does a few calculations. I have the Functions written up (simplifying them) with all 4 inputs. now how would I go about putting them into a GUI for BL

use torque gui maker only its $99
lol..google c++ gui maker or sumtin...

use torque gui maker only its $99
lol..google c++ gui maker or sumtin...
/facepalm

Ok, this is how you want to do it.
Position the 4 text boxes in the appropriate positions your want. Name the 1st Input1, 2nd Input2, etc. Now make a button (This is what they press to check if all the 4 inputs are what you want them to be)
You'd use something like this to check the values of the text boxes.
function YourModNameCheckInputs()
{
   %inputone = Input1.getValue();
   %inputtwo = Input2.getValue();
   %inputthree = Input3.getValue();
   %inputfour = Input4.getValue();
   if(%input1 $= "Whatyouwantittoequal" && %input2 $= "etc" && %input3 $= "etc" && %input4$= "etc")
   {
      YourModNameDoOutcomeFunction();
   }
   else
   {
      //message the client saying "That is incorrect" or something
   }
}
Now you just set the buttons command to yourmodnameCheckInput(); and viola. Hopefully you get the general idea. Also if you want to wipe or set the textboxes into something use .setText('test") obviously.
Note that you could reduce the function size by just making if(%input1 $= "etc" into if(Input1.getValue() $= "etc" but I find it more convienient to make arguments for easier editing.
« Last Edit: October 24, 2008, 04:51:40 AM by Destiny/Zack0Wack0 »

/facepalm

Ok, this is how you want to do it.
Position the 4 text boxes in the appropriate positions your want. Name the 1st Input1, 2nd Input2, etc. Now make a button (This is what they press to check if all the 4 inputs are what you want them to be)
You'd use something like this to check the values of the text boxes.
function YourModNameCheckInputs()
{
   %inputone = Input1.getValue();
   %inputtwo = Input2.getValue();
   %inputthree = Input3.getValue();
   %inputfour = Input4.getValue();
   if(%input1 $= "Whatyouwantittoequal" && %input2 $= "etc" && %input3 $= "etc" && %input4$= "etc")
   {
      YourModNameDoOutcomeFunction();
   }
   else
   {
      //message the client saying "That is incorrect" or something
   }
}
Now you just set the buttons command to yourmodnameCheckInput(); and viola. Hopefully you get the general idea. Also if you want to wipe or set the textboxes into something use .setText('test") obviously.
Note that you could reduce the function size by just making if(%input1 $= "etc" into if(Input1.getValue() $= "etc" but I find it more convienient to make arguments for easier editing.

Excellent! That is what I was looking for (not a GUI maker..) thank you very much destiny!