Hi, I'm looking to create a button that pops on the screen when an upgrade is on going from a particular unit. I've posted a screenshot of my first attempt, without success. I also tried playing with UI stuff, but im far from good at this stuff. Any help or exemple on how to create it?
(And more about frames, referencing, properties, animations etc)
PART 2 - TRIGGER EDITOR
To make it easy to use, we will hook up the button in triggers.
- Create a "Dialog Item" variable.
- Create a trigger or action definition to hook up the button (see attached picture 2).
- Create a trigger to catch the event, when a user clicks on a dialog item. (see attached picture 3). This is a sample, do your things here.
And at this point, you linked the new UI with triggers. You must understand that UI frames are in general templates meant to be specified afterwards. This can be done in many ways, inside the UI Editor or the Trigger Editor.
That means the button can be duplicated, moved and used for different actions, according to your wish.
Hi, I'm looking to create a button that pops on the screen when an upgrade is on going from a particular unit. I've posted a screenshot of my first attempt, without success. I also tried playing with UI stuff, but im far from good at this stuff. Any help or exemple on how to create it?
Hello,
It is indeed a UI request. Can repost your image or link to SC2Mapster forum if it's somewhere around, please ?
PART 1 - UI EDITOR
In the meantime (see attached picture 1), I put a link at the end for an archive with 3 XML files.
Open the UI Editor and create 4 layouts :
- MyMainUI
- MyMainUITemplates
- MyOverrideLayout
- MyOverrideUpperContainer :
MyOverrideUpperContainer will anchor the new main frame to the GameUI frame :
If you change names, change them inside too.
Bravo, this is your template (see attached picture 1) !
READ FILES ! I inserted some comments to understand what the text does.
To go further :
- UI Introduction : https://sc2mapster.github.io/ui/2018/02/07/basic-introduction-to-layouts.html
- UI Editor documentation : https://sc2mapster.fandom.com/wiki/UI_Editor
- State Groups : https://sc2mapster.fandom.com/wiki/UI/State_Groups
(And more about frames, referencing, properties, animations etc)
PART 2 - TRIGGER EDITOR
To make it easy to use, we will hook up the button in triggers.
- Create a "Dialog Item" variable.
- Create a trigger or action definition to hook up the button (see attached picture 2).
- Create a trigger to catch the event, when a user clicks on a dialog item. (see attached picture 3). This is a sample, do your things here.
And at this point, you linked the new UI with triggers. You must understand that UI frames are in general templates meant to be specified afterwards. This can be done in many ways, inside the UI Editor or the Trigger Editor.
That means the button can be duplicated, moved and used for different actions, according to your wish.
Archive :
SC2_UI_MyCustomButton.zip
Have a nice day !