Tabbed focus selecting?

thecaptain

05-02-2008 05:56:35

I think this has been discussed a while back, but I was wondering if this has been thought about recently. Basically, just like in windows, it'd be nice to be able to hit tab and have focus shift to the next widget, and then be able to hit enter and then the appropriate button would register a hit. Of course, the user code would have to specify the tab order, but it probably wouldn't be too hard to code up. I think there is already the concept of a widget focus, right?

Let me know what you think about it.

kungfoomasta

05-02-2008 06:40:51

We should definately have it. 8)

I'm just not sure if I want to squeeze it in before the next release, I keep finding important things to toss in, I'll never hit the next milestone at this rate! :lol:

In winforms, the tab order is applied to all widgets on one form. However since we're inside a Render Window, we have Windows inside of Sheets, Panels inside of Windows or Sheets, etc. It seems that tab order functionality, as in actually tabbing to focus other widgets, should be allowed in Panel/Window/Sheet classes, right? At first I thought this might be tricky to implement, but it actually seems pretty easy now..

Panel::tabForward
Panel::tabBackward

Can you think of more intuitive/meaningful/appropriate names?

thecaptain

05-02-2008 22:39:18

Yeah, let's put it in the next release, just so we get something out the door 8) How much is left to do? I'd definitely like to help fix some bugs/fill out some features if that's holding it up.

I think what you said about putting it in panels is really straightforward and makes sense. However, you may want to name them

Panel::tabFocusForward
Panel::tabFocusBackward

Just for added clarity, but that doesn't really matter (especially if they're well commented :)) Come to think of it, I guess commenting might be another TODO for this release...

kungfoomasta

05-02-2008 23:11:25

There is nothing really blocking, however if you could investigate the issue of highlighting text with the mouse cursor, that would be most helpful. In the demo you can reproduce the issue by navigating to the beginning of the Username textbox, and trying to highlight the rest of the textbox contents using the mouse.

These are the remaining tasks, which I can do fairly easily, I hope:

- update progress bar to use skinset entirely, right now it grabs the image from disk to create the bar image.
- update borders to automatically get thickness from image dimensions by default.
- update the skin for buttons by separating borders into stand alone images.
- update button/NStateButton to apply down/over images to borders.
- create/update documentation in code

If you can help me with the text issue, v0.9.7 will be an extremely good base to work with. :)

thecaptain

06-02-2008 03:31:15

Sure thing, I'll take a look at that bug. The rest of the stuff doesn't look like it'll take too long, so that's great news.

As far as the textcursor bug I was referring to earlier, here's a screenshot of what I'm talking about:



Notice the little white vertical line in the upper left corner. That's actually the text position cursor being drawn there, due to incorrect clipping. Can you reproduce it? I notice it anytime I have a textbox on the sheet.

thecaptain

06-02-2008 03:34:40

Correction: I reverted my demo code just to see, and it's not there anymore. I'll tell you if I find the problem again.

kungfoomasta

06-02-2008 03:46:49

The updating of the Progress Bar is a little more difficult than I thought. I'm far from experienced when it comes to pixel manipulation. :(

http://www.ogre3d.org/phpBB2/viewtopic.php?p=269345#269345

Will work on the rest of the tasks I listed.

thecaptain

06-02-2008 05:11:16

Hey, I committed a fix to the mouse selection bug. There is still a small issue with the last word being not drawn sometimes on the right of the textbox, and I think that has something to do with word wrapping in text. There probably will need to be a boolean switch put in that enables/disables word wrapping to fix this.

That's a bummer about the progressbar. I can take a look at it tomorrow and see if there's anything I can do. It's been a while since I wrote that code, and it could use an update 8)