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. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  4. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  5. 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. burner89

    burner89

    Joined:
    Mar 11, 2019
    Messages:
    31
    Resources:
    0
    Resources:
    0
    Figured all the other stuff out. This jass stuff is confusing lol.

    question:

    How do I get ORIGIN_FRAME_HERO_HP_BAR to show up without the hero image?


    Edit: Nevermind, I just detached it from the parent and moved it off the screen
     
    Last edited: Jun 19, 2019
  2. KeepVary

    KeepVary

    Joined:
    May 12, 2019
    Messages:
    12
    Resources:
    0
    Resources:
    0
    Is there any way to get framehandle of the origin chat editbox? I'm not sure if it is a normal frame.
     
  3. wc3neverdies

    wc3neverdies

    Joined:
    Sep 20, 2015
    Messages:
    369
    Resources:
    1
    Maps:
    1
    Resources:
    1
    While i was testing this i found out that if you hide all the origin frames and select a unit and then click on the position on the portrait on the screen it still center the camera to that unit. I tired to use
    Code (vJASS):
    BlzDestroyFrame

    But the game crashes
     
  4. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,484
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    Maybe try to reduce the size of the portrait instead by posing FRAMEPOINT_TOPLEFT and FRAMEPOINT_BOTTOMRIGHT close to each other.
     
  5. wc3neverdies

    wc3neverdies

    Joined:
    Sep 20, 2015
    Messages:
    369
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I will try this, thank you
     
  6. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,427
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Awesome reference. Approved!
     
  7. lishi1608

    lishi1608

    Joined:
    Oct 9, 2012
    Messages:
    28
    Resources:
    0
    Resources:
    0
    Is there an fdf file for the OriginFrames? What if I want to make extra inventory UIs, do I need to write a new fdf from scratch, and handle events, tooltips, icons?
     
  8. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,484
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    I did not find any inventory fdf. Currently one would have to recreate the whole behaviour when one wants additional visible/clickable inventory slots. With everything that your map needs of them which includes probably: control click events, tooltips, icons, cooldown models and charges.
    Each inventory slot would be a GLUEBUTTON, BUTTON or SIMPLEBUTTON.

    If you find basic types you can use. Then you don't need to create a new fdf, Althrough fdf is cleaner and more powerful if it works.
     
  9. Killd0zer

    Killd0zer

    Joined:
    Jun 14, 2009
    Messages:
    235
    Resources:
    0
    Resources:
    0
    Do you know if these methods could be used to modify tooltips? Like to get the text within a tooltips and change it?
     
  10. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,484
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    I tend to no. Even if one could, how would you know which tooltip you have their?
     
  11. lishi1608

    lishi1608

    Joined:
    Oct 9, 2012
    Messages:
    28
    Resources:
    0
    Resources:
    0
    Thanks for your reply. I thought it would be easier with new natives. sigh..
     
  12. xorkatoss

    xorkatoss

    Joined:
    Jul 12, 2010
    Messages:
    1,584
    Resources:
    7
    Models:
    5
    Maps:
    1
    Spells:
    1
    Resources:
    7
    @Tasyen goes at it again with the epic UI modifications!

    Nobody gonna mention this?
    WC3ScrnShot_071519_001.jpg

    It shows when selection is clear, when you select an item on the ground and when you select an enemy unit without inventory.

    Is it possible to hide that without hiding the whole Inventory UI?
     
    Last edited: Jul 14, 2019
  13. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,484
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    Its a consequence of showing the parent of "SimpleInfoPanelUnitDetail". Which enable the inventory, the item on ground info, the destructable screen and that texture.
    If one would only need to show the inventory and the unit stats. One can shift the parentship to the command buttons parent then one sees the itembuttons only when one has selected an unit.
    Code (vJASS):

    call BlzFrameSetParent(BlzGetFrameByName("SimpleInfoPanelUnitDetail",0), BlzFrameGetParent(BlzGetOriginFrame(ORIGIN_FRAME_COMMAND_BUTTON, 0))) //show Unit Detail when seeing command card
    call BlzFrameSetParent(BlzFrameGetParent(BlzGetOriginFrame(ORIGIN_FRAME_ITEM_BUTTON, 0)), BlzFrameGetParent(BlzGetOriginFrame(ORIGIN_FRAME_COMMAND_BUTTON, 0))) //show inventory when seen command card
     


    If one needs the item on the ground description / destructable feature, no idea how without that texture.
     
  14. Ungoliath

    Ungoliath

    Joined:
    Mar 15, 2010
    Messages:
    158
    Resources:
    6
    Skins:
    2
    Maps:
    4
    Resources:
    6
    I found a solution! What I did was...
    1. Locate the "HumanUITile-InventoryCover" texture through Warcraft 3 Viewer. This is the texture that pops up next to item descriptions, etc.
    2. I then saved the texture as a TGA file.
    3. I then opened the file in Photoshop and made it transparent by editing the alpha channel.

    I guess you can do this for much of the UI, as long as there's gameplay underneath?
     
    Last edited: Aug 8, 2019
  15. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,484
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    That is a solution yeah.
    Then one Imports that transparent blp into ones map overwritting the default one. But one does not need to base the blp on the default one. With a smaller blp it is also working.

    ui\console\human\humanuitile-inventorycover.blp
    ui\console\nightelf\nightelfuitile-inventorycover.blp
    ui\console\orc\orcuitile-inventorycover.blp
    ui\console\undead\undeaduitile-inventorycover.blp

    To get rid of the inventory text one replaces the text in game interface to " " (a single space) of the field INVENTORY.
     
  16. Aniki

    Aniki

    Joined:
    Nov 7, 2014
    Messages:
    524
    Resources:
    4
    Spells:
    1
    JASS:
    3
    Resources:
    4
    How does one revert ORIGIN_FRAME_WORLD_FRAME back to its "non-fullscreen" points?

    This seems to work but the values might be wrong...
    Code (Lua):

    local f = BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0)
    local r = BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)

    local pt

    pt = FRAMEPOINT_BOTTOMLEFT
    BlzFrameSetPoint(f, pt, r, pt, 0.0, 0.13)

    pt = FRAMEPOINT_BOTTOMRIGHT
    BlzFrameSetPoint(f, pt, r, pt, 0.0, 0.13)

    pt = FRAMEPOINT_TOPRIGHT
    BlzFrameSetPoint(f, pt, r, pt, 0.0, -0.020)

    pt = FRAMEPOINT_TOPLEFT
    BlzFrameSetPoint(f, pt, r, pt, 0.0, -0.020)
     
     
  17. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,484
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    The values look good to me.

    The Reforge Beta (nov 19 2019) has access to that frame one can just set its alpha to 0 and it is not visible anymore.
    call BlzFrameSetAlpha( BlzGetFrameByName("SimpleInventoryCover", 0), 0)



    After one has hidden the default UI the Item Buttons Slots don't have a background anymore but still block the screen. Might good to know where they are by giving them the backgrounds back.
     

    Attached Files:

    Last edited: Nov 21, 2019
  18. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,484
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    call BlzEnableUIAutoPosition(false)
    stops the game from reposing some UI-Frames when the User swaps resolution or window mode.
     
  19. Varimathras.

    Varimathras.

    Joined:
    Jul 9, 2007
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Hey Tasyen,

    Thanks for the amazing tutorials!

    Now with reforged online, I found that with BlzHideOriginFrames() you are left with a black bar at the bottom at the width of the 4:3 screen.
    You can get rid of it with BlzFrameSetVisible(BlzGetFrameByName("ConsoleUIBackdrop",0), false).
    Maybe you could update your tutorial in that part?

    I also have a question:
    I seem to be unable to put frames outside the 4:3 screen. Even when I anchor something to the top-right of ORIGIN_FRAME_WORLD_FRAME, it will still be in the 4:3 screen. Also, if I add a positive offset in x, the frame will but cut off at the edge of the 4:3 screen.
    Do you have a solution to this? I think it should be possible because the ORIGIN_FRAME_HERO_BAR is also outside, anchored to the left of the screen.
    However, I couldn't find its fdf in ui/framedef/ui/.

    Code (Text):
    frame = BlzCreateFrameByType("BACKDROP", "myframe", BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), "", 0)
    --BlzFrameSetPoint(frame, FRAMEPOINT_TOPRIGHT, BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), FRAMEPOINT_TOPRIGHT, -0.01, -0.06)
    BlzFrameSetPoint(frame, FRAMEPOINT_TOPRIGHT, BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), FRAMEPOINT_TOPRIGHT, 0.1, -0.06)
    BlzFrameSetSize(frame, 0.2, 0.3)
    BlzFrameSetTexture(frame, "Textures\\black32.blp", 0, true)
     
  20. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,484
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    The infos were already there, but yeah should be the default one, the old is now in a hidden tag, I did not update the map, uploaded another one for reforged.

    Not really. For some reasons custom Frames can not leave the 4:3 Screen, I say custom cause there are Frames that can leave it like Multiboards, TimerDialogs, LeaderBoard unsure about that Hero Buttons they could be simple frames which would free them anyway from the restriction. Currently only custom SimpleFrames can leave the 4:3 Part.
     
    Last edited: Feb 14, 2020