BetaGUI : BetaGUI 2.5 update - Style system added.
-
Epimetheus
- Halfling
- Posts: 82
- Joined: Sat Sep 17, 2005 3:28 pm
- Location: Sweden
-
betajaen
- OGRE Moderator

- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
-
Epimetheus
- Halfling
- Posts: 82
- Joined: Sat Sep 17, 2005 3:28 pm
- Location: Sweden
Just edited my last post but here is the error log:
http://rafb.net/p/CICUPb43.html
http://rafb.net/p/CICUPb43.html
-
Epimetheus
- Halfling
- Posts: 82
- Joined: Sat Sep 17, 2005 3:28 pm
- Location: Sweden
Maybe this log is a bit better, easier to read:
http://rafb.net/p/ox9bc186.html
http://rafb.net/p/ox9bc186.html
-
Epimetheus
- Halfling
- Posts: 82
- Joined: Sat Sep 17, 2005 3:28 pm
- Location: Sweden
Hmm... odd, I solved the problem by moving the "optional" cpp section of the code to a actual separate file...
Well thanks anyway for your help... no ill go being stupid on my own
Edit:
Got this problem instead: on runtime
Well thanks anyway for your help... no ill go being stupid on my own
Edit:
Got this problem instead:
Code: Select all
SpaceNavPhysics: OgreOverlayManager.cpp:54: static Ogre::OverlayManager& Ogre::OverlayManager::getSingleton(): Assertion `ms_Singleton' failed.
Aborted (core dumped)-
CABAListic
- OGRE Retired Team Member

- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
-
cdkeito
- Orc
- Posts: 468
- Joined: Sat Jan 27, 2007 12:06 pm
-
rluck
- Kobold
- Posts: 29
- Joined: Fri Jun 08, 2007 7:20 am
- x 1
-
AntonTheManton
- Greenskin
- Posts: 100
- Joined: Sun Jan 14, 2007 1:47 am
Doesn't Compile
Nice concept, but I had a compiler error for every line of of your code (99).
I'm using GNU GCC (G++). It looks like there are problems with namespaces and it doesn't like 'uint'.
Rats - I was really hoping I could get a GUI up and running in under an hour.
I'm using GNU GCC (G++). It looks like there are problems with namespaces and it doesn't like 'uint'.
Rats - I was really hoping I could get a GUI up and running in under an hour.
-
rluck
- Kobold
- Posts: 29
- Joined: Fri Jun 08, 2007 7:20 am
- x 1
I've got it working for the most part, but like a lot of people, I'm stuck at the call back. I used GlobalExplorers example, and I'm at a loss of where to go. I've been looking at betajaen's example code also, and looking at his call back, and I'm wondering if onButtonPress is what I should be using.rluck wrote:Theres a whole lot of example code in this thread, but its really hard to decipher what works and what doesn't. Does anyone have a clear, and concise way of putting this into a project that doesn't use ExampleApplication.h?
edit: Adding a logMessage to do_sth shows that when the button is pressed, it executes that code twice. Once for the press, and once for the release. Anyone got any ideas?
edit2: BetaGUI::FocusState reveals FS_SELECT and FS_SELECT_OFF. Perhaps an if or switch?
-
AntonTheManton
- Greenskin
- Posts: 100
- Joined: Sun Jan 14, 2007 1:47 am
Callback
I also got stuck on the callback - why wasn't it just implemented as a regular function call or variable you can check against. My code isn't designed with the callback/event handler model.
I spent about 2 hours trying to modfiy/implement the 'simple' code. Waste of time. That is by far by the worst code I have ever come across in any program ever. Ever. Which deserves a prize (I mark student assignments all the time).
I gave up and just made my own GUI system using OGRE Overlays - it took under 5 minutes, so I highly suggest just making your own if you are looking for something simple to read/write text in boxes. Have a look at the 'Example' code - you can more or less copy how the debug panel is drawn and turn it into a different display (really only takes 5 mins).
I spent about 2 hours trying to modfiy/implement the 'simple' code. Waste of time. That is by far by the worst code I have ever come across in any program ever. Ever. Which deserves a prize (I mark student assignments all the time).
I gave up and just made my own GUI system using OGRE Overlays - it took under 5 minutes, so I highly suggest just making your own if you are looking for something simple to read/write text in boxes. Have a look at the 'Example' code - you can more or less copy how the debug panel is drawn and turn it into a different display (really only takes 5 mins).
-
betajaen
- OGRE Moderator

- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
Re: Callback
Hey! I mean come on.AntonTheManton wrote:I spent about 2 hours trying to modfiy/implement the 'simple' code. Waste of time. That is by far by the worst code I have ever come across in any program ever. Ever. Which deserves a prize (I mark student assignments all the time).
What version are you using anyway?
-
ajs15822
- OGRE Expert User

- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
Re: Callback
At least look at the uncompressed version:betajaen wrote:Hey! I mean come on.AntonTheManton wrote:I spent about 2 hours trying to modfiy/implement the 'simple' code. Waste of time. That is by far by the worst code I have ever come across in any program ever. Ever. Which deserves a prize (I mark student assignments all the time).
What version are you using anyway?
http://www.nxogre.org/screens/betagui.h
-
KungFooMasta
- OGRE Contributor

- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
Not to be offensive, but I wouldn't use that code posted on the wiki either. It should be updated to a good useable, friendly version. And a working demo wouldn't hurt either..
Just adding helpful suggestions. The easier it is to use the library without problems, the more time you can spend on NxOgre.
Just adding helpful suggestions. The easier it is to use the library without problems, the more time you can spend on NxOgre.
-
To1ne
- Halfling
- Posts: 68
- Joined: Thu May 10, 2007 3:24 pm
BetaGUI is great I think.
I'm using it in a project I made for school. It's so easy to add new features (in the uncompressed version). I actually don't get why you publish the compressed version?
It took me also a lot off hours work to get it working. And indeed the Wiki-page is not complete. Maybe I'll try to make a new tutorial after my exams... . (somewhere after 19 june). If betajaen has no objection, or makes before me.
I've (tried to) study the other GUI's (QuickGUI, CEGUI & OpenGUI), and this one looked the easiest one to use. I can be wrong, if so let me know. It's hard to choose one without study each one for a looong time?? (and I didn't have time for my project)
Actually it would be nice if someone can make a complete comparison of the different GUI's: all there features, advantages/disadantages, ... .
@AntonTheManton:
Maybe try betajaen's example code on page 3 this worked almost from the start...
I'm using it in a project I made for school. It's so easy to add new features (in the uncompressed version). I actually don't get why you publish the compressed version?
It took me also a lot off hours work to get it working. And indeed the Wiki-page is not complete. Maybe I'll try to make a new tutorial after my exams... . (somewhere after 19 june). If betajaen has no objection, or makes before me.
I've (tried to) study the other GUI's (QuickGUI, CEGUI & OpenGUI), and this one looked the easiest one to use. I can be wrong, if so let me know. It's hard to choose one without study each one for a looong time?? (and I didn't have time for my project)
Actually it would be nice if someone can make a complete comparison of the different GUI's: all there features, advantages/disadantages, ... .
@AntonTheManton:
Maybe try betajaen's example code on page 3 this worked almost from the start...
-
mullencm
- Gnoblar
- Posts: 23
- Joined: Sun Oct 30, 2005 8:38 pm
I thought is was very straight forwarded and elegant. I got ver 15 to work in 2min, even the compressed version.
My question is what is the status of the other versions, and should I move up to 20 or 25. They seam to be hidden and under promoted as compared to 15, although have more refinement and feachers.
I am I missing out?
My question is what is the status of the other versions, and should I move up to 20 or 25. They seam to be hidden and under promoted as compared to 15, although have more refinement and feachers.
I am I missing out?
-
betajaen
- OGRE Moderator

- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
2.5 is incomplete, it's missing most of the widgets. The most complete one is the Bullet version which is based on version 2 (I believe).
http://get.nxogre.org/betagui/BetaGUI-Bullet.h
It has nice special effects and other lovely things.
http://get.nxogre.org/betagui/BetaGUI-Bullet.h
It has nice special effects and other lovely things.
-
Epimetheus
- Halfling
- Posts: 82
- Joined: Sat Sep 17, 2005 3:28 pm
- Location: Sweden
-
mullencm
- Gnoblar
- Posts: 23
- Joined: Sun Oct 30, 2005 8:38 pm
using 16 from the above post
Do I have to handle tuning on and off the active and over states for buttons like this.
From my overrided onButtonPress function
This seams to be working just fine, I ask because it seams like I might be over complicating things.
Do I have to handle tuning on and off the active and over states for buttons like this.
From my overrided onButtonPress function
Code: Select all
void mBetaGUIListener::onButtonPress(BetaGUI::Button* inButton, unsigned char mouseDown)
{
if( inButton == VizhenApp::getSingletonPtr()->Button1 )
{
if( mouseDown == 1 ) //mouseDown
{
inButton->activate(true);
VizhenApp::getSingletonPtr()->MPH = 42;
}
else if( mouseDown == 0 ) //mouseUp
{
inButton->activate(false);
inButton->over(true);
}
}
}
-chase
-
To1ne
- Halfling
- Posts: 68
- Joined: Thu May 10, 2007 3:24 pm
I did it like this:
Code: Select all
void onButtonPress(BetaGUI::Button *ref) {
if (ref == mGUI_ExitButton)
mShutdown = true;
} -
dazKind
- Gnoblar
- Posts: 24
- Joined: Thu May 04, 2006 10:43 am
Re: Callback
Well, good for you. Though I doubt that you really knew what you were doing. It took me 5 minutes to implent the bulletversion of betagui into my game. No edges or drawbacks. This includes looking at the classes, a quick glance at the wiki and tweaking the ressource-files. It simply works like it is supposed to.AntonTheManton wrote:I also got stuck on the callback - why wasn't it just implemented as a regular function call or variable you can check against. My code isn't designed with the callback/event handler model.
I spent about 2 hours trying to modfiy/implement the 'simple' code. Waste of time. That is by far by the worst code I have ever come across in any program ever. Ever. Which deserves a prize (I mark student assignments all the time).
I gave up and just made my own GUI system using OGRE Overlays - it took under 5 minutes, so I highly suggest just making your own if you are looking for something simple to read/write text in boxes. Have a look at the 'Example' code - you can more or less copy how the debug panel is drawn and turn it into a different display (really only takes 5 mins).
After using CEGUI, GuiChan and OpenGUI in past I was looking for something really lightweight to satisfy my GUI-needs. BetaGUI is exactly the thing I need right now.
Betajaen: Thanks for providing such nice and helpfull piece of code.
-
betajaen
- OGRE Moderator

- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
Re: Callback
Your welcome.dazKind wrote:Betajaen: Thanks for providing such nice and helpfull piece of code.
@Everyone else
-
ajs15822
- OGRE Expert User

- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
Re: Callback
/me gives a standing ovation to betajaenbetajaen wrote:Your welcome.dazKind wrote:Betajaen: Thanks for providing such nice and helpfull piece of code.
@Everyone else
The hardest thing to do as a programmer is to write code that does more with less.
-
betajaen
- OGRE Moderator

- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
Thank you!
I've been toying with converting BetaGUI 2.5 to use Cairo and bypass the whole image/material idea. I have some fantastic ideas including replacing the current callback system, improve the business logic, work in the 3D world and use overlays, special effects and some other amazing interface concepts. In as little of code as possible. Not quite as BetaGUI 3, as it's a group project but something as equal in standing.
The only let down is Cairo, all of the latest versions for me do not work with the BetaCairo code either nothing is drawn or it crashes. An older version works, but it uses eight dependencies, quite awful considering I managed to compile it down to one DLL.
I've been toying with converting BetaGUI 2.5 to use Cairo and bypass the whole image/material idea. I have some fantastic ideas including replacing the current callback system, improve the business logic, work in the 3D world and use overlays, special effects and some other amazing interface concepts. In as little of code as possible. Not quite as BetaGUI 3, as it's a group project but something as equal in standing.
The only let down is Cairo, all of the latest versions for me do not work with the BetaCairo code either nothing is drawn or it crashes. An older version works, but it uses eight dependencies, quite awful considering I managed to compile it down to one DLL.