Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Help requests / Re: ChildWindow change position when title changes.
« Last post by texus on 14 January 2019, 22:08:38 »
What do you mean exactly? That the window size should automatically be made smaller if it doesn't fit inside the window? Or that the child window size should always include the borders and title bar?
12
Help requests / Re: ChildWindow change position when title changes.
« Last post by billarhos on 14 January 2019, 21:21:35 »
 If window is 800 and child window is 802 pixels then border sizes should be removed from the actual child window size.
13
Help requests / Re: ChildWindow change position when title changes.
« Last post by texus on 14 January 2019, 20:06:39 »
The size of a ChildWindow is a bit special. While the size usually defines the total size of the widget, the size of the child window is it's "client size". So when you create a ChildWindow with width 800, it is actually 800 pixels + the border width on both sides (so the total width is 802 pixels). Since your window only has a width of 800 pixels, the child window doesn't actually fit inside your screen. The KeepInParent will attempt to keep the window inside the screen, but it is unable to do so (and whether it pushes the child window off the screen to the left or right is undefined as you noticed with it the window switching position).
It is surprising that something changes when calling setTitle, but doing so triggers a position recalculation for some reason which is where it goes wrong with the KeepInParent property set to true. Although I could probably fix this, it is an edge case that occurs in a situation which should never happen (forcing the widget inside a window where it can't fit), so this might not get fixed (or when it does get fixed there might be other calls that trigger the reposition).
14
Help requests / ChildWindow change position when title changes.
« Last post by billarhos on 14 January 2019, 17:57:42 »
Hi

When i change the title of a child window the windows moves a bit inside the main (windows) form. I change title text because i am using more than one language.
This happening when height of child window is smaller than main window (570). However if the child window has the same height with form (600px) the the title tongle between visible and invisible.

Using github version

Code: [Select]
mWindow.create(sf::VideoMode(800, 600), "Sfml + Tgui example", style, contextSettings);
mWindow.setFramerateLimit(60);
mGui.setTarget(mWindow);


tgui::ChildWindow::Ptr pWindow = tgui::ChildWindow::create();
pWindow->setSize(800, 570);
pWindow->setPosition(0, 0);
pWindow->setKeepInParent(true);
pWindow->setTitleAlignment(tgui::ChildWindow::TitleAlignment::Center);
pWindow->getRenderer()->setTitleBarHeight(22);
pWindow->setTitle("Bill");

//-----------------------------------------------------------------------
pButtonLoad = tgui::Button::create();
pButtonLoad->setSize(150, 50);
pButtonLoad->setPosition(800 / 2 + 50, 600 / 2 - 20);
pButtonLoad->getRenderer()->setTextColor(sf::Color::Black);
pButtonLoad->setText("Load");
pButtonLoad->connect("MousePressed", [=]()
{
pWindow->setTitle("Billarhos");
});
15
Feature requests / Re: "opacity when widget is disabled
« Last post by billarhos on 12 January 2019, 16:25:01 »
Yes may be is that. I found the issue with 8.2. Then i download from "github" (8.3) that obviously this issue was fixed.
16
Feature requests / Re: "opacity when widget is disabled
« Last post by texus on 12 January 2019, 14:05:04 »
Quote
Also, if i run "setOpacity" other than 1.0f before adding widget to gui manager the opacity does not apply. It works if i first add the widget and then apply new opacity. I tried this with "button".
I didn't realize earlier because I was focusing on the gui.add call, but the issue you are having has probably already been fixed in the github version: https://github.com/texus/TGUI/blob/d679a0a0c4b60e1895f258d10da940fbdda15e35/changelog.txt#L11
17
Feature requests / Re: "opacity when widget is disabled
« Last post by billarhos on 11 January 2019, 07:15:33 »

Quote
The OpacityDisabled property has been added to the version on github: https://github.com/texus/TGUI

Thanks Texus. That was really quick.

Quote
Could you show some code for this? I can't reproduce it.

I made a tiny example but i can't reproduce either. I will investigate and i 'll come back.
18
Feature requests / Re: "opacity when widget is disabled
« Last post by texus on 10 January 2019, 19:53:39 »
The OpacityDisabled property has been added to the version on github: https://github.com/texus/TGUI
19
Feature requests / Re: "opacity when widget is disabled
« Last post by texus on 10 January 2019, 18:45:01 »
I'll add a "OpacityDisabled" property to the renderer.

Quote
Also, if i run "setOpacity" other than 1.0f before adding widget to gui manager the opacity does not apply. It works if i first add the widget and then apply new opacity. I tried this with "button".
Could you show some code for this? I can't reproduce it.
20
Feature requests / "opacity when widget is disabled
« Last post by billarhos on 10 January 2019, 12:23:25 »
Hi Texus. Happy new year.

Good news. I started using 0.8.2.  I finished one of my big projects. I done all the changes and now i am changing the little details in order all widgets looks like before.
Thank you for the great work you done.

I was thinking if a "opacity when widget is disabled" property in all widgets can be added. Right now, when i want for instance a check box to be disabled i set the manually the opacity to 0.3. So the user can easily understand that this widget can not be touched-changed. Ii should be great if we can have this out of the box!

Also, if i run "setOpacity" other than 1.0f before adding widget to gui manager the opacity does not apply. It works if i first add the widget and then apply new opacity. I tried this with "button".

cheers

Pages: 1 [2] 3 4 ... 10