Kitchen Sink

Started by billarhos, 10 June 2019, 15:00:11

texus

The issue with the knob not responding has been fixed, but you also need to add "ImageRotation = 90;" to the theme to make it point in the right direction.

Maybe you could make a base class with virtual functions for all these tabs? Then you could get rid of the switch cases in processEvents, update and on top of loadTab in cKitchenSink.
Are the cases in cVirtualKeyboard::handleEvent needed? Can't you just check if "index != -1"?

I'm happy with how it looks. The code style and naming of variables isn't exactly the same as used internally in TGUI, but that is fine for example code, everyone is going to have their own convention anyway.
I've only briefly looked at the code. Some code improvements could be made such as replacing raw arrays with std::array and using more modern c++ for randoms, but those aren't important changes, I'm fine with the code being like it is now. The code can always be improved in the future.

billarhos

Quote"ImageRotation = 90;"
Ok i changed the png to point to 0 degrees.

Quotecases in cVirtualKeyboard::handleEvent needed?
Ok done.

Quotemake a base class with virtual functions for all these tabs
ok will be ready soon.


billarhos

http://www.mediafire.com/file/qh6jds5g9z3jdfp/KitchenSink.rar/file

Now we have something, i think. 8)
Make all changes, added a  custom message box on exit.
Some fixes made.
Added opacity on disabled where needed. However there is a problem with menubar and opacity of texts color when they get enabled.
Also a setopacitydisable value in gui.txt for messagebox gave me an exception.

texus

QuoteHowever there is a problem with menubar and opacity of texts color when they get enabled.
It definitely looks like that with the White theme, but if the issue you were seeing is the one that I just fixed then the problem was actually just the text color, not the opacity.

QuoteAlso a setopacitydisable value in gui.txt for messagebox gave me an exception.
Did you make a typo when making the forum post or are you actually using "setopacitydisable"? Because it should be "opacitydisabled" (without "set" in front and with a "d" at the end).

QuoteNow we have something, i think. 8)
Yep, you did a great job.
Now we just need to get it integrated with TGUI.

Do you think there should be a downloadable exe for the example on the website? If so, maybe you could build the executable statically (including linking statically to standard library) so that it can run on any computer. It would require rebuilding SFML with SFML_USE_STATIC_STD_LIBS and TGUI with TGUI_USE_STATIC_STD_LIBS.

Something should still be done about gnu-freefont_freeserif.zip. The KitchenSink folder is 6.2MB of which 4.3MB is an unused zip file. Whether you keep all the files or except for the font files or whether you do what I suggested earlier ("Maybe the font should be moved to a new subfolder which would contain the README, FreeSerifBold.otf, CREDITS, COPYING and AUTHORS files.") is up to you. When the example gets included with TGUI, every download is going to increase by the size of that KitchenSink folder. For this reason it might also be better to not ship the gui.psd file with the project either, it almost takes up half of the size if you remove the zip. If there is going to be a page on the website about the example I can still put the psd file there.
(I know my tests folder is a few MB too where it could also be argued that it shouldn't be in the project either if I want to keep things small, but that isn't an excuse to add even more bloat than there already is).

billarhos

Quotewas actually just the text color,
Yes it fixed. :o

My mistake. Sometimes when i am in hurry i act like a drunk. I was meant "ChildWindow"
In gui.txt just add "OpacityDisabled = 0.3" in ChildWindow section and the code will hung  in "mGuiTheme.load("resources/gui.txt");"

QuoteDo you think there should be a downloadable exe
No. I was sending the executable to you because i was thinking that it could help you in the process.
Just like builder-gui, it should be compiled in user side.

For all other stuff like where should be this or that, is really up to you. You can use another free font (smaller) if you like. You can change everything you like. You can put psd in website as you mention if that suits you.

Please act as yours.


texus

QuoteIn gui.txt just add "OpacityDisabled = 0.3" in ChildWindow section and the code will hung  in "mGuiTheme.load("resources/gui.txt");"
I can't reproduce hanging, but last time you said "gave me an exception" so I'm assuming that is still what you mean. The reason is probably because you forgot a semi-colon behind the line (if you catch the tgui::Exception that gets thrown it will likely tell you that parsing failed on that line, maybe even mentioning which character it read). You forgot this for all widgets, but the parser is more forgiving when it is the very last line in the section.

billarhos

QuoteYou forgot this for all widgets

;D