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.

Topics - ingar

Pages: [1]
General Discussion / Updating existing Picture widget
« on: 15 May 2019, 22:08:19 »
Hi again,

I have this scenario:

I receive a .jpg file image on TCP/IP from an external server.
So I have a byte buffer (with a given length) containing the jpg file.

So how do I update an existing Picture widget from this buffer?

I know how to create a NEW Picture widget from a buffer, using an sf::Texture in the constructor,
but isn't it a bit overkill to create a new one every time? I saw that a function tgui::Picture::setTexture was available
in version 0.78, but this function has been removed in the latest version (0.85).


General Discussion / TGUI and Unicode
« on: 07 May 2019, 21:53:12 »
Hi all,

A general question:

Are there any ways of supporting Unicode in TGUI? I am hoping to be able to replace a Windows CE application with a TGUI app. But the Windows CE app is connecting to a server that returns UTF8 data.
And I cannot see how to TGUI can display those Japanese names...


General Discussion / Triggering action from another thread
« on: 05 May 2019, 09:25:23 »

In my app I have a thread that checks if an RFID card is placed over an RFID reader. If a card is detected the app reads some data from the card. This data I would like to pass to an event handler in my main thread. Q: What's the best method for doing this in tgui?

I Windows programming, the thread typically issues a PostMessage to the main window thread, and the message handler in the main thread does the handling.


General Discussion / Re-using RenderWindow
« on: 30 April 2019, 15:50:39 »

I have a TGUI app where a screen (dialog) starts another screen (dialog) with a button.
The second screen creates an sf::RenderWindow and attaches this window to a tgui::Gui.
This works, but to construct a new sf::RenderWindow everytime takes time.

Q: Is there a way a new tgui:Gui can reuse a window used by another tgui:Gui?
     The problem, as I can see, is that the render windows also gets destroyed when the Gui is destroyed,
     so that the old Gui crashes when it continues trying to use the destroyed window.
     Perhaps sf::RenderWindow has a copy constructor that doesn't take that long time to execute,
     or there is a way of detaching a window from the Gui?


Help requests / MessageBox how to use
« on: 26 April 2019, 18:43:47 »
Hi all,

I am sure this question has been posted many times before, but anyway:

How do I display a message box in TGUI?

I have tried tgui::MessageBox::Create("Heading","Message",{"OK", "Cancel"});
Then I add it to the gui, and it displays in the upper left corner.

But how do I get the events from my buttons (OK or Cancel)?

Can someone give me a complete example. Then I can make a function that just displays the message and returns with a value.


Feature requests / tgui::Gui setting background color
« on: 21 April 2019, 18:03:38 »

One thing I miss in tgui::Gui:

Setting the background color. Because from what I can see the background color is black. I can do this by creating a Picture widget that has a specific color. But why not have a function tgui::Gui::SetBackgroundColor(...)?

Perhaps I missed something?


General Discussion / gui-builder form file decoding
« on: 12 April 2019, 10:11:13 »
Hi all,

I am very new in this. But one question:
Do I have to decode the form.txt file created by tgui-builder myself, or are there some functions I can call
for decoding the file and creating the window?

Ingar Steinsland

Feature requests / Theme constructor
« on: 12 April 2019, 09:17:55 »
I am very impressed of all the work you have done with TGUI. Out of interest: How many developers are working on the project?

Anyway, from the "widgets" test program, I was thinking of the following improvements:

1: Is it possible to add a Theme constructor that takes a theme from memory instead of from file?
    Like the "LoadFromMemory" functions in SFML? In this way, we could prevent users to tamper with
    the theme.
2: Perhaps also make a constructor for predefined themes?
    Something like:

    #define THEME_BLACK         1000
    #define THEME_GRAY           1001

    tgui::Theme theme(THEME_BLACK);

Small things, but anyway.

Ingar Steinsland

Installation help / Cannot install TGUI as STATIC library
« on: 09 April 2019, 16:58:06 »
I managed to install TGUI as Dynamic Library on my Raspberry PI 386 Debian Linux.
But, DLL dependencies in Windows and .so dependencies in Linux I do not like. In the long run it creates a lot of support issues. Therefore, I try to install TGUI as STATIC library, i.e. making a .a file. But I am running into a problem when running "cmake ." on the TGUI 0.84 source. I get this message:

SFML found but some of its dependencies are missing ( xcb-image)
CMake Error at CMakeLists.txt:206 (message):
  CMake couldn't find SFML.

The problem, I think, is finding the libxcb_image.a library. The .so library files are there:

pi@raspberry:~/TGUI-0.8.4 $ locate libxcb-image

So my question is:
1: How can I get hold of a libxcb-image.a file?
2: Or perhaps I can do something else?

Ingar Steinsland

Pages: [1]