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 - krolik

Pages: [1]
Help requests / EditBox acts strange.
« on: 06 January 2019, 23:28:02 »
I'm making a game using sfml + tgui, and for my level creator I need EditBoxes, so I made new tgui::Gui object for creator menu and loaded Widgets using loadWidgetsFromFile() function.
These Widget declarations in .txt file look like this:
EditBox.width {
    Position = (10, 40);
    DefaultText = "Number of cols...";
then, when in main menu I click button directing me to creator I'm calling this function in a loop:
void Menu::showEdit(sf::Event & event)
        if (event.type == sf::Event::Closed)
                window.clear(sf::Color::White); // clear window with white color
                editGui.draw(); // drawing loaded widgets
But with this code it doesn't work like it should, when I press any key loop manages to execute few times and I get a few characters instead of one, in addition, backspace doesn't work. I think I should change something in EditBok drawing, but I have run out of ideas, nothing seems to work so far. Could you give me some advice? I'm using TGUI 0.8. Thanks in advance :)

Pages: [1]