Recent Posts

Pages: [1] 2 3 ... 10
1
General Discussion / Re: Kitchen Sink
« Last post by texus on Today at 22:56:19 »
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.
2
General Discussion / Re: Kitchen Sink
« Last post by billarhos on 18 June 2019, 19:45:18 »
Well, ok we leave knob and messagebox for later time.
Forgot to mention my theme knob doesn't behave correct, meaning it can't follow the mouse events as the non theme knob follows.

Apart from knob issue, i am done. I am open to any additions or changes. Please do not hesitate. If really something is not fitting in my code i would gladly change it.
3
General Discussion / Re: Kitchen Sink
« Last post by texus on 18 June 2019, 18:32:15 »
Quote
I added "gnu-freefont_freeserif.zip" because it contains credit file for author and maybe it should added in resources.
I agree that the credits should be included, but that zip contains several different fonts of which only one is needed, so it is wasted space. Maybe the font should be moved to a new subfolder which would contain the README, FreeSerifBold.otf, CREDITS, COPYING and AUTHORS files. I don't think we need to keep the INSTALL, CHANGELOG and other font files. I would keep the README just because it contains the exception that allows the font to be used without requiring the program to be licensed under GPL.

Quote
I really can not figure out why the label with scroll bar do not show the beginning of the text.
I can't reproduce this. If I don't call setScrollbarPolicy then it only shows the start of the text as expected, but I don't know in what situation it would only show the end of the text.
Edit: I didn't look at the program yet, so I didn't see you already included the label. I'll have a look at the code later to figure out why it is happening.
Edit2: The issue is with setVerticalAlignment(Center), but you probably shouldn't be using that anyway when you have a vertical scrollbar.
Edit3: Fixed.

Quote
Also, i can't set min max form size on a message box.
Message box wasn't supposed to be resized and it's size would depend on the contents. A maximum size would be useful as it would allow word-wrapping on the text. For the label the behavior is simple, but I'm not sure what to do if the buttons exceed the size. The whole widget probably needs an overhaul, maybe also making the sizes of the buttons and the spaces between them configurable. So this probably isn't something that I would implement on short-term.
4
General Discussion / Re: Kitchen Sink
« Last post by billarhos on 18 June 2019, 08:16:37 »
http://www.mediafire.com/file/56yxedvzmigbq32/KitchenSink.rar/file

Well i made all the changes.
I added "gnu-freefont_freeserif.zip" because it contains credit file for author and maybe it should added in resources.
Png flags file are mine so it will be no problem.
Also added some cool key events for each tab (space, left arrow, right arrow or enter depending on each tab).
You can select next tab with "Tab" key.

I really can not figure out why the label with scroll bar do not show the beginning of the text.
Also, i can't set min max form size on a message box.


5
General Discussion / Re: Kitchen Sink
« Last post by billarhos on 17 June 2019, 23:16:12 »
Great.

I 'll make all the changes-corrections tomorrow.
Don't bother the others till i finished. They can see it completely. (As far as i can go it..)

Thanks Texus.
6
General Discussion / Re: Kitchen Sink
« Last post by texus on 17 June 2019, 22:45:09 »
- SFML_libs.hpp is specific to Visual Studio and should indeed be removed once this gets integrated with the TGUI examples which compile and link with cmake.
- defines.hpp should be removed. Not because the file is so small, but because I actually don't want to see SAFE_DELETE being used. TGUI tries to be a modern c++ library, it already requires c++14 as a minimum, so it would be best if the examples didn't use new and delete. Based on a quick glance at the code I think it could be replaced with std::unique_ptr.
- Why was defineImprovedEnum.h used? Are there places where it is used where a normal enum was be too limited?

Some minor comments:
- gnu-freefont_freeserif.zip and flags/Thumb.db in the resources folder can be removed I guess.
- Text colors of radio buttons in "Buttons" tab aren't the same (only the first one is really readable)
- The themed knob doesn't move correctly. ImageRotation in gui.txt should be 90, the current value seems to be a copy-paste error.
- I don't really like the horizontal scrollbar for ScrollablePanel as there is no contents to the right. Calling panel->setHorizontalScrollbarPolicy(Scrollbar::Policy::Never) would probably be better in this case (or changing the content width to not include the vertical scrollbar).
- A label with scrollbar would really look great on the first tab :)

I'll put a link to this forum topic on discord tomorrow so that your work gets a few more views.
7
General Discussion / Re: Kitchen Sink
« Last post by billarhos on 15 June 2019, 19:25:23 »
Quote
I can't reproduce it

My mistake. It was the font itself!!

http://www.mediafire.com/file/0dvv5r8cgfrtc2s/KitchenSink.rar/file

http://www.mediafire.com/file/ntc50fgol5a5iho/Run.rar/file

Here is the executable and the sources with vs 2015 project files.

You can tell me if i should change anything.

For instance.

SFML_libs.hpp can be removed.
defines.hpp  can be removed.
i use defineImprovedEnum.h. if that is a problem i 'll change all enums.


Oops just remember i didn't change the tgui dll in run folder with the latest one.
http://www.mediafire.com/file/3l8iblez3fmtooo/tgui.rar/file


8
General Discussion / Re: Kitchen Sink
« Last post by texus on 15 June 2019, 17:22:18 »
Quote
The above code kills the selected tab. When a tab bar goes disabled must not lose his selected index.
Fixed.

Quote
The above code (setting new font) sets all text data in scrollpanel to lowercase.
I can't reproduce it. I also don't see how the font could affect the string data. If the font you are setting has capital letters then you should create a minimal program and post it together with the font.
9
Help requests / Re: Increasing scroll sensitivity
« Last post by Maksat on 15 June 2019, 13:37:32 »
Thanks!
10
General Discussion / Re: Kitchen Sink
« Last post by billarhos on 15 June 2019, 04:19:37 »
I think knobs deserve a separate thread because they are so cool.. 8)


Quote
- When you close the keyboard, the "Buttons" tab is no longer selected.
Code: [Select]
pTabBar->setEnabled(false);
pTabBar->setEnabled(true);

The above code kills the selected tab. When a tab bar goes disabled must not lose his selected index.

Thenk you for the ScrollablePanel info. It was so obvious that i was totally blind.


Code: [Select]
pScrollablePanelTheme = tgui::ScrollablePanel::copy(pScrollablePanel);
pScrollablePanelTheme->setRenderer(theme->getRenderer("ScrollablePanel"));
pScrollablePanelTheme->getRenderer()->setFont(*pFont);

The above code (setting new font) sets all text data in scrollpanel to lowercase.
Ha, just tested with label and is happening the same. I think is in all widgets cause they are sharing the same code.
Pages: [1] 2 3 ... 10