+ Reply to Thread
Results 1 to 5 of 5

  Click here to go to the first Rift Team post in this thread.   Thread: UI elements -- how do I displayed webs?

  1. #1
    Ascendant the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default UI elements -- how do I displayed webs?

    Okay, starting to mess with frames for the first time, so I'm doubtless running way behind.

    1. I want to create a frame, but not display it. Right now, if I do a :CreateFrame, it appears that the frame is displayed for, well, one frame before I get a chance to do anything; even if I immediately do a :SetVisible(false).

    So for instance:

    ls.ui = UI.CreateContext("LootSorter")
    ls.ui:SetVisible(false)
    ls.window = UI.CreateFrame("RiftWindow", "LootSorter", ls.ui)
    ls.window:SetVisible(false)
    ls.ui:SetVisible(true)

    results in the window flashing on screen before I actually want to open it. I can just not create it until I plan to show it, but it seems to me that some Fancy UI Tricks might want very much to be able to create and manipulate a frame in some detail before revealing it.

    Also, it appears that a RiftWindow does not intrinsically have draggable regions (like the title bar) or resize widgets. Is there a way to request these or do I have to implement them (or use someone else's implementation)?
    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
    Ascendant the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default

    Hmm. Okay, maybe I suck at UI code more than I thought I did.

    What is the relationship between font size and, say, the units in which the UI is drawn? Like, say I want to lay out a series of lines of text in a window; what's the clean way to figure out how far apart they need to be?
    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!)

  3. #3
    Ascendant the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default

    Okay, I just spent a while being stumped, but I think I get it.

    I set a bunch of event handlers on a RiftWindow frame. No luck. Nothing happens.

    Messing around, I find that setting them on Window:GetContent() works. Am I correct in guessing that the reason is that the Content and Border objects are both logically in front of the window, and furthermore, start out grabbing events?
    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!)

  4.   This is the last Rift Team post in this thread.   #4
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by the_real_seebs View Post
    Okay, I just spent a while being stumped, but I think I get it.

    I set a bunch of event handlers on a RiftWindow frame. No luck. Nothing happens.

    Messing around, I find that setting them on Window:GetContent() works. Am I correct in guessing that the reason is that the Content and Border objects are both logically in front of the window, and furthermore, start out grabbing events?
    Correct. That can be disabled, but you *probably* just want to put events on the Border.

  5. #5
    Ascendant the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default

    Okay, this is too weird and I do not understand it.

    Can someone explain for me the relationship between a RiftWindow object and its GetBorder() and GetContent() methods?

    What finally convinced me that I have no clue at all what's going on is discovering that setting window.Event.WheelForward caused window:GetBorder().Event.WheelForward to change. ... note that I can't reproduce this. So I may have botched that test.

    What I've found out:

    * GetContent() yields an element which doesn't seem to DO anything. I am guessing it's intended to be a thing which has the borders of the space inside the window borders, but I can't see it. I can't set its color, either; :SetBackgroundColor() pukes when invoked on either GetContent() or GetBorder().
    * As noted, :SetBackgroundColor() doesn't seem to work with the GetContent() or GetBorder() things.
    * Nonetheless, :GetBorder() is a different object, and :GetBorder().Event is likewise a different object from the window.
    * Setting events on :GetBorder() appears to have no effect whatsoever. Possibly because something else is in front of it? Except that now it's working. I Didn't Change Anything (TM).
    * I have very strange interactions between attempts to catch LeftDown/LeftUp in :GetBorder() and attempts to catch LeftClick in frames inside the frame.

    I think what's going wrong is that in some cases, if the frame hasn't caught up with where it will eventually be moved, the LeftUp can happen inside the content window, which then eats it and the border never sees it...

    In any event, I am thoroughly confused. But I appear to have a window in which I can tell what fields were clicked on.
    Last edited by the_real_seebs; 11-18-2011 at 08:41 PM.
    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!)

+ 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