Menu

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.

Show posts Menu

Messages - pbortler

#1
Help requests / Re: How do you connect in 0.9?
11 September 2020, 00:25:13
It seems that I need to pollute my code with now-necessary type names in order to get your tgui::String to convert into either sf::String or std::string accordingly. This is very ugly.

I'm giving up on 0.9. Could you backport the fixes to the widgets to 0.8 before proceeding any further with 0.9? Thanks.
#2
Help requests / Re: How do you connect in 0.9?
11 September 2020, 00:10:26
Also, How do you set a view? I used to be able to call gui.setView(sfView) but this no longer works.

I see that setView no longer exists and setRelativeView presumably should be used, but setRelativeView doesn't take a sensible obiect that can be converted into the parameter it desires. I can no longer pass in a sf::View, or even the result of sf::View::getViewport() even though it claims it is looking for a FloatRect (error converting between sf::FloatRect and tgui::FloatRect).

What's the trick to setting a view in 0.9?
#3
Help requests / How do you connect in 0.9?
11 September 2020, 00:06:15
How do you connect in 0.9? I used to be able to pass a function to listbox->connect("ItemPressed", cb) but I can no longer do this. listbox->onItemSelect.connect(cb); produces an error, as does passing (&cb).

What's the trick to getting connect to work in 0.9?

Documentation would be really helpful. Do you maybe have a younger brother or a cousin or a neighbour who could do it for you?
#4
Quote from: texus on 10 September 2020, 18:59:36
That should have worked actually. Was the scrollbar already using textures? Because a known "issue" with the scrollbar is that it has to be given textures for track, thumb and arrows or it would use colors for everything.

This was the issue. Changing all the necessary textures worked. Thanks.
#5
I can't seem to get any kind of ScrollbarRenderer from the ChatBox or the ChatBoxRenderer. I can get a RenderData object, but I can't make any use of it. Creating a ScrollbarRenderer, passing ChatBox->getRenderer()->getScrollbar() into its setData(), modifying the background texture, and using the modified ScrollbarRenderer's getData() for ChatBox->getRenderer()->setScrollbar() has no effect.

That was just a guess though, since guessing is the best I can do with no useful documentation or examples.

So what's the trick to getting access to a ChatBox ScrollbarRenderer?