Browsing this Thread:
1 Anonymous Users
|
Re: Need example how use cGuiGroupPage in std/cGUI module
|
||||
|---|---|---|---|---|
|
Home away from home
![]()
|
@mrdarek
Yes, that is the best way to do it ![]()
Posted on: 2011/6/5 19:00
|
|||
|
||||
|
Re: Need example how use cGuiGroupPage in std/cGUI module
|
||||
|---|---|---|---|---|
|
Just can't stay away
![]() |
Thanks for nice example - it work for me. I can calling menu using menu name like in example - it's good idea.
Posted on: 2011/5/8 6:53
|
|||
|
||||
|
Re: Need example how use cGuiGroupPage in std/cGUI module
|
||||
|---|---|---|---|---|
|
Home away from home
![]()
|
Ok.
I only had a raw MUI 3.8 install on my hardfile but I'll have to update it soon anyway.
Posted on: 2011/5/4 19:01
|
|||
|
||||
|
Re: Need example how use cGuiGroupPage in std/cGUI module
|
||||
|---|---|---|---|---|
|
Home away from home
![]()
|
@SamuraiCrow
Outputting AmigaE code (instead of C++) is no-longer heavily tested, and in fact I haven't tested it YET for the r6 beta/preview release, so I would not be surprised if it did not work properly. With luck it may be easy to fix any problems that have been added by recent updates. To be honest, I didn't think there was any interest in this output mode, so I had been considering (ONLY considering) getting rid of it entirely. PLEASE speak out if you think it should be kept! Rest assured that the above example will work on AmigaOS3, when generating C++ code (as it does by default). Quote: Does the textbox require the TextEdit.mcc file? The StringBox (not used in this example) requires the TextEditor MCC. But this is such a common MUI add-on that I didn't think it'd be a problem (no other MCCs are required).
Posted on: 2011/5/2 9:09
Edited by PortablE on 2011/6/5 18:59:36
|
|||
|
||||
|
Re: Need example how use cGuiGroupPage in std/cGUI module
|
||||
|---|---|---|---|---|
|
Home away from home
![]()
|
I tried copying and pasting that example into my E-UAE hardfile and compiling it. Does the textbox require the TextEdit.mcc file? It wouldn't compile without it. I used the output language set to AmigaE. There were a few warnings about rebracketing not being completely successful.
Posted on: 2011/5/1 22:20
|
|||
|
||||
|
Re: Need example how use cGuiGroupPage in std/cGUI module
|
||||
|---|---|---|---|---|
|
Home away from home
![]()
|
@mrdarek
Here is an example of how to use the Page group, but please make sure you update to the latest (just released) version of PortablE which fixes several bad GUI bugs: <pre>MODULE 'std/cGui' PROC main() DEF quit:BOOL DEF win:PTR TO cGuiWindow, item:PTR TO cGuiItem DEF guiPages:PTR TO cGuiGroupPage DEF guiPage0:PTR TO cGuiItem, guiButtonGo:PTR TO cGuiButton DEF guiPage1:PTR TO cGuiItem, guiButtonReturn:PTR TO cGuiButton CreateApp().build() ->equivalent to IsDesktopApp() ->create the GUI win := CreateGuiWindow('example') guiPages := win.beginGroupPage() guiPage0 := win.beginGroupVertical() win.addTextBox('').setState('Hello world!') guiButtonGo := win.addButton('Go') win.endGroup() guiPage1 := win.beginGroupVertical() win.addTextBox('').setState('Goodbye cruel world!') guiButtonReturn := win.addButton('Return') win.endGroup() win.endGroup() win.build() ->handle GUI events quit := FALSE REPEAT item := WaitForChangedGuiItem() SELECT item CASE NIL ->(a non-item event occured) so check if user tried to close the window IF win.getCloseRequest() THEN quit := TRUE CASE guiButtonGo ->Print('Go button was pressed\n') ->this is one way of changing the visible page guiPages.setState(1) ->but we could have used: ->guiPages.setStateItem(guiPage1) CASE guiButtonReturn ->Print('Return button was pressed\n') ->this is another way of changing the visible page guiPages.setStateItem(guiPage0) ->but we could have used: ->guiPages.setState(0) ENDSELECT UNTIL quit win.close() FINALLY PrintException() ENDPROC</pre>
Posted on: 2011/4/28 21:56
|
|||
|
||||
|
Re: Need example how use cGuiGroupPage in std/cGUI module
|
||||
|---|---|---|---|---|
|
Home away from home
![]()
|
I was going to post an example, but I've run into a bug which seems to stop buttons from responding, so I will need to look into that...
EDIT: I have found two bugs so far that prevent my example from working. I am working on fixing both of them...
Posted on: 2011/4/25 20:29
Edited by PortablE on 2011/4/28 14:19:55
|
|||
|
||||
|
Need example how use cGuiGroupPage in std/cGUI module
|
||||
|---|---|---|---|---|
|
Just can't stay away
![]() |
I resign coding game menu in graphics mode because calculating text size is slow and not flexible. I start coding my game menu using std/cGUI. My menu has some submenus so I want use Group page feature to display only one menu at current time.
I need simple example: Menu with button (newpage) - after clicking on this button I expect display second page with button(return) - after click on this button program should return to first page with button(newpage). How code it and handle it using GroupPage feature - please someone help me???
Posted on: 2011/4/24 9:16
|
|||
|
||||
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.







