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.

Messages - roccio

Pages: [1] 2 3 4
Help requests / Re: menu bar colors when enabled/disabled
« on: 10 August 2019, 16:26:52 »
Thanks fot the help, will try your solution to change the text.

Fot the future I like most the first solution as it is more clear and more consistent with the other functions.
The image would be a great update, but better would be to have a checkbox.

Best regards

Help requests / Re: menu bar colors when enabled/disabled
« on: 09 August 2019, 14:07:32 »
Another question: is there a way to change the menu item text?
I need it to show if an item is selected or not (adding a character in front like this:


Help requests / menu bar colors when enabled/disabled
« on: 09 August 2019, 10:44:44 »
I have a little problem with the menu bar.

I have created a menu

Code: [Select]
auto menu = tgui::MenuBar::create();
menu->getRenderer()->setTextColorDisabled(sf::Color(229*1, 131*0, 4*0));

and then in the main window loop I use two keypresses for enable or disable the menu:

Code: [Select]
if (event.key.code == sf::Keyboard::A)
else if (event.key.code == sf::Keyboard::S)

The menu is correctly enabled/disabled by the two events, but the problem is that when disabled the menu ites are rendered in RED, but when I reenable the menu the items are again in red untill I move the mouse over them.

Is there something I miss to get the items of the correct color?

Help requests / Re: scrollablepanel & combobox (0.8)
« on: 25 June 2018, 15:48:41 »
Ok, thank you, your fix works fine.

Help requests / scrollablepanel & combobox (0.8)
« on: 22 June 2018, 11:35:58 »
I'm using v0.8 with visual studio 2017 and I have a problem.

I have a scrollable panel and inside this I have a combobox. The problem is when I scroll the panel and then try to  open the combobox for selecting a value. The list is scrolled down, and is displayed in incorrect position, even outside the panel (so that is impossible to see).

Any thought?

Thank you

Help requests / Re: v0.8-dev - Passing custom parameters
« on: 16 May 2018, 09:39:28 »
Still have the same error (Visual C++ 2015 reports error C2075).

Code: [Select]
class PanelClient
    void windowChooseKey(const std::string& textbox)
        std::cout << "Here I am" << std::endl;

 later in code...

Code: [Select]
button->connect("pressed", &PanelClient::windowChooseKey, this, "txtWindowShowKey" );

When compiling error C2075

Help requests / Re: v0.8-dev - Picture signals
« on: 16 May 2018, 09:18:19 »
Sorry, but the test code was made just for an example. In my real code I have put a breakpoint and it never stops.
I have tried to change the test with std::cout as you wrote, but I got nothing in my console (neither stops if I put a breakpoint in the function).

I am using VC2015 under windows 10 (1803)

Help requests / v0.8-dev - Picture signals
« on: 15 May 2018, 16:58:19 »
Hello again :)
I have a problem with the picture widget. I am trying to connect it with a DoubleClicked signal, but it seems not to fire.

Code: [Select]
int Test()
sf::RenderWindow window;
tgui::Gui gui;

window.create(sf::VideoMode(800, 600), "test", sf::Style::Close);


sf::Texture texture;

tgui::Picture::Ptr picture = tgui::Picture::create();
picture->connect("DoubleClicked", []() {printf("Pressed"); });

while (window.isOpen())
sf::Event event;
while (window.pollEvent(event))
if (event.type == sf::Event::Closed)
return 0;

window.clear(sf::Color(223, 223, 223));

return 1;

Am I missing something?

Help requests / v0.8-dev - Passing custom parameters
« on: 15 May 2018, 13:57:51 »
Hello, I have not understand how to correctly pass custom parameters is signal functions.
In my case I have a class member function that has 1 parameter as input

Code: [Select]
void PanelClient::windowChooseKey(const std::string& textbox)
I connect this function to a button press

Code: [Select]
button->connect("pressed", &PanelClient::windowChooseKey, "txtWindowShowHideKey", this);
but I am not able to compile.

What's the correct way of doing this?

Help requests / Re: Listbox signals
« on: 11 May 2018, 13:41:08 »
good  ;)

Help requests / Re: Listbox signals
« on: 11 May 2018, 13:13:20 »
Hi again, I have a problem with the listbox, maybe I'm doing something wrong. My program crashes when I call listbox->removeAllItems() and points to ListBox.cpp line 916 (   m_items[m_hoveringItem].setColor(m_textColorCached);)

I'm using VC 2015 and shared libs:

Code: [Select]
void Test()
sf::RenderWindow window({ 600,600 }, "test");
tgui::Gui gui(window);
tgui::ListBox::Ptr listbox = tgui::ListBox::create();


listbox->connect("MousePressed", [=]() { listbox->removeAllItems(); });

while (window.isOpen())
sf::Event event;
while (window.pollEvent(event))
if (event.type == sf::Event::Closed)



Help requests / Re: MenuBar problem
« on: 11 May 2018, 09:12:17 »
Seems to work well now.
Thank you, great work!

Help requests / Re: Listbox signals
« on: 10 May 2018, 16:57:02 »
Ok, thank, this worked perfectly!

Help requests / Re: MenuBar problem
« on: 10 May 2018, 16:36:05 »
To not have the error you can comment the gui.add(menu) line OR gui.setFont(font);


Help requests / Listbox signals
« on: 10 May 2018, 16:31:37 »
I have some problems going from 0.7 to 0.8 regarding the signals and in particular the old connectEx functions.
In example I had a function called when an item in a list box is selected. The function passed to the old connectEx used a parameter Callback that reported the selectedItemId.

How can I get the same with the new signal system?

Sorry for the noob question, but I have not found any tutorial...

Pages: [1] 2 3 4