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 - Heinrich

#51
Feature requests / focusPrevious()
29 August 2013, 13:07:31
Hello again,

How about you add focusPrevious() to widget class. So you can easily make your gui keyboard navigable. Of course you could do this by retaining some pointers to the widgets and handle it all manually, but in the simplest case, you would add some buttons and call focusNext() and focusPrevious() when Left or Right key is pressed.
I suppose I could do this as well by adding the widgets into a grid and use get(), but it would be a nice convenience function.
Also, I added some small issue on your bug tracker, which is well hidden.

glhf
Heinrich
#52
Hi texus,

I edited my reply while you posted. I think I answered your question there with my use case. Next time I will respond more assiduously.
#53
"I think it would make my code unnecessary more complicated if I would implement what you are proposing."
Maybe.
"I don't think this is needed."
I'd use it :D

However. I haven't done much with tgui except compiling the lib and playing around with example code.
Is it possible to define several buttons? From the .conf I got the idea that there was only one button figured it out. Well, it would be a nice feature to only need one image file and be able to use it for multiple button sizes. My concrete use case was, that I wanted a menu/message boxes with rounded rectangle borders. Sizes of the message boxes would vary with length of text in both x- and y- direction.

Generally, I don't think having different Button sizes is an outlandish idea. Also thanks for fast reply.
#54
First of all: Gute Arbeit! Good Work!

My proposal:
To have a size independant gui without scaling artifacts  you need to be able to split in vertical direction also.

Instead of
xxx_L, xxx_M and xxx_R
you would need to define upper left corner, lower left corner, upper middle part, lower middle part, left middle part, right middle part, upper right corner and lower left corner.

Sounds like a bunch.
But wait, assuming your button symmetrical, you might get away with one corner, one middle part, and the middle. You'd just need to mirror each part accordingly. Which btw you could also do in the old splitimage with the left and right parts.

What do you think?