Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
DJuego
@DJuego
I understand perfectly. Thank you for being there. @texus
It's probably related to the last commit. The previous version worked perfectly.
Bruno Van de Velde
@texus
I don't see what could be wrong in the last commit though. If I made a typo and an exception would be thrown because a property doesn't exist then the exception should also be thrown on linux, but the program runs fine on my linux pc.
I figured it out
It works now
The only reason I could think of why I wouldn't run on a different pc was if a resource was missing so I checked and I indeed forgot to commit the TreeView.png icon
DJuego
@DJuego
It works!
It was precisely the tree element that impelled me to "update".
:-)
Kvaz1r
@Kvaz1r

Hello. I was trying to build static version of project but get errors while build.

error LNK2038: 
...
"RuntimeLibrary":  
...
"MT_StaticRelease" 
...
"MD_DynamicRelease" in ManyDifferentWidgets.obj

Is it possible?

It builds fine library but can't build examples and gui-builder.
Bruno Van de Velde
@texus
@Kvaz1r Did you by any change enable TGUI_USE_STATIC_STD_LIBS? I'm not sure if I tested that in combination with the gui builder and examples (they might still use the default /MD even if TGUI is compiled with /MT).
If all you wanted was normal static TGUI libraries then you only need to set TGUI_SHARED_LIBS to FALSE and leave TGUI_USE_STATIC_STD_LIBS to FALSE as well.
If you set TGUI_USE_STATIC_STD_LIBS to TRUE then you must also set the /MT flag in the project using TGUI.
Kvaz1r
@Kvaz1r
Yes, I enabled TGUI_USE_STATIC_STD_LIBS.
Bruno Van de Velde
@texus
Do you understand the difference between /MD and /MT and want to use /MT?
did you compile SFML yourself or download it from their website?
Kvaz1r
@Kvaz1r
yes, I understand the difference and I build myself. I think I will able create a new project with tgui but I am also interesting to try form-builder and "play" with samples.
Bruno Van de Velde
@texus
I'm currently trying to compile with TGUI_USE_STATIC_STD_LIBS myself to see what I need to change in the code
Kvaz1r
@Kvaz1r
SFML samples works well regardless which option I used (static/dynamic), but I always prefer static because I really lazy to move all those dll's ;-)
I can did something wrong since I have never used CMake earlier and there is really many config options in SFML and TGUI.
Bruno Van de Velde
@texus
I'm getting the same errors here now, so it is definately a bug
But the code does try to set /MT even for the gui builder so the problem isn't as obvious as I was hoping it would be
Bruno Van de Velde
@texus
I think I found the problem, the replace from /MD to /MT seems to happen too late in cmake and doesn't get applied (not even on the tgui lib itself). So basically the TGUI_USE_STATIC_STD_LIBS option has been broken since last year.
Bruno Van de Velde
@texus
@Kvaz1r I don't have the time to test it myself today, but I have made a change to the cmake script that should fix the problem.
Kvaz1r
@Kvaz1r
great, I will try it.
Kvaz1r
@Kvaz1r
ok, build is successful, but samples are closed immediately after run, console (if run from there) is empty. Gui-builder produce error.
Kvaz1r
@Kvaz1r
found a mistake - I set another directory for output.
Nikita
@GoverLabs
Hi Texus. I've added saving/loading root form size to GuiBuilderState. You can find it in my PR. Please, let me know, if you want to change smth there.
Bruno Van de Velde
@texus
Thanks. I will try to look at the PR tomorrow
DJuego
@DJuego
Hi again!
When i set the value of the Knob component, the knob is not "refreshed" with the new value. A bug?
tgui::Knob::Ptr knob_orientation = m_gui.get<tgui::Knob>("Knob1");
knob_orientation->setValue(0);
DJuego
@DJuego
Yes. I can confirm that setValue works in other knobs. It is strange.
Bruno Van de Velde
@texus
@DJuego Did you set the minimum or maximum for that knob somewhere?
Does getValue() return the value that you passed to setValue()?
Did you try it with another value as well?
DJuego
@DJuego
Hi @texus. No . I don't set programatically the minimum/maximum. I use the TGUI editor with values minimun -180 and maximun +181. It works. The knob is responsive to events. I can move the dial as i expect.
No. getValue() returns the previous value. The setValue() is ignored.
Bruno Van de Velde
@texus
What are the values returned by getMinimum() and getMaximum()?
DJuego
@DJuego
tgui::Knob::Ptr knob_orientacion = m_gui.get<tgui::Knob>("Knob1");
knob_orientacion->setValue(33);
auto valor = knob_orientacion->getValue();
auto minimum = knob_orientacion->getMinimum();
auto maximum = knob_orientacion->getMaximum();
valor = -53
minimum = -180
maximum = 181
They are the expected values of maximum and minimum.
"valor" should be 33.
Bruno Van de Velde
@texus
Is there a callback function connected on value change? Is the value still wrong when executing knob_orientation->disconnectAll(); before setting the value?
DJuego
@DJuego
I have another knobs in the same program. It works perfectly with setValue(). The only difference is the size of the problematic knob. It is "big". Height/Width is 400. The parameters maximum and minimum are the same.
A second please.
Yes! I have debugged the callback function. That's probably the problem.
DJuego
@DJuego
Of course, that was the problem. Next time I will investigate deeply before I issue an alert around here. ;-) A series of fortuitous coincidences meant that in the other knobs the problem did not manifest itself. That's why I was perplexed.
Thank you very much, @texus.
Nikita
@GoverLabs
Hi Texus! Just want to say that tgui::Signals namespace is awesome! Finding correct signal name was a bit tricky and distracting.