Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
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.
22
Help requests / Re: Increasing scroll sensitivity
« Last post by texus on 14 June 2019, 22:35:33 »
In the future I should probably find a better solution so that I can add it to all widgets with a scrollbar without lots of code duplication, but for now I just added setVerticalScrollAmount and setHorizontalScrollAmount functions to the ScrollablePanel class. You can download the latest version from github.
23
General Discussion / Re: Kitchen Sink
« Last post by texus on 14 June 2019, 19:43:19 »
Quote
I have some hard times with "ScrollablePanel"
Theme files just don't work like that, you can't reference to another section (it would be nice if it was possible though, then you wouldn't have to repeat the information). It should look like this:
ScrollablePanel {
    BackgroundColor = rgba(100, 100, 100, 255);
    BorderColor     = rgba(0, 0, 0 , 255);
    Borders         = (1, 1, 1, 1);
    OpacityDisabled = 0.3;
}

Quote
I think knobs need some improvements.
Yeah, that widget didn't get much attention, it only has minimal functionality.

I haven't worked with knobs a lot, so it is possible that I'm disagreeing with some of these things due to lack of experience, but I don't agree that the improvements you suggest should be how the knob works. Maybe such behavior should be optional and even if I decide not to make them the default I could still add an option to make them work that way.

I can think of some situations where you would want such behavior, so maybe there are just 2 different types of knobs: those that simulate real-world knobs and those that just exist to select a value.
The kind of knob I tend to think about falls in the second category (examples, other example). They react immediately on mouse down and the value follows the mouse position, even if it crosses from 100% to 0% or passes through the center of the knob from 25% to 75%.

Quote
When i pressed down left mouse the indicator must no be moved to the direction of mouse point but only if i start moving the mouse while it still down.
I guess this also means that you want the knob to move based on how much you move the mouse as opposed to jumping straight to the mouse position?

Quote
Also when i double click on them they should reset.
Is this some kind of standard behavior somewhere? This could be done in user code if a DoubleClick event existed.

Quote
Also they must stop on min or max and not moving around.
That doesn't sound so easy to implement. It means the thumb must not jump to your mouse position but follow the movements you make. In such scenario I'm not sure how the thumb should respond if you move the mouse through the center of the knob to the other side.


Quote
Almost finished.
Looking even better.
I with I could run it in a browser and put it on the webpage. Maybe with TGUI 0.9, or maybe SFML adds support for emscripten, who knows.
Part of me still can't believe that that ListView was rendered with TGUI :)

Some more nitpicking:
- When you close the keyboard, the "Buttons" tab is no longer selected.
- In Misc2, shouldn't it say "Grid" instead of "Group"?
24
General Discussion / Re: Kitchen Sink
« Last post by billarhos on 14 June 2019, 12:43:02 »
I think knobs need some improvements.
When i pressed down left mouse the indicator must no be moved to the direction of mouse point but only if i start moving the mouse while it still down.
Also when i double click on them they should reset.
Also they must stop on min or max and not moving around.
25
General Discussion / Re: Kitchen Sink
« Last post by billarhos on 14 June 2019, 10:24:52 »
26
General Discussion / Re: Kitchen Sink
« Last post by billarhos on 14 June 2019, 09:23:05 »
I have some hard times with "ScrollablePanel"

Code: [Select]
Panel {
BackgroundColor = rgba(100, 100, 100, 255);
BorderColor        = rgba(0, 0, 0 , 255);
Borders              = (1, 1, 1, 1);
OpacityDisabled = 0.3
}

ScrollablePanel {
Panel = &Panel;
OpacityDisabled = 0.3
}

If i remove Panel property is working. With panel property is crashing. Panel alone is working fine.

27
General Discussion / Re: Kitchen Sink
« Last post by texus on 14 June 2019, 08:30:58 »
I can't think of a reason. It seems to be missing in scrollbar too.
Usually the state is called "down" instead of "pressed", but that might be unclear here.
28
General Discussion / Re: Kitchen Sink
« Last post by billarhos on 14 June 2019, 08:12:50 »
While making SpinButton i found that texturearrowuppressed, texturearrowdownpressed are missing. Is there a reason?

29
Help requests / Increasing scroll sensitivity
« Last post by Maksat on 14 June 2019, 06:25:21 »
Hi! I could not find any way to increase scroll sensitivity of ScrollablePanel. It's very inconvenient to scroll to the end of the content of ScrollablePanel with low contentOffset, when it has wide content height
Pages: 1 2 [3] 4 5 ... 10