• 🏆 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!

How to work with UI frames

Status
Not open for further replies.
Level 3
Joined
Jan 16, 2013
Messages
11
I am using lua and trying to understand what is UI frames. For example, I want to create my UI style (may be with my custom fields) instead of default. Whad do I need to do? It is documented to bad. For example what measurement units used for frame width and height? Why not pixels?
How to modify original UI?
This is too complicated
 
UI Frames, starting guide
That UI-frame stuff is kinda new, released with 1.31.
Why not pixels?
Cause the game can be played in many different Resolutions, if you would use pixles then the Frame would not be at the same place for all players.
For someone with 800x600, 800x600 is the top right but when someone would play with 1900x1600 that same position 800x600 the same frame would be somewhere at the Center a little bit to the bottomLeft, in the played screen while it was meant be at top right corner. With that factor measurement you as UI-Frame placer don't have to care about resolution.


coords-image-56-jpg.325821


How to modify original UI?
Incomplete, right know. You will lose some functionalities, But much depends how you wana alter the UI. In my opinion creating new UI-elements is more complete (except for displaying models, some automatic listing frames, custom dialog button events and some stuff that I don't remember right know. But much can be done even without them).

The key to manipulate the orignal UI is BlzGetFrameByName and BlzGetOriginFrame. There are some bugs right now in the reforge Beta (State custom games release), in 1.31 one could access the minimap, Ability- and ItemButtons only with BlzGetOriginFrame. In Reforged Blizzard added new fdfs for them but somehow they are not the same and when accessing them over BlzGetOriginFrame that frame sometimes bug.
By reading the fdfs used by the game from "ui\framedef" one can get the names for BlzGetFrameByName. I scanned that fdfs and uploaded only the names into the tutorial section.
Default Names for BlzGetFrameByName
UI: OriginFrames
 
Status
Not open for further replies.
Top