• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Lua] Moving the hero button frame

Oli

Oli

Level 4
Joined
Aug 9, 2015
Messages
35
Hi,

I am having problems with moving the ORIGIN_HERO_BUTTON_FRAME. I have been trying using Taysen's method however the script would not work for me:

Lua:
BlzEnableUIAutoPosition(false)
local frame = BlzGetOriginFrame(ORIGIN_FRAME_HERO_BUTTON, 0)
BlzFrameSetAbsPoint(frame, FRAMEPOINT_TOPLEFT, 0.1, 0.55)
-- Move 2.Button
local frame = BlzGetOriginFrame(ORIGIN_FRAME_HERO_BUTTON, 1)
BlzFrameSetAbsPoint(frame, FRAMEPOINT_TOPLEFT, 0.3, 0.25)

I can not find instances regarding HERO_BAR or HERO_BUTTON_FRAME in wc3 .fdf files using the casc viewer, are they hidden somewhere unaccessable or am i just blind?

I am aware UI Utils allows you to move hero buttons, however there is no lua version of it.
 
Thank you very much! For anyone wondering the final code working in my case would be:

(using TotalInitLite):


Lua:
do
    function func()
        BlzEnableUIAutoPosition(false)
        local frame = BlzGetOriginFrame(ORIGIN_FRAME_HERO_BUTTON, 0)
        BlzFrameClearAllPoints(frame)
        BlzFrameSetAbsPoint(frame, FRAMEPOINT_TOPLEFT, 0.1, 0.55)
        -- Move 2.Button
        local frame = BlzGetOriginFrame(ORIGIN_FRAME_HERO_BUTTON, 1)
        BlzFrameClearAllPoints(frame)
        BlzFrameSetAbsPoint(frame, FRAMEPOINT_TOPLEFT, 0.3, 0.25)
    end

    OnGameStart(function()
        func()
    end)
end
 
Back
Top