Main Menu

Recent posts

#61
Help requests / Re: setOpacity and animations ...
Last post by texus - 23 March 2024, 17:05:04
It's probably best to put it in a new topic.
#62
Help requests / Re: setOpacity and animations ...
Last post by GetterSetter - 23 March 2024, 17:03:09
Okay, thank you. I have also found a bug with dynamic texture changing. Should I start a new topic, or can I describe it here?
#63
Help requests / Re: setOpacity and animations ...
Last post by texus - 23 March 2024, 13:39:37
Definitely a bug. Two bugs even.

This has now been fixed in the last TGUI 1.x-dev version.
Just in time for the TGUI 1.2 release that is coming later today.
#64
Help requests / setOpacity and animations don'...
Last post by GetterSetter - 23 March 2024, 12:11:22
Version: TGUI-1.1.0
OS: Kubuntu-22.04

Hello, I've faced the following problem:
When I call spin_control->hideWithEffect(...) none of the effects affects widget somehow.
 
When I call spin_control->getRenderer()->setOpacity(0) nothing happens again.

But if I use
spin_control->getSpinButtonRenderer()->setOpacity(0.5);
spin_control->getSpinTextRenderer()->setOpacity(0.5);
it actually works.

Is this bug or am I doing something wrong?
#65
Help requests / Re: A way to handle multiple f...
Last post by texus - 22 February 2024, 18:19:46
You will need the touch events that you get directly from SFML in your main loop for this.

I could maybe add a new event, something like a PinchZoom event, which works similarly to mouse wheel scrolling (i.e. has one + or - parameter with a relative value since the last position). I'm however uncertain how to properly detect a pinch zoom, and I'm not sure what the value should even be. As soon as you put 2 fingers down, TGUI will currently already think that you are scrolling with two fingers (which is an assumption I could only make because no other gestures were supported). So adding the event (which I'd be willing to do), is the least amount of work. Getting both zooming and scrolling with two fingers to behave well would be a lot harder (and not something that I'm currently willing to do).
#66
Help requests / A way to handle multiple finge...
Last post by Nafffen - 22 February 2024, 17:57:27
Hey, I am trying to have a SFML Canvas in which I can navigate with 1 or 2 fingers.
I want to zoom in the view by pinching 2 fingers, but I need to keep track of each finger down and their position.
I know touch events are translated to mouse events for most cases. So I can't handle zooming with the information leftMousePressed is giving me.
Is there a trick to have a better fingers handle, or can I just cancel all tgui events for this widget and transmit SFML's ones ?
thank you
#67
Help requests / Re: How to override OK button ...
Last post by LeeDev - 08 January 2024, 03:11:38
I think I solved it. I thought signals were passed as strings to connect, I didnt know you could acces them as memebers.

void GuiManager::OnClickColorPickerTool()
{
canDraw = false;
tgui::ColorPicker::Ptr colorPicker = tgui::ColorPicker::create();
colorPicker->onOkPress.connect(&GuiManager::Test, this);
gui.add(colorPicker);
}
#68
Help requests / How to override OK button in T...
Last post by LeeDev - 08 January 2024, 02:18:34
I know this is a skill issue on my part but I cannot find any examples online.

I am trying to make a ColorPicker which was easy enough:

void GuiManager::OnClickColorPickerTool()
{
canDraw = false;
tgui::ColorPicker::Ptr colorPicker = tgui::ColorPicker::create();
gui.add(colorPicker);
}

However I am trying to figure out how I can override the button funtionalliy for Okay and Cancel. I was reading the docs page but no functions seem to match what I am looking for. Can someone help me out? Thank you!
#69
Help requests / Re: Linking Error only with tg...
Last post by LeeDev - 07 January 2024, 11:27:57
Oh duh. I remember seeing that in the docs and thought I skipped it, but apparently not. I didn't know all of that information was in the vcxproj either.

Thanks for the help, and keep up the great work!
#70
Help requests / Re: Linking Error only with tg...
Last post by texus - 07 January 2024, 10:35:52
You are defining SMFL_STATIC (which even has a typo) and TGUI_STATIC, but you are linking to the dynamic libraries (i.e. the ones that don't end have "-s" in the name). So you should remove SMFL_STATIC and TGUI_STATIC from the PreprocessorDefinitions.