Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!
- 1 Layout
- 1.1 What are Layouts
- 1.2 Template for Custom UI Layouts
- 1.3 Hooking Up Custom UI in The Trigger Editor
- 1.4 Special Terms And Symbols
- 1.5 Frame Object
- 1.6 Frame Properties
- 1.7 Animations
- 1.8 State Groups
- 1.9 How to use Layout Files
- 1.10 Additional Information & Resources
What are Layouts
Layouts, are the files used by SC2 to create the User Interface (UI) which the player sees. The UI Editor allows modders to extend or modify the current UI for their needs, by creating new Layouts where the player can declare new frames, or hookup existing frames and modify as they please.
The current tutorials cover an outdated method, which is heavily discouraged with newer additions in the editor. They are left here for preservation or until new tutorials are written.
Tutorial by: Helral SC2Layout Files Override Method explains:
- What are Layout Files and how can they help
- How to use custom layout files in your map
- What does the override file look like
- How to adjust the correct frame
- How to move a frame
- How to hide a frame
- How to create an image frame
Pay attention to these points when working with Layouts
- Use file="GameUI" when adjusting UI elements which are already available.
- Setting an incorrect Type for a Frame might cause the game to crash untested
- Hiding frames with
<Visible val="False" />only works for frames which aren't adjusted by the game itself. (no effect e.g. on the portrait or inventory)
- Always surround the values with quotes (")
Template for Custom UI Layouts
Template File (Missing File)
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <Desc> </Desc>
Hooking Up Custom UI in The Trigger Editor
When hooking up frames created inside the GameUI (the only place where layouts are created without using triggers to create them), then the frame need to be hooked up using the action Hookup Standard Dialog Item. The path is relative to GameUI, this means if you want to hook up GameUI/UIContainer, the path is UIContainer. If you want to hook up the GameUI/UIContainer/ConsolePanel the path is UIContainer/ConsolePanel.
When you create a frame from template using a layout you made you can use Hookup Dialog Item In Panel to hook up the frames inside of it. However the parent frame has to have been created from template as a panel.
How to use Layout Files
Since the 1.5 patch, you can now take advantage of the built-in UI Editor to directly input the xml for your layout files. The previous method, which still works, was to import the layout file via the import editor, and then assign them in the Game UI data type. This import method is described in more detail here.
Additional Information & Resources