Page 1 of 1

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

Posted: Fri Apr 19, 2019 18:06
by Damnit
Maybe I'm just stupid or maybe this library can be really obtuse, in any case, I'm cheesed off because of this tutorial.

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->subscribeEvent("Clicked", Event::Subscriber(&ScrollablePaneSample::fileQuit, this));

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.

(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.

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

Posted: Sun Apr 21, 2019 14:08
by Ident
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.

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

Posted: Sun Apr 21, 2019 20:31
by Damnit
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.

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

Posted: Sun Apr 21, 2019 20:41
by Ident
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.

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

Posted: Mon Apr 22, 2019 10:24
by Damnit
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.

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

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

Posted: Mon Apr 22, 2019 13:35
by Ident
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:

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

Posted: Mon Apr 22, 2019 20:50
by Damnit
Hah,fair enough.

I did have to fill out a form to register on the forum, and, in turn, the Wiki, though :lol: