• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] JASS UI Natives?

Status
Not open for further replies.
Level 12
Joined
May 20, 2009
Messages
822
I see in this thread, you now have complete control over WC3's default UI. What's used in this thread is for Lua, though, not JASS. Is there a list of the JASS natives for this somewhere?

Edit: For the most part, solved here. A full list can be found in Common.j by searching for those functions.
 
Last edited:

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
To be clear, the functions are the same in both jass and lua.
The only difference is certain syntax keywords.

lua:
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

jass
local int i = 0
loop
exitwhen i <= 11​
call HideOriginUI(ORIGIN_FRAME_MINIMAP, i)
call HideOriginUI(ORIGIN_FRAME_ITEM_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_COMMAND_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_SYSTEM_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_PORTRAIT, i)
call HideOriginUI(ORIGIN_FRAME_MINIMAP, i)
call HideOriginUI(ORIGIN_FRAME_MINIMAP_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_TOOLTIP, i)
call HideOriginUI(ORIGIN_FRAME_UBERTOOLTIP, i)
call HideOriginUI(ORIGIN_FRAME_TOP_MSG, i)
call HideUI("ResourceBarFrame", i)
call HideUI("ConsoleUI", i)
set i = i + 1​
endloop

As you can see you write loops differently but the functions are the same
 
Level 12
Joined
May 20, 2009
Messages
822
To be clear, the functions are the same in both jass and lua.
The only difference is certain syntax keywords.

lua:
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

jass
local int i = 0
loop
exitwhen i <= 11​
call HideOriginUI(ORIGIN_FRAME_MINIMAP, i)
call HideOriginUI(ORIGIN_FRAME_ITEM_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_COMMAND_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_SYSTEM_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_PORTRAIT, i)
call HideOriginUI(ORIGIN_FRAME_MINIMAP, i)
call HideOriginUI(ORIGIN_FRAME_MINIMAP_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_TOOLTIP, i)
call HideOriginUI(ORIGIN_FRAME_UBERTOOLTIP, i)
call HideOriginUI(ORIGIN_FRAME_TOP_MSG, i)
call HideUI("ResourceBarFrame", i)
call HideUI("ConsoleUI", i)
set i = i + 1​
endloop

As you can see you write loops differently but the functions are the same

Weird, I'm definitely updated, as I can see the Reforged graphics in the Editor, but JassHelper gives me an error, "Undeclared Function HideOriginUI"
 
Level 6
Joined
Jan 17, 2010
Messages
149
because its not the same as lua i think. this is false.

All Jass functions start with a "Blz" prefix.

I.e BlzHideOriginUI. Edit: this is false too. I didnt pay attention to this being a user defined function.

You have to open the casc archive and get the common.j file (i cant upload it because thats breach of copyright)
 
Last edited:
Level 18
Joined
Jan 1, 2018
Messages
728
HideUI and HideOriginUI are not natives, but functions declared by the user in the linked post. In lua the natives will still have Blz prefix.

lua:
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

jass
local int i = 0
loop
exitwhen i <= 11 call HideOriginUI(ORIGIN_FRAME_MINIMAP, i)
call HideOriginUI(ORIGIN_FRAME_ITEM_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_COMMAND_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_SYSTEM_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_PORTRAIT, i)
call HideOriginUI(ORIGIN_FRAME_MINIMAP, i)
call HideOriginUI(ORIGIN_FRAME_MINIMAP_BUTTON, i)
call HideOriginUI(ORIGIN_FRAME_TOOLTIP, i)
call HideOriginUI(ORIGIN_FRAME_UBERTOOLTIP, i)
call HideOriginUI(ORIGIN_FRAME_TOP_MSG, i)
call HideUI("ResourceBarFrame", i)
call HideUI("ConsoleUI", i)
set i = i + 1 endloop
You should use [code=lua] and [code=jass]
 
Level 12
Joined
May 20, 2009
Messages
822
The specific functions I am looking for are BlzGetOriginFrame to get the frame (using for instance ORIGIN_FRAME_PORTRAIT) as well as BlzGetFrameByName (for searching for "CommandButton_0" or "ConsoleUIBackdrop" for instance like in the thread I linked), and then BlzFrameSetVisible to enable or disable it.

There is also a BlzHideOriginFrames native function that hides most of the default UI frames.
 
Last edited:
Status
Not open for further replies.
Top