1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Ride into the sunset with the 32nd Modeling Contest. The contest is optionally paired. Best of luck, people!
    Dismiss Notice
  4. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  5. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  6. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

UI: OriginFrames

Discussion in 'JASS/AI Scripts Tutorials' started by Tasyen, Jun 4, 2019.

  1. dhguardianes

    dhguardianes

    Joined:
    Jun 19, 2011
    Messages:
    82
    Resources:
    13
    Models:
    10
    Skins:
    1
    Maps:
    2
    Resources:
    13
    Hey Tasyen, I want to move the minimap but no matter which ways i tried, i couldn't manage to do it. Can you show me how? Thanks
     
  2. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,485
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    One needs to set 2 opposite corner Points to move the minimap, a Lua example.

    Code (Lua):
    TimerStart(CreateTimer(),0,false, function()
        local frame = BlzGetOriginFrame(ORIGIN_FRAME_MINIMAP, 0)
        BlzFrameSetAbsPoint(frame, FRAMEPOINT_BOTTOMLEFT, 0.2, 0.2)
        BlzFrameSetAbsPoint(frame, FRAMEPOINT_TOPRIGHT, 0.4, 0.4)
    end)
     
     
  3. bgcy_ro002

    bgcy_ro002

    Joined:
    Sep 6, 2013
    Messages:
    13
    Resources:
    2
    Icons:
    1
    Skins:
    1
    Resources:
    2
    Hello Tasyen,

    I want mouse click to console interface area and keep the console buttons (i just move the buttons).
    It seems that the console interface area is still hidden there.
    i tried fucntion
    Code (Text):
    BlzFrameSetAbsPoint(BlzGetFrameByName("ConsoleUI", 0), FRAMEPOINT_BOTTOM, 0.4, -0.18)
    but button position is deviated.

    Could you help me how to mouse click to console interface area and keep the console buttons?

    upload_2020-3-8_1-30-26.png
     
  4. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,485
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    Did you use that line at map init?
    Code (vJASS):
    BlzFrameSetAbsPoint(BlzGetFrameByName("ConsoleUI", 0), FRAMEPOINT_BOTTOM, 0.4, -0.18)

    After the console was moved on can move the Command Buttons at for examaple 0.0s.
     
  5. bgcy_ro002

    bgcy_ro002

    Joined:
    Sep 6, 2013
    Messages:
    13
    Resources:
    2
    Icons:
    1
    Skins:
    1
    Resources:
    2
    I have understood my problem.
    Thank you.
     
  6. watterboy

    watterboy

    Joined:
    Jan 20, 2020
    Messages:
    18
    Resources:
    0
    Resources:
    0
    So how exactly do I show the inventory of units after I've hidden origin frames and the console background?
    This doesn't seem to work:
    call BlzFrameSetVisible(BlzGetFrameByName("ORIGIN_FRAME_ITEM_BUTTON", 0), true)
     
  7. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,485
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    Hide origin Frames does not hide the item buttons itself, it hides one of their ancestors. A Frame needs all of his ancestor-Frames visible, to be visible itself.
    The item buttons are an offspring of the Parent of the bottom center Unit Info Panel, hence you will end up with both of them visible.
    If that is not a problem then this line of code would show them:
    BlzFrameSetVisible(BlzFrameGetParent(BlzGetFrameByName("SimpleInfoPanelUnitDetail", 0)), true)


    In the past I suggested to change parentship of the item buttons. But doing that stoped the item cooldown models form being shown.
     
  8. watterboy

    watterboy

    Joined:
    Jan 20, 2020
    Messages:
    18
    Resources:
    0
    Resources:
    0
    Thank you for elaborating! All these scripts befuddle me - these all seem extremely useful; I just wish Blizz built all of this stuff into the GUI; SC2 had more UI related stuff built right into its trigger editor - I was surprised to see that they didn't do the same with Reforged.
     
  9. watterboy

    watterboy

    Joined:
    Jan 20, 2020
    Messages:
    18
    Resources:
    0
    Resources:
    0
    One other thing - is it normal that when you go in and out of cinematic mode that the game messes up the UI? I've been having to re-run the hide origins scripts whenever I go out of cinematic mode, but I may be doing something wrong
     
  10. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,485
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    In reforged that happens to me as well (but not in 1.31.1). The bottom Center Unit Info Frames and the Portrait are visible again after having Entered & Left the cinimatic mode.

    Warcraft 3's GUI Triggers misses a lot of features that the game provide, even outside of this frame-UI features.