Recent Posts

Pages: 1 2 [3] 4 5 ... 10
Installation help / Re: Help getting TGUI running - OpenGL
« Last post by texus on 02 May 2021, 22:53:22 »
I can't help you with that IDE. The only thing I know is how the command that is passed to the linker should look like: for dylibs it should be "-lXXX.dylib" while for frameworks it should be "-framework XXX".

To find a different SFML version you have to change the SFML_DIR option. The value has to be the directory that contains a file called SFMLConfig.hpp. I can't tell you which folder this is, as it depends on your SFML installation, but suppose SFML is installed to /usr/local then the folder would most likely be /usr/local/lib/cmake/SFML.

Alternatively you could always install SFML and TGUI using homebrew.
Installation help / Re: Help getting TGUI running - OpenGL
« Last post by johnnywz00 on 02 May 2021, 22:46:20 »
Alas, I don't know how to tell my IDE to link to frameworks as opposed to dylibs. I tried pasting the framework filenames into the Linker Settings->Libraries: field, replacing the dylibs with them, but that didn't work.

I'm attaching a screenshot of the Cmake options that come preset. Can you possibly point to which ones I should modify that might correct this?
Sorry for the trouble! I'm no computer guru...
Installation help / Re: Help getting TGUI running - OpenGL
« Last post by texus on 02 May 2021, 14:27:37 »
It seems like TGUI links to the frameworks then.

I don't think there is an easy way to choose whether TGUI links to dylibs or frameworks in CMake, it probably uses the first one it finds (unless you either set SFML_DIR manually or show the advanced options and manually change the paths of the SFML libraries).

So the solution is probably to either link to the SFML frameworks in your project, or to rebuild TGUI after removing the files from that Library/Frameworks folder (because TGUI will then find the SFML dylib files instead of the frameworks).
Edit: After thinking about it, TGUI might fail to find SFML when the frameworks are removed (when attempting to build TGUI with cmake again). There is an SFMLConfig.cmake file which TGUI finds and that one probably still points to the framework. So you would have to delete that file as well, or set SFML_DIR to a different location. Just keeping TGUI unchanged and linking to the SFML frameworks in your project thus sounds like the easier solution.
Installation help / Re: Help getting TGUI running - OpenGL
« Last post by johnnywz00 on 02 May 2021, 04:37:19 »
I built TGUI from source with Cmake, but I don't remember all of the options I selected or deselected. I think I was going for using the dylibs. After building the source, I just went in to the CodeLite project Settings->Linker->Libraries and typed in "libtgui-d.0.9.1.dylib" in addition to the SFML dylibs that were there.

I tried erasing the SFML dylibs from that Libraries line (thinking maybe it was already using the frameworks?), but got a linker error:
Code: [Select]
Undefined symbols for architecture x86_64:

When I left the dylibs in the Libraries field and tried to manually remove the SFML frameworks from MacintoshHD/Library/Frameworks directory, it compiled but launching the minimal program failed with this message in the terminal:
Code: [Select]
dyld: Library not loaded: @rpath/sfml-graphics.framework/Versions/2.5.1/sfml-graphics
  Referenced from: /usr/local/lib/libtgui-d.0.9.1.dylib
  Reason: image not found
Abort trap: 6
Thanks for replying...
Installation help / Re: Help getting TGUI running - OpenGL
« Last post by texus on 01 May 2021, 09:07:40 »
The error about SFViewController means that your project is linking to both the SFML framework and the dylib file, while you should only link to one of them.

The opengl error is probably caused because one SFML version gets initialized properly while the second one isn't initialized and believes it has no opengl support.

In your project you are probably only linking to one of these versions, but TGUI will be linking to the other one. You need to make certain to use the same SFML version in your project and when building TGUI. So how did you install TGUI exactly?
Installation help / Help getting TGUI running - OpenGL
« Last post by johnnywz00 on 01 May 2021, 03:39:34 »
I'm using CodeLite 12.0.3 on MacOS 10.14.2, with SFML 2.5.1 (I think correctly) installed.
I can start a new project and paste in the minimal TGUI code and it will compile and open a blank window. However, the terminal displays this notice when it runs:
Code: [Select]
objc[9998]: Class SFViewController is implemented in both /Library/Frameworks/./sfml-window.framework/Versions/2.5.1/sfml-window (0x10fbd30a8) and /usr/local/lib/libsfml-window.2.5.dylib (0x10d8120a8). One of the two will be used. Which one is undefined.
, along with the same notice for about 7 other Classes.

Then, if I try to add a Button to the GUI object, it compiles, but in the terminal I get:
Code: [Select]
sfml-graphics requires support for OpenGL 1.1 or greater
Ensure that hardware acceleration is enabled if available

Do I need extra software or settings in order to run TGUI without any hitches? Thanks!
I should mention, that I'm pretty new to C++, so all the config is still a little bewildering for me...

John Ziegler
Help requests / Re: tgui::FileDialog within a pop-up window.
« Last post by DJuego on 24 April 2021, 13:53:18 »
Thank you very much for your quick response!  :D

First of all thank you for the great effort you have put into TGUI. It is a GUI that I love! I recently upgraded to 0.9.1 (I actually use the "master") and it just keeps getting better and better. I am also delighted with the gui-builder. It helps a lot!!  :-*

I suspected it. I understand this TGUI limitation. I had several alternatives in mind but the one you have proposed is by far the best. I have tested portable-file-dialogs and it does perfectly what I wanted. Also, I like its simplicity and header-only nature. Thanks for that too!

Help requests / Re: tgui::FileDialog within a pop-up window.
« Last post by texus on 23 April 2021, 22:23:45 »
TGUI is probably not the best option for such case. The FileDialog widget was added in cases where you basically wouldn't want to have an external window.

You might be better of using something like or
Help requests / tgui::FileDialog within a pop-up window.
« Last post by DJuego on 23 April 2021, 21:37:25 »
Hi! I am using the new FileDialog Widget for the first time.  I can manipulate the dialog box inside the RenderWindow. Good.

However I am not able to create the dialog box in a separate, independent window that I can move freely across the desktop.  :( Maybe it is not possible? And if possible, can you direct me to an example code?

An animated GIF showing the result obtained so far:



Feature requests / Re: Virtual keyboard
« Last post by eugustus on 05 April 2021, 13:21:51 »
I'll Try to implement something. But it won't be in closely the days, I stumble into a new housing ... But I have to emphasize that I don't have to recall gui.handleEvent(...) inside the event handler again ..
Pages: 1 2 [3] 4 5 ... 10