Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - methinks82

#1
When creating a canvas widget, if setSize is called after the canvas is added to it's parent the canvas will not display.

This version works

tgui::Canvas::Ptr canvas = tgui::Canvas::create();
canvas->setPosition(50,50);
canvas->setSize(100,100);
gui.add(canvas);
canvas->clear("100,100,100");
canvas->display();


When we switch the order of canvas->setSize and gui.add, the canvas no longer displays.

tgui::Canvas::Ptr canvas = tgui::Canvas::create();
canvas->setPosition(50,50);
gui.add(canvas);                   // moved before setSize
canvas->setSize(100,100);
canvas->clear("100,100,100");
canvas->display();


It doesn't matter if the parent is gui or another widget (such as panel)
I haven't observed this behavior with any other widgets.

TGUI 0.8.1
Visual C++ 2017 15.8.8
#2
Help requests / Can't move the slider
13 October 2018, 16:17:38
Hi Everybody
I'm having problems with the slider widget. I can add it and it shows up just fine, but I can't actually use it in any way, it doesn't move when I click it.

I have tried setting the min, max, step, and value.

Using 0.8, 32bit, Visual Studio 2017

Thanks
#3
Hi everybody.
I have a canvas that the user can click. When they do, I need to find where on the canvas they clicked.
I understand that the "MousePressed" signal comes with a SignalVector2f that gives the mouse position relative to the widget, but I can't find any documentation on how to access or use that data.
Does anybody have any hints?

Thanks