Main Menu
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

Topics - china92

#1
IMHO it would be better if it returns sf::Vector2u, because then we'll be able to simply do this:
Code (cpp) Select
object.setPosition(object2.getPosition() + callback.mouse);

I mean - operators would work, and this way is much more convenient.

Here is an example from my tower defense: I'm putting a callback at some object, and after this I want to put turret in a place where mouse cursor occur. Since callback.mouse returns only local bounds from the object where callback was sent, I have to add some coordinates to make sure that turret will be in a correct place.

What do you think, texus?
#2
I don't know if it is an bug in tgui/sfml, or I wrote something in a wrong way, but I have a problem.

Right now I'm trying to make my own tgui::ChildWindow with turrets (TurretWindow). I already made my own tgui::Panel (InformationPanel), which displays Informations (and 'latches' it).

Informations contains pointer to a texture, and list of strings, InformationPanel puts string into labels and copy the texture from Informations. Texture in InformationPanel is displayed by using setBackgtoundTexture on tgui::Panel named 'image'.

Right now I added some turrets into a TurretWindow, but only the last InformationPanel displays texture correctly and I don't know why...

I'm attaching code, and asking for help.
#3
Feature requests / Loading tgui::Picture
25 May 2013, 15:41:45
Is there any plans for other methods of loading tgui::Picture? It would be nice if tgui::Picture could be loaded from sf::Image or sf::Texture.
Right now I have to do a small workaround like this:

Code (cpp) Select
sf::Image test;
tgui::Picture::Ptr test2(some group);

test.saveToFile("temp.png");
test2->load("temp.png");


@Edit
To ensure the getLoadedFilename() method compatibility it could return empty string if tgui::Picture is loaded from sf::Image/sf::Texture.
#4
General Discussion / SetTextSize issue
24 May 2013, 16:51:05
Does setTextSize work for buttons? I'm trying to use this function, but it looks like it isn't working.

Right now size of the text in the button is set to maximum value that the text fits in the button.

Is there any site where I can report bugs?