GLBasic forum

Codesnippets => Code Snippets => Topic started by: MrTAToad on 2010-Feb-15

Title: Using Guichan
Post by: MrTAToad on 2010-Feb-15
My modified version of Guichan seems to be very usable, so here are a few instructions on how to use it.


Some notes :

Code (glbasic) Select
window%=GUI_CreateWindow(2,options.screenHeight%-200,"Options",options.screenWidth%-4,180,FALSE)
genContainer%=GUI_CreateContainer()
nameContainer%=GUI_CreateContainer()

tabArea%=GUI_CreateTabbedArea(options.screenWidth%-4,200)

GUI_CreateLabel(genContainer%,1,1,"Music Volume :",PTR_CONTAINER%)
GUI_CreateLabel(genContainer%,1,23,"SFX Volume :",PTR_CONTAINER%)
GUI_CreateLabel(genContainer%,1,45,"Screen Resolution :",PTR_CONTAINER%)
GUI_CreateLabel(genContainer%,1,67,"Use Full Screen ?",PTR_CONTAINER%)
GUI_CreateLabel(genContainer%,1,89,"Use Background :",PTR_CONTAINER%)
GUI_AddTabItem(tabArea%,"General",genContainer%,IS_CONTAINER%)

GUI_CreateLabel(nameContainer%,1,1,"Player 1 Name :",PTR_CONTAINER%)
GUI_CreateLabel(nameContainer%,1,23,"Player 2 Name :",PTR_CONTAINER%)
GUI_CreateLabel(nameContainer%,1,45,"Player 3 Name :",PTR_CONTAINER%)
GUI_CreateLabel(nameContainer%,1,67,"Player 4 Name :",PTR_CONTAINER%)
GUI_AddTabItem(tabArea%,"Name",nameContainer%,IS_CONTAINER%)

GUI_AddTab(window%,tabArea%,0,0,IS_WINDOW%)


I'll be updating all my three games to use it.  At some point I'll be having to do a keyboard overlay for those platforms that dont have a keyboard.

If anyone does find a problem with the source code, let me know.  Performance wise, it should be fine for even complicated things - however, it doesn't work well in a virtual machine.

[attachment deleted by admin]
Title: Re: Using Guichan
Post by: bigsofty on 2010-Feb-15
Excellent stuff Mr. T! Have you tried this with the iPhone yet?
Title: Re: Using Guichan
Post by: MrTAToad on 2010-Feb-15
No, not yet - want to update all my games first.

Don't expect any trouble though...
Title: Re: Using Guichan
Post by: MrTAToad on 2010-Feb-15
Its very sluggish with Sun Virtual Machine and Linux - seems pretty much okay with XP though.

Here is a more recent set of files, by the way.

[attachment deleted by admin]
Title: Re: Using Guichan
Post by: bigsofty on 2010-Feb-17
Is the source to the original demo, the one with all the controls used on it, available?
Title: Re: Using Guichan
Post by: MrTAToad on 2010-Feb-18
Its here!

I dont know the current state of it - it should compile okay though.

[attachment deleted by admin]
Title: Re: Using Guichan
Post by: bigsofty on 2010-Feb-18
Many thanks!  :good:
Title: Re: Using Guichan
Post by: bigsofty on 2010-Feb-18
Seems to be a little bit out of date, 'erase' function missing from the interface and some commands looking for different params?
Title: Re: Using Guichan
Post by: MrTAToad on 2010-Feb-18
Its the latest version, by the sound of it.  You'll probably need to uncomment most of the code because at the time I was testing tabs.

It does compile file though.