Please clarify the "Menu and Popup" wiki tutorial thing.

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Damnit
Just popping in
Just popping in
Posts: 6
Joined: Fri Apr 19, 2019 18:01

Please clarify the "Menu and Popup" wiki tutorial thing.

Postby Damnit » Fri Apr 19, 2019 18:06

Maybe I'm just stupid or maybe this library can be really obtuse, in any case, I'm cheesed off because of this tutorial.

http://cegui.org.uk/wiki/Menu_and_Popup

To be precise, this part of it:

To add menuitems runtime to a popupMenu you add a CEGUI::Window childWindow to the popupMenu. You don't create a new CEGUI::MenuItem as you might think:

Code: Select all

CEGUI::PopupMenu* popupMenu  = (CEGUI::PopupMenu*)CEGUI::WindowManager::getSingleton().getWindow("Root/Popup/PopupMenus/FirstPopup/AutoPopup"); 
CEGUI::Window* menuitem = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/MenuItem");
menuitem->setText("Quit");
menuitem->subscribeEvent("Clicked", Event::Subscriber(&ScrollablePaneSample::fileQuit, this));
popupMenu->addChildWindow(menuitem);


So, is the code in the code box "the wrong code", the "wrong code I 'might think about"?
Or is it the right approach? Or whatever. Ffffajdfsdf.

sdflgjsfgh.
(Sorry, pent up rage from trying to get into this very promising library for a while now.)

Thanks for your time and effort and all that. Whew, I'm sweating.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Please clarify the "Menu and Popup" wiki tutorial thing.

Postby Ident » Sun Apr 21, 2019 14:08

Calm down a bit ;) Yes the docu is not up to date.

Depends on the version you are using. I recommend looking at the Sample in the SampleBrowser that has pretty much all widgets of a skin in it. It features a menubar with popups for both vanilla and taharez look and you can open the realted layout file to see how the hierarchy goes. That one definitely works and you can replicate the hierarchy through code.
CrazyEddie: "I don't like GUIs"

Damnit
Just popping in
Just popping in
Posts: 6
Joined: Fri Apr 19, 2019 18:01

Re: Please clarify the "Menu and Popup" wiki tutorial thing.

Postby Damnit » Sun Apr 21, 2019 20:31

Thanks, after completely ignoring anything but the code, I have made quite a bit of progress.
I don't want to jinx anything, though. I'm gonna delete my other, more vitriolic post, it was born from true helpnessness, but making leeway helped.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Please clarify the "Menu and Popup" wiki tutorial thing.

Postby Ident » Sun Apr 21, 2019 20:41

I understand the frustration with the documentation. Unfortunately we really lack manpower, but really anyone could take this over. We are a behind with documenting things for 0.8 and definitely also for 1.0 (dev branch) when it comes to the wiki.
Unfortunately the only time I got to work on CEGUI I can only spend on reviewing PRs and merging them and helping in the forum. Any dev or docu help is appreciated.
CrazyEddie: "I don't like GUIs"

Damnit
Just popping in
Just popping in
Posts: 6
Joined: Fri Apr 19, 2019 18:01

Re: Please clarify the "Menu and Popup" wiki tutorial thing.

Postby Damnit » Mon Apr 22, 2019 10:24

I get that part, CEGUI simply seems be in a sort of "uncanny valley" where good intentions from newcomers might just turn sour by trying to do what they can on their own before bothering others.

I didn't pick up CEGUI to be a raging ahole on a forum, I wanted to be nice, etc... but then the Docs told me that the Docs are for "advanced users" and new users should look into the Wiki instead, etc, and then the confusion started.
Always a trail of 'almost working' but then some snag that got more tangled by googling more.

I dont know a good immediate solution to this. I don't wanna promise anything but I might... *might* write a little LaTeX booklet with things that worked for me, but even that fills me with great apprehension, not because I don't want to write documentation or help, but because my intial foray into CEGUI and its online resources left me so badly confused.

The code itself is so much easier to work with... it, in turn, makes the doxygen docs more accessible, etc.
I am strongly considering a "the hard way first" tutorial or something, when I get more confident in my CEGUI wrangling.
I'd rather see a more initially complex that shows how CEGUI really works under the hood, without the external files, just C++ code, and then getting introduced to the 'work saver' scheme files, etc...than growing up on those, and then having to puzzle out things backwards.

Not to mention, most of the XML stuff on the wiki made my eyes roll up cause I, and this is just a personal thing in this case, only wanted to solve something small, etc

But yeah, I get it, I'm not really mad at the people behind it trying their best (although reading that one MVPs responses to a problem similar to mine a long time ago made me preemptively bristly cause I really didn't want an answer like that ...) even though I also am a little bit, of course.
But it's not like a resentment, I still understand, but maybe add a disclaimer on the news page that the docs are outdated, the documentation was the biggest aggravator in all of this.
Now that I delved more deeply in the code, I realize that RTFMing helps, but it's like old religious texts on science, only in hindsight I see the truth in that.
Reading TFM before the code confused me and made me lose faith in the rest of TFM, but yeah I dnt wanna go in circles.
I apologize for being angry on the forums but I didn't plan on being it, others might not have reacted as strongly as I did, so there's still mea culpa on me, but it tickled the 'evil' of trying to be nice to the devs by doing things on my own but not getting anywhere just 'right', or should i say wrong.

Whew. I'm actually amazed at it, I have never felt this strongly about a library before, not even Boost... makes me feel a little crazy, for sure.

Edit:
This just came to my mind, and it pretty much captures my feelings perfectly.

https://www.youtube.com/watch?v=JtEkUmYecnk

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Please clarify the "Menu and Popup" wiki tutorial thing.

Postby Ident » Mon Apr 22, 2019 13:35

Well, at least we did not make you fill out any forms in order so that you can access the documentation or use the library. But maybe we can add this step as well :twisted:
CrazyEddie: "I don't like GUIs"

Damnit
Just popping in
Just popping in
Posts: 6
Joined: Fri Apr 19, 2019 18:01

Re: Please clarify the "Menu and Popup" wiki tutorial thing.

Postby Damnit » Mon Apr 22, 2019 20:50

Hah,fair enough.

I did have to fill out a form to register on the forum, and, in turn, the Wiki, though :lol:
-_-
hahahaha AHAHHAHA cegui...


Return to “Help”

Who is online

Users browsing this forum: No registered users and 11 guests