How to create GUI's with blitz basic or any language,
Moderator: Coders of Rage
How to create GUI's with blitz basic or any language,
alright so i want to post this topic so i can learn how to make Graphical User Interface's, because my game,editor, and engine aren't very user friendly and for my dev team to use them to thier fullest they need all of the functions avalible to them, so if you know anything about how to create toolbars, tabs, and palletes, then plz post a simple tut or a command library for blitzbasic or c++, thx!!!
- Moosader
- Game Developer
- Posts: 1081
- Joined: Wed May 07, 2008 12:29 am
- Current Project: Find out at: http://www.youtube.com/coderrach
- Favorite Gaming Platforms: PC, NES, SNES, PS2, PS1, DS, PSP, X360, WII
- Programming Language of Choice: C++
- Location: Kansas City
- Contact:
Re: How to create GUI's with blitz basic or any language,
BlitzBasic OR C++? That's a bit of a leap.
GUIs can be pretty damn hard to make. There are things like wxWidgets, which will handle that sort of stuff for you if you're wanting to look into the cheap-and-easy way.
Otherwise, AFAIK anyways, you'll have different objects...
* Widget - most basic object type, generally stores x, y, w, h (or a Rect variable), maybe color.
Pretty much everything else will inherit from that base object:
* Window
* Button
* Textbox
Etc. Etc.
The thing I find difficult is linking them together. From what I gather, your buttons will have a pointer to a parent Window, and clicking the button will call a function in it's parent Window.
I haven't really figured out how to anything more complex than that.
I played with making my own for MusuGo, but I think in the next iteration (when I get around to it >_>) I'll use wxWidgets
GUIs can be pretty damn hard to make. There are things like wxWidgets, which will handle that sort of stuff for you if you're wanting to look into the cheap-and-easy way.
Otherwise, AFAIK anyways, you'll have different objects...
* Widget - most basic object type, generally stores x, y, w, h (or a Rect variable), maybe color.
Pretty much everything else will inherit from that base object:
* Window
* Button
* Textbox
Etc. Etc.
The thing I find difficult is linking them together. From what I gather, your buttons will have a pointer to a parent Window, and clicking the button will call a function in it's parent Window.
I haven't really figured out how to anything more complex than that.
I played with making my own for MusuGo, but I think in the next iteration (when I get around to it >_>) I'll use wxWidgets
Re: How to create GUI's with blitz basic or any language,
first off just to complement on your art skill, my first look at your pic i thought is was real, so very impressive job on that, secondly i said blitz basic because the game i am working on right now is in blitz, so i thought it would be easier, so i guess to make things simple bltiz will be the language i will be using for the remainder if this topic/game/message/whatever, so how would i create an instance of a button, do graphically make the button and then program it to do something, for instance i make a button that saves a map file? is that right? anyways just for an example, take falco's adventure log, did he just use like drawimage blahblah, at blah ,at blah, and then put text into it, or does that have to do with GUI, i guess that is the real main reason for this topic is how to make do stuff like that, and i really need to make toolbars for my editor and my engine, so anyways thx lusikkamage, your awsome and i love you art.!!!
- ismetteren
- Chaos Rift Junior
- Posts: 276
- Joined: Mon Jul 21, 2008 4:13 pm
Re: How to create GUI's with blitz basic or any language,
I havent done much(only one application in java) with a gui. But i am pretty sure that is a bad way to do it. In java, you would make a button, then make a class that is inheriting(actully implementing, in java there is a difference between classes and interfaces, interfaces is implemented) from a interface(cant remember the name). Then you can call a method to subsribe/listen to the button(button.addListener(this)). When the button is pressed, it will call the method from the interface, in all classes that is listening to the button.LusikkaMage wrote:From what I gather, your buttons will have a pointer to a parent Window, and clicking the button will call a function in it's parent Window.
I think you could also make a event manager class. Then call a method like evtManager.addSubsriber(this, EVT_BUTTON_PRESSED). Then the button would also have acces to the eventManager in some way, so it when it is pressed it could say: evtManager.triggerEvent(EvtButtonPressed).
The EvtButtonPressed class would contain a type(EVT_BUTTON_PRESSED), some data so you could see what button etc. that is pressed and maybe some other stuff.
I dont know if the last method is good for that kind of stuff.
Sorry for my english
Re: How to create GUI's with blitz basic or any language,
For blitz, blitzbasic.com has a lot of tutorials and examples, you can go to manuals->blitzplus->blitz gui categories.
That will show you all the functions for making gui things like scrollbars windows, the file, edit, help, and so on buttons... as for c++ I have no clue :P
well I think that's all I have to say...
That will show you all the functions for making gui things like scrollbars windows, the file, edit, help, and so on buttons... as for c++ I have no clue :P
well I think that's all I have to say...
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
Re: How to create GUI's with blitz basic or any language,
Perhaps we can get Arce to post and see what he did for the level editor gui.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
Re: How to create GUI's with blitz basic or any language,
Yeah the website I posted teaches you how to do that stuff.... Although marcel might know a lot more about it than I read...
Re: How to create GUI's with blitz basic or any language,
yes i would love for marcel to put his info, i'll send him a message!!! and i will check out that site
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
Re: How to create GUI's with blitz basic or any language,
Also, spum, I'd like to kindly remind you of rule 3 from this forum's "read before posting"
A few more periods and a bit more capitalization, please. Your first and second posts in this thread especially are too hard to read.3) [...] If it doesn't make sense, retype it, reword it, or do whatever you did to (hopefully) pass 3rd grade english. We aren't going to spend excessive amounts of time debugging your english along with your code.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
Re: How to create GUI's with blitz basic or any language,
Haha, dunno how I missed this topic...Especially when you guys have mentioned me by name in here a few times? XD
Anyway, I'd begun writing a small tutorial, but I really don't have time to finish...I could post what I have, but I didn't get very far into the coding, yet...So I'll just hold off till I'm done (tomorrow or the day after). Don't worry, I've got plenty to say and can hopefully point ya in the right direction. Until then, good luck and don't give up.
Anyway, I'd begun writing a small tutorial, but I really don't have time to finish...I could post what I have, but I didn't get very far into the coding, yet...So I'll just hold off till I'm done (tomorrow or the day after). Don't worry, I've got plenty to say and can hopefully point ya in the right direction. Until then, good luck and don't give up.
<qpHalcy0n> decided to paint the office, now i'm high and my hands hurt
Re: How to create GUI's with blitz basic or any language,
rofl I noticed he was online and pmed him to make sure he posted to this topic.
Re: How to create GUI's with blitz basic or any language,
Well, I do apologize for not reading the rules. From now on when I post i will make sure that I am grammatically correct. I was rushing by the way. I am very literate when it comes to the English language, and I would certainly not want to be called dumb. Thanks for the Heads Up Marauder.
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
Re: How to create GUI's with blitz basic or any language,
Hooray! We have improved the forum reading experience! :)
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
Re: How to create GUI's with blitz basic or any language,
haha..........
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: How to create GUI's with blitz basic or any language,
*Gasp* He didn't capitalize but he sure did punctuate.spum wrote:haha..........
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!