SC2Mapster Wiki
Register
Advertisement
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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:

  1. What are Layout Files and how can they help
  2. How to use custom layout files in your map
  3. What does the override file look like
  4. How to adjust the correct frame
  5. How to move a frame
  6. How to hide a frame
  7. How to create an image frame

Pay attention to these points when working with Layouts

  1. Use file="GameUI" when adjusting UI elements which are already available.
  2. Setting an incorrect Type for a Frame might cause the game to crash untested
  3. 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)
  4. 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


Advertisement