Page 1 of 1
simple question
Posted: Fri Apr 06, 2012 12:52
by zydgyy
Hi,i am new to cegui and GUI in games,so,if i want widget to diplay the scores of my player,what kind of widget in CEGUI do i use???
What about title text of this scores?Thanks~
Re: simple question
Posted: Fri Apr 06, 2012 13:06
by Ident
statictext
Re: simple question
Posted: Fri Apr 06, 2012 16:00
by zydgyy
Ok,so what about what i want to group some scores display widgets,what do i use?framewindow is the only option?Is there something like panel as parent window??
Re: simple question
Posted: Fri Apr 06, 2012 16:25
by Ident
how do you want them to be grouped? automatically or manually? as a list?
Re: simple question
Posted: Fri Apr 06, 2012 17:53
by zydgyy
No,briefly,i want to group some scores text display window in a panel manually,and show the panel somewhere in the window
so,what is my panel widget???
-------------------------window--------------------------------
| |
| |
| |
| |
| |---------------panel-----| |
| | score1 score2 | |
| |---------------------------| |
| |
| |
|-----------------------------------------------------------------
Re: simple question
Posted: Sat Apr 07, 2012 09:18
by Ident
should it have a frame and background? you can take just a CEGUI/Window without skin and put the 2 scores inside, but then it will be "Invisible". You can use a framewindow but it is kind of "more than you would need". I am not sure what else there is, depends on the looknfeel you use, also you could create a simple window looknfeel yourself.
Re: simple question
Posted: Tue Jun 26, 2012 01:08
by Blender+C++
Sorry about ressurect a thread but i also want to create something similar to this but i want that the titlebar(FrameWindow) show the character information when i select it from a combobox menu, well first of all i dont even know how to create a text inside the framewindow, the only text i know how to create is the basic one, setText() function, but i wanted to show the charater information inside the framewindow, is it possible? and i also wanted to disabled the drag and resize function, the only thing i want is to show some basic information inside of it...if theres a better way of doing this i appreciate any help here, im pretty new to CEGUI so dunno how it works..the only reason why im picking the framewindow is due to its design, i have changed a couple of details but in general i left as it is,anyways i liked it and can i use it in the way i described above?
any help here is greatly appreciated!
thx in advance,
ROmulo Romero
Re: simple question
Posted: Tue Jun 26, 2012 07:50
by CrazyEddie
Hi,
You can learn quite a lot about what is and is not possible by reading the API reference for a given class (yes, I know there is a lot of it) and also looking at property lists. So for example, for the frame window:
http://www.cegui.org.uk/api_reference/c ... indow.html and (for TaharezLook)
http://cegui.org.uk/static/TaharezLookP ... rameWindow you will see there are indeed functions and properties for disabling both sizing and drag moving of the FrameWindow.(so basically setSizingEnabled and setDragMovingEnabled).
The text in the titlebar is changed by the basic setText function. I assume you want additional text in the window itself? The easiest way (but, as ever, not the only way) to do that is to attach a StaticText (so when using TaharezLook, "TaharezLook/StaticText"), and use the setText on that to add additional content (you can split it onto multiple lines by using newline ('\n') within the string you set on the window.
CE.
Re: simple question
Posted: Wed Jun 27, 2012 01:28
by Blender+C++
Hi dude thx for replying again and for ur attention, i really appreciate all that!
You can learn quite a lot about what is and is not possible by reading the API reference for a given class (yes, I know there is a lot of it)
wow man even though there is a lot of stuff in there it looks pretty well organised and easy to use, thx dude for sharing the links,i didnt think about the possibility of looking into the API considering i ve given up lots of times on Ogre API ,i still kind of dont get how things work in the ogre API but i believe that some day in future that ll be as easy as look for a trouser in the wardrobe ^^ anyways that been said , i ll try to use the method u just showed me and whenever it is done ill póst here how it worked out!
thx again and ill see ya next time
Kind regards,
Romulo Romero