Layout
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.
Tutorial
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.
Special Terms And Symbols
Frame Object
Frame Properties
Animations
State Groups
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
UI
| ||
Common Frame Types | Frame • Control • Button • EditBox • Slider • Pulldown • Spinner • CheckBox • ListBox • ToggleControl • ProgressBar • Image • Label • CutsceneFrame • Model • TabControl • BlurFrame • RangeFrame • AspectRatioFrame • Tooltip • Scrollable Frame • GraphFrame • MathFrame • TextFormatFrame • DataRefFrame | |
---|---|---|
Additional Information | State Groups • Animations • Special Terms and Symbols • Examples and Samples • Frame Object • List of Supported Frame Elements • Frame Properties • Tutorials |
|