+ Reply to Thread
Results 1 to 5 of 5

Thread: EntityControl

  1. #1
    Poster of Note Online status: moebius92 is offline Reputation: moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte
    Join Date
    Jan 2008
    Posts
    842

    EntityControl

    So, EntityControl's fields are:

    /eval for k, v in pairs(Turbine.UI.Lotro.EntityC ontrol) do Turbine.Shell.WriteLine(k); end

    Constructor
    SetContextMenuEnabled
    SetEntity
    GetEntity
    SetSelectionEnabled
    IsSelectionEnabled
    IsContextMenuEnabled

    Stretching an EntityControl over something you'd previously been RegisterForClickHandling, and then SetEntitying the EntityControl seems to work perfectly fine.

  2. #2
    Member Online status: Kamindra is offline Reputation: Kamindra the Wary Kamindra the Wary
    Join Date
    Jun 2007
    Posts
    61

    Re: EntityControl

    Hi Moebius,

    I'm not really sure how to use the EntityControl. Can you provide an explanation of what you mean by stretching an entity control over something?

    If I have a label on in a window, would I:
    (a) Create the control
    (b) set the parent to the same window as the label
    (c) change the size of it so that it covers the label
    (d) se the z-order so that its "on top" of the label

    Then it can get click events. Is that what's its used for? If not - what the heck is it ?


    Thanks in advance,

    Kamindra

  3. #3
    Poster of Note Online status: moebius92 is offline Reputation: moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte
    Join Date
    Jan 2008
    Posts
    842

    Re: EntityControl

    Say originally I had a window w of size x,y and an entity e which I was doing e:RegisterForClickHandling(w). Now I'd have to do:

    ec = Turbine.UI.Lotro.EntityControl ();
    ec:SetParent(w);
    ec:SetPosition(0, 0);
    ec:SetSize(x, y);
    ec:SetMouseVisible(true);
    ec:SetEntity(e);
    ec:SetSelectionEnabled(true);
    ec:SetContextMenuEnabled(true) ;

  4. #4
    Member Online status: Kamindra is offline Reputation: Kamindra the Wary Kamindra the Wary
    Join Date
    Jun 2007
    Posts
    61

    Re: EntityControl

    Thanks for this

    If we use this approach in association with an Item, can we now grab the right click events for it?


    Kam

  5. #5
    Poster of Note Online status: moebius92 is offline Reputation: moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte moebius92 the Neophyte
    Join Date
    Jan 2008
    Posts
    842

    Re: EntityControl

    Honestly? Not a clue. Up until this update I'd thought RegisterForClickHandling was an Actor thing, not an Entity thing, so it never even occurred to me to try it on items.

+ Reply to Thread

Posting Permissions

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