+ Reply to Thread
Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By Baanano

Thread: RiftTextfield: What would make this better?

  1. #1
    RIFT Community Ambassador the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default RiftTextfield: What would make this better?

    Okay, the RiftTextfield is in a sort of dysfunctional shape in a few ways.

    Here's my sort of wishlist for it:

    :SetFontSize, :SetFontColor, :SetFont
    Pretty obvious.

    :SetWordwrap
    This turns out to be insanely hard, if not impossible, to implement by hand.

    :GetTextWidth, :GetTextHeight
    RiftTextField frames don't autoresize. That's fine, but it'd sure be nice to have a way to find out how big the text is without spamming updates to a hidden frame.

    Now on to the fancy stuff. It would be really nice to be able to turn tabs and newlines on and off. It makes sense to ignore them by default, but the way it's implemented is a bit odd -- the typing hooks do weird things, like deleting selected text in some cases when you type them -- so we end up with idioms like "insert a tab followed by a space, and SetSelection to the space".

    It appears that KeyDown, KeyType, etc. are all happening BEFORE the API has gotten to actually processing an event -- but they don't prevent the event from occurring afterwards, so you have to plan for what it will do.

    Proposed solution:
    1. Key* event hooks should be able to indicate that the event has been fully processed and that the UI should stop now. Maybe by returning a value.
    2. Maybe a new :SetBehavior() which takes options like 'default', 'multiline', etc., which change specific behaviors.

    Obviously, this is bigger than we're likely to see by 1.8.

    Of this, the only one that's really a problem is the wordwrap. I can't find a way to work around that.
    You can play WoW in any MMO. You don't have to play WoW in RIFT. Oh, and no, RIFT is not a WoW clone. Not having fun any more? Learn to play, noob! I don't speak for Riftui, but I moderate stuff there. Just came back? Welcome back! Here's what's changed. (Updated for 2.5!)

  2. #2
    Plane Touched
    Join Date
    Feb 2012
    Posts
    228

    Default

    KeyFocusGain works in a weird way too. If you change cursor & position inside its handler, it sometimes doesn't work.

    Two more API calls for the wishlist:
    :SetSelectionFontColor
    :SetSelectionBackgroundColor

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts