Buttons for Dummies!
Author |
Message |
iker
|
Posted: Thu Dec 08, 2005 10:49 pm Post subject: (No subject) |
|
|
is it just me, or is this topic considered old?
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
theguru
|
Posted: Sun Jan 15, 2006 5:32 pm Post subject: (No subject) |
|
|
ok, this tutorial was extremely helpful but it left me with a lot of questions.
I've tried the different methods of processing the 'buttons' (sorry for my horrible terminology) using a loop, if statement and a process but none of them seem to help me with my problem is that I want to exit the loop after the button has been pressed (so I can continue with my program). For example I want to use a button as 'next' so when clicked it will continue on with the program. I know I can use getch or get or something like that but just to make it fancy I'd like to add some buttons.
Their squary and so cool .
// I hope my questions actually makes sense to you guys
|
|
|
|
|
|
Cervantes
|
Posted: Sun Jan 15, 2006 5:35 pm Post subject: (No subject) |
|
|
You could use a Quit button, that calls GUI.Quit, then have the code for the rest of the program waiting after your exit when GUI.ProcessEvent loop
Alternatively, you could have your button call the code that runs the next part of your program.
Alternatively alternatively, you could make your own buttons, and not be so restricted in how you code.
|
|
|
|
|
|
Clayton
|
Posted: Wed Jan 25, 2006 2:39 pm Post subject: (No subject) |
|
|
i would like to add a bit to this if you want your buttons to be disabled you would do this
code: |
proc disableButton
GUI.Disable (buttonName)
end disableButton
|
this stops the button from working, also if you are drawing boxes and such on the screen and you dont want your buttons to disappear then use the GUI.Refresh command as such
code: |
proc refreshButton
GUI.Refresh(buttonName)
end refreshButton
|
this basically redraws your buttons on top of the screen again in the middle of your program without actually creating it
hope this helps
|
|
|
|
|
|
flippy
|
Posted: Wed Apr 26, 2006 12:52 pm Post subject: Didn't notice a reply to this, soooo... |
|
|
shorthair wrote: i think there is a thread about how to reset , the gui event , so that you can have multiple buttons in differnt parts of the program , but in hte turing 5 documentation there is a F9 about a command that resets it automatically , its a good update , if i had turing handy id give it to you, but im sure someonne here knows what it is
The only command I could find in the tutorial to reset the GUI event was GUI.ResetQuit... but I think that's the only one you need...
|
|
|
|
|
|
flippy
|
Posted: Wed Apr 26, 2006 1:12 pm Post subject: Oh yeah... one more thing |
|
|
BTW...
I was wondering if there was a way to exit a double layer fo loops (if that doesn'y make sense: call a button, press button, button calls a procedure that containes more buttons, press a second button, second procedure does it's stuff, exit to main program and keep going)
I would show you the code, but it is kinda long...
|
|
|
|
|
|
MysticVegeta
|
Posted: Wed Apr 26, 2006 1:40 pm Post subject: (No subject) |
|
|
well to exit nested loops you need a boolean
|
|
|
|
|
|
Foundation
|
Posted: Sat Sep 16, 2006 11:37 am Post subject: (No subject) |
|
|
Good tutorial, btw, I was just thinking, is there any way to change the appearances of the Turing buttons, they look too grey. Anyone post a tutorial on that?
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Cervantes
|
Posted: Sat Sep 16, 2006 2:01 pm Post subject: (No subject) |
|
|
The widgets are open-source. The code for them is written in Turing. You can find it in C:\Program Files\Turing\support\lib\guiclass, assuming your Turing directory is at C:\Program Files\Turing.
Alternatively, you could check out S-engine.
|
|
|
|
|
|
War_Caymore
|
Posted: Fri Sep 22, 2006 7:50 am Post subject: (No subject) |
|
|
Before reading this, i was completely unaware on how to use Turing's GRI system. i'd like to thank the maker of this thread for teaching me how to use GUI, mostly becasue he pretty much made this for me (yes, i am a dummy...). I look foward for moer tutorials taht are for people jsut like me
|
|
|
|
|
|
kompsai
|
Posted: Tue Nov 07, 2006 3:41 pm Post subject: (No subject) |
|
|
props, great explanation...really clarifies how to make some basic buttons.
though the step-by-step thing was a good idea, i think it should probably be changed because it is a bit confusing...believe it or not, it's most understandable starting from the bottom and working your way up to the top.
|
|
|
|
|
|
Macbuchu
|
Posted: Thu Dec 21, 2006 7:17 pm Post subject: Need to continue on program after procedure |
|
|
is it possible to put a process instead of a procedure at the end of the button somehow??? cuz i need to continue on my program after my procedure.
|
|
|
|
|
|
Macbuchu
|
Posted: Thu Dec 21, 2006 7:19 pm Post subject: Need to continue on program after procedure |
|
|
is it possible to put a process instead of a procedure at the end of the button somehow??? cuz i need to continue on my program after my procedure. look at code ..... ===>
Description: |
|
Download |
Filename: |
Zelda Quiz.zip |
Filesize: |
59.39 KB |
Downloaded: |
421 Time(s) |
|
|
|
|
|
|
CodeMonkey2000
|
Posted: Thu Dec 21, 2006 8:26 pm Post subject: (No subject) |
|
|
dude do u go to cameron?and for something like this dont use process except for music.
|
|
|
|
|
|
Macbuchu
|
Posted: Mon Jan 01, 2007 8:21 pm Post subject: (No subject) |
|
|
yah i do and i finally got past my prblem
|
|
|
|
|
|
|
|