Some Random Questions

Illidanz

09-03-2009 13:53:02

Hello,
I was in the process of making the GUI for my game, and I'm missing a couple of things.

1) Wordwrapping List: The actual list does not wordwrap if the text is too long.
I read in another thread that this can be done with an ItemBoxV of StaticTexts. I've tried but I wasn't able to come up with something that actually worked, anyone have an example?
1b) Wordwrap in general: I'm quit confused. What widget I should use if I have some very long text (for example "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") and I would like to see it all?

2) "Fluid" Panel/StaticText: A panel that adapts its size depending on the size of the internal elements.
This is very useful for example for a descriptive tooltip, where you don't know if the Description of the object will be 1 row or 20 row maybe.

3) Texture Button: A button with a custom texture.
Like a clickable StaticImage. This can already be done via skins?

4) Moving Pinpoint: A pinpoint is a small area where you can click and drag the Panel to move it around. It's like the top of a window, but restricted to a small area. How can this be done?

5) I would also like to insert some LUA scripts that will be loaded with the Layout items, what is the best way of doing this?
For example, i could set an UserString named "Script" with the name of the LUA script to load when the widget is loaded, but how i can get notified that a specific widget has been loaded?

Any suggestion for how this things can be done is welcome :)

Thanks in advance and sorry for my english, I hope everything is understandable

Illidanz

11-03-2009 15:09:25

Anyone?

I've "resolved" only question n°5. I missed the LayoutManager::loadLayout method that returns a vector with the root widgets loaded, that's perfect

Altren

11-03-2009 16:38:16

Hello,
I was in the process of making the GUI for my game, and I'm missing a couple of things.

1) Wordwrapping List: The actual list does not wordwrap if the text is too long.
I read in another thread that this can be done with an ItemBoxV of StaticTexts. I've tried but I wasn't able to come up with something that actually worked, anyone have an example?
Sorry, no examples.

1b) Wordwrap in general: I'm quit confused. What widget I should use if I have some very long text (for example "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") and I would like to see it all?Use Edit with Word wrap enabled, but you should know that wirds breakes only throur whitespaces so one long word can't be on two lines. For long words you should use Edit with EditStretch skin (with HScroll).

2) "Fluid" Panel/StaticText: A panel that adapts its size depending on the size of the internal elements.
This is very useful for example for a descriptive tooltip, where you don't know if the Description of the object will be 1 row or 20 row maybe.
Right now only MessageBox do it and it's also simple to resize tooltip manually (this is what I do in layout editor tooltips). We also working on sizer widget, this might help.

3) Texture Button: A button with a custom texture.
Like a clickable StaticImage. This can already be done via skins?
Yes, look at MultiListButton skin as example.

4) Moving Pinpoint: A pinpoint is a small area where you can click and drag the Panel to move it around. It's like the top of a window, but restricted to a small area. How can this be done? Look at Demo_Colour.

Illidanz

11-03-2009 17:03:20

Thanks a lot Altren, I will try everything and post here if I still have some problems :)

I will try again for the list and post here the code so maybe someone can point out the problems