*

SDH

  • *
  • 19
    • View Profile
tgui::Picture callback
« on: 17 December 2014, 10:18:52 »
Visual Studio 2013
sfml 2.2
tgui 0.6.6

I think code for this isn't needed.
When you will create tgui::Picture::Ptr object you can bind a number to callback but it won't respond.

Code: [Select]
m_picture = tgui::Picture::Ptr(*fw::g_gui);
m_picture -> bindCallback(tgui::Picture::LeftMouseClicked);
m_picture -> setCallbackId(1);

tgui::Button with callback works, but tgui::Picture don't.
« Last Edit: 17 December 2014, 10:26:55 by SDH »

*

texus

  • *****
  • 1161
    • View Profile
    • Texus's Blog
Re: tgui::Picture callback
« Reply #1 on: 17 December 2014, 10:52:53 »
Could you provide a minimal and complete code that does not work for you?
The callback seems to work fine here.

*

SDH

  • *
  • 19
    • View Profile
Re: tgui::Picture callback
« Reply #2 on: 17 December 2014, 18:11:14 »
Minimal code works, but for some reason mine code doesn't.
I really can't post code because it's really huge.

I'll let you know what happened.

(sorry for causing you troubles, i know exactly what is it when someone tell that something is malfunctioning)


EDIT: After whole night of searching for any prog. error,  i came to conclusion that picture callback doesn't work.
code structure is same like in here: https://forum.tgui.eu/index.php?topic=260.0
I'll do further investigation to be sure.
« Last Edit: 18 December 2014, 05:40:36 by SDH »