Posted: Tue Jun 08, 2010 8:38 pm Post subject: How do you make a menu bar in a Turing game?
What is it you are trying to achieve?
I am trying to add a menu bar to a game, just like the menu bar in a website. How would I code it so that, for example, if I am on the "Menu" page how would I get it to go the "Instructions" page back and forth?
Sponsor Sponsor
BigBear
Posted: Tue Jun 08, 2010 8:41 pm Post subject: RE:How do you make a menu bar in a Turing game?
make a procedure of the Instructions and any other pages you want
and create a button or buttons of the pages and when they click that button run that procedure
Cezna
Posted: Wed Jun 09, 2010 7:11 pm Post subject: RE:How do you make a menu bar in a Turing game?
Look up GUI.CreateMenu in the Turing help section.
Or just click on it in the syntax tag below
This allows you to use one of the new (well newest, since the Turing editor is no longer made by Holtsoft) widget modules in Turing.
They are predefined procedures that are easy to use and can be quite versatile.
USEC_OFFICER
Posted: Wed Jun 09, 2010 7:23 pm Post subject: RE:How do you make a menu bar in a Turing game?
I hear that the Turing GUI is a pain in the ass.
Just so you know.
Cezna
Posted: Wed Jun 09, 2010 7:29 pm Post subject: RE:How do you make a menu bar in a Turing game?
I have never used it, I usually just use my own buttons and interfaces, but then again, I haven't done much that would require this sort of stuff since learning about the GUI module, so I don't have any first hand experience with it.
But for anyone short of an ingenious programmer or someone who is very dedicated and patient, it would take too much time and/or too much work to make a half-decent menu bar.
Anyway, even if it does turn out to be a pain, at least you'll have the option, if you can't come up with anything else.
USEC_OFFICER
Posted: Wed Jun 09, 2010 7:32 pm Post subject: RE:How do you make a menu bar in a Turing game?
Half decent? I could make a decent bar in no time. (Pop down menus, buttons that react when you hit them.) All you need is a little bit of dedication, not a lot. Plus you can make it look better than the GUI buttons.
Insectoid
Posted: Wed Jun 09, 2010 7:36 pm Post subject: RE:How do you make a menu bar in a Turing game?
Turing's GUI buttons are ugly as a Texan in a speedo. All of my menus are just boxes and mousewhere().
Cezna
Posted: Wed Jun 09, 2010 8:01 pm Post subject: RE:How do you make a menu bar in a Turing game?
Alright, maybe it wouldn't be that hard, but for someone who is new to the language, it might be easiest to use the GUI (ugly as I agree they are).
However, in slight contradiction of my own point, I do believe that it is important that people eventually learn how to make these sorts of things themselves, but it is perhaps best not to start at the level of drop down menus if you have not even made a two state button yet.
And until I figure out how to make a text input box from scratch that will allow more precise positioning than is possible using locate, I will have some use for the GUI module.
Sponsor Sponsor
InfectedWar
Posted: Thu Jun 10, 2010 8:24 pm Post subject: RE:How do you make a menu bar in a Turing game?
Never use turing's GUI, object oriented programing is a big no no =d. You will never learn anything if you do OOP. Since the concepts are not universal to other languages, but with all of the other programming concepts from turing they carry on to different languages and they are actually useful. So word of advice try to stay away from OOP in turing =d (It's only for your own good)
TerranceN
Posted: Thu Jun 10, 2010 9:23 pm Post subject: Re: RE:How do you make a menu bar in a Turing game?
InfectedWar @ Thu Jun 10, 2010 8:24 pm wrote:
Never use turing's GUI, object oriented programing is a big no no =d. You will never learn anything if you do OOP. Since the concepts are not universal to other languages, but with all of the other programming concepts from turing they carry on to different languages and they are actually useful. So word of advice try to stay away from OOP in turing =d (It's only for your own good)
Umm... What? I think you do not understand what OOP is. You do not even access the GUI module with objects, it is controlled internally, just giving you integers for reference (IIRC). What I think you mean is not to learn Turing's GUI module because it is only in Turing. Unfortunately all programming languages' standard libraries are different in some way, and thats not even getting to GUI/Graphics libraries (which are usually WAY different). The point of using these libraries is to be able to do common tasks easier, and using them makes you more able adapt to new libraries. So I disagree that you never learn anything, although reinventing the wheel can be a good learning experience.
Cezna
Posted: Fri Jun 11, 2010 5:19 am Post subject: RE:How do you make a menu bar in a Turing game?
OOP is object oriented programming, which is what Turing is based on.
TerranceN
Posted: Fri Jun 11, 2010 2:30 pm Post subject: Re: RE:How do you make a menu bar in a Turing game?
Cezna @ Fri Jun 11, 2010 5:19 am wrote:
OOP is object oriented programming, which is what Turing is based on.
Based on? Please explain. To me OOP in Turing seems to be an afterthought, it is lacking features and everything that I know of in Turing's standard library does not use objects. Look at Java for instance, THAT is a language based on OOP. Everything is an object, it makes it easy and convenient to use objects, and its standard library (java.awt) has hundreds of classes that interact with each other. Maybe I'm just misunderstanding what you are saying.
Cezna
Posted: Fri Jun 11, 2010 2:57 pm Post subject: RE:How do you make a menu bar in a Turing game?
"Turing 4.1.1 for Windows - The last version of the object oriented turing programming langue that was devloped for teaching students the basics of programming and was used in the ontraio school borad for some time."
For a better explanation of object oriented programming then I could give you:
Posted: Fri Jun 11, 2010 3:28 pm Post subject: RE:How do you make a menu bar in a Turing game?
First of all, that is the same link (the wikipedia one) that I gave to InfectedWar. Second, saying a language is object oriented means that it supports some level of OOP, not that it is based on OOP (usually called "pure" OOP languages), or even does OOP well.
Finally, this made me lol: "ontraio school borad"
InfectedWar
Posted: Fri Jun 11, 2010 3:37 pm Post subject: RE:How do you make a menu bar in a Turing game?
TerranceN is right and when I mean stay away from certain things, I mean stay away from commands that do all the work for you like Math.Distance. The math will stay the same language to language, but this command will most likely not. (So for your own sake it's not good to use commands like that), but of course some commands there is just no option around them to do them without understanding how they mostly work.