Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
41
Feature requests / Re: Add table widget
« Last post by Kvaz1r on 16 September 2019, 19:54:03 »
great, thank you
42
Feature requests / Re: Add table widget
« Last post by texus on 16 September 2019, 19:49:19 »
I made setItemColor virtual now.
43
Feature requests / Re: Add table widget
« Last post by Kvaz1r on 16 September 2019, 19:48:11 »
Yes, you're right, it's my mistake.
44
Feature requests / Re: Missing .pdb files
« Last post by Ardent Coder on 16 September 2019, 19:16:19 »
Thank you
45
Feature requests / Re: Add table widget
« Last post by texus on 16 September 2019, 19:13:15 »
Isn't making just setItemColor virtual enough, as the other will just call that function? Or do you have something that needs to be changed in these functions as well?
46
Feature requests / Re: Missing .pdb files
« Last post by texus on 16 September 2019, 19:09:30 »
I'll look into it in the near future. The next TGUI build is likely to happen on a completely different PC anyway so I'll make the changes to copy the pdb files with the library then.
47
Feature requests / Missing .pdb files
« Last post by Ardent Coder on 16 September 2019, 14:29:36 »
The lib folder does not contain the corresponding .pdb files of the libraries. You should distribute the .pdb files along with the libraries or embed them into the libraries while building them so that the users of your library does not get a linker warning. It will also help us debug our programs better.
48
Feature requests / Re: Add table widget
« Last post by Kvaz1r on 16 September 2019, 11:52:25 »
Right. So now it's only requires set "colour" functions setItemColor/updateSelectedAndhoveredItemColors/updateItemColors as virtual so it could be reused in inherited class. Is it possible?
49
Help requests / Re: Converting TGUI 0.6 project to TGUI 0.8.5
« Last post by texus on 16 September 2019, 08:26:15 »
std::ref doesn't cause any issues, it is only with std::bind where you need to either change your code or update to the github version.

The code isn't really crashing, it is throwing a tgui::Exception that you don't catch which tells you that there is no "clicked" event in ListBox.

Also, these bound parameters might not do what you want it to do. You are getting the selected item at the time of calling the connect function, so when the callback happens these parameters will always be the same. You should just leave a parameter unbound if you want TGUI to fill it in with the actually selected item.
void PlaylistClicked1(tgui::Gui& gui, int selectItem) { } // Only supported with version from github
void PlaylistClicked2(tgui::Gui& gui, sf::String str_ItemText) { }
void PlaylistClicked3(tgui::Gui& gui, sf::String str_ItemText, sf::String str_ItemId) { }
listBox->connect("ItemSelected", PlaylistClicked1, std::ref(gui));
listBox->connect("ItemSelected", PlaylistClicked2, std::ref(gui));
listBox->connect("ItemSelected", PlaylistClicked3, std::ref(gui));

In the github version you can replace "ItemSelected" with tgui::Signals::ListBox::ItemSelected. With autocomplete, this way you could get hints about what signals exist.
50
Help requests / Re: Converting TGUI 0.6 project to TGUI 0.8.5
« Last post by Hexile on 16 September 2019, 00:26:27 »
not bind, but std::ref like mentioned in the 0.8 tutorials.

After poking cmake with a stick i could get the sln file and compile tgui from github. the errors have been sorted out. Though i think i misunderstood something as my application is crashing when setting up a "signal"

Code: [Select]
listBox->connect( "clicked", PlaylistClicked, std::ref( gui ), listBox->getSelectedItemIndex(), listBox->getSelectedItemId(), listBox->getSelectedItem() );
Code: [Select]
void PlaylistClicked( tgui::Gui& gui, int selectItem, sf::String str_ItemId, sf::String str_ItemText ) { std::cout << "Playlist Clicked\n"; }
Pages: 1 ... 3 4 [5] 6 7 ... 10