Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[General] Removing Parts of the UI Console

Discussion in 'World Editor Help Zone' started by GhostHunter123, Jan 27, 2020.

  1. GhostHunter123

    GhostHunter123

    Joined:
    Oct 17, 2012
    Messages:
    479
    Resources:
    1
    Spells:
    1
    Resources:
    1
    I wanted to make these sections of the UI console transparent so I can see the screen under it.

    I achieved my aim by calling the following:
    Code (vJASS):
    call BlzFrameSetAllPoints(BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0))

    Calling the function however removes the black background under the other sections of the UI console and renders units under the console. Health bars being seen through in the console looks rather fugly.

    The picture attached below is most desired.
    Reforged model.png
     
  2. Mayday

    Mayday

    Joined:
    May 1, 2018
    Messages:
    59
    Resources:
    6
    Maps:
    3
    Tutorials:
    3
    Resources:
    6
    Unfortunately, you cannot get away from HP Bars coming up through the frame. In my efforts, using what you have done to completely remove the origin frame and then overlaying an image on top of the now-hidden UI, results in this.

    The other method to have transparent borders by simply removing origin frame and importing 2 alpha images as the 05 & 06 frames also shows HP bars through the UI.
    [​IMG]
     
  3. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    2,394
    Resources:
    0
    Resources:
    0
    I swear to God if Blizzard doesn't let us hide/manipulate health bars in the near future...

    Code (Lua):

    function HideOriginUI(name, index)
        local fh = BlzGetOriginFrame(name, index)
        BlzFrameClearAllPoints(fh)
        BlzFrameSetAbsPoint(fh, FRAMEPOINT_CENTER, 3, 3)
        BlzFrameSetScale(fh, 0.001)
    end
     
    Code (Lua):

    function HideUI(name, index)
        local fh = BlzGetFrameByName(name, index)
        BlzFrameClearAllPoints(fh)
        BlzFrameSetAbsPoint(fh, FRAMEPOINT_CENTER, 3, 3)
        BlzFrameSetScale(fh, 0.001)
    end
     
    Code (Lua):

    function RunHideUI()
        for i=0,11 do
            HideOriginUI(ORIGIN_FRAME_MINIMAP, i)
            HideOriginUI(ORIGIN_FRAME_ITEM_BUTTON, i)
            HideOriginUI(ORIGIN_FRAME_COMMAND_BUTTON, i)
            HideOriginUI(ORIGIN_FRAME_SYSTEM_BUTTON, i)
            HideOriginUI(ORIGIN_FRAME_PORTRAIT, i)
            HideOriginUI(ORIGIN_FRAME_MINIMAP, i)
            HideOriginUI(ORIGIN_FRAME_MINIMAP_BUTTON, i)
            HideOriginUI(ORIGIN_FRAME_TOOLTIP, i)
            HideOriginUI(ORIGIN_FRAME_UBERTOOLTIP, i)
            HideOriginUI(ORIGIN_FRAME_TOP_MSG, i)
            HideUI("ResourceBarFrame", i)
            HideUI("ConsoleUI", i)
        end
    BlzFrameSetAllPoints(BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0))
    BlzHideOriginFrames(true)
    end
     
    This code hides all of the UI (thank you Tasyen). I use it in my map and it works great. You can adjust it to work with GUI/Jass.

    I'm not entirely sure how to do exactly what you want but I imagine it's some combination of hiding/unhiding these UI elements. You can delete "BlzFrameSetAbsPoint(fh, FRAMEPOINT_CENTER, 3, 3)" if you don't want to move the UI off the screen. In your case you'd probably want to set the UI's scale to 0.001 during the hiding period and then re scale it back to 1.00 when you want to bring it back.
     
    Last edited: Jan 27, 2020
  4. BizzaroFukuro

    BizzaroFukuro

    Joined:
    Dec 11, 2009
    Messages:
    201
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Code (vJASS):
    call EnablePreSelect(true, false)
    // or //
    call EnablePreSelect(false, false)

    Can't be done individually per unit, sadly.
     
  5. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    2,394
    Resources:
    0
    Resources:
    0
    Good to know!