• 0

    posted a message on [Trigger] Fake Menu Button

    I wanted a button on my screen to enable/disable the leaderboard, and decided to make it look like it was part of the menu.

    Since it took me a while to figure out the exact values, I decided to post the exact actions I used to resemble it. The following actions were used. You can of course use a different Button ID if 1 is already in use, as long as you remain consistent among the different actions.

    Dialog - Display Screen Button
    ScreenButtonID: 1
    Width: 270
    Height: 28
    Text: YourMenuButtonName (<h>F8</h>)
    Anchor: Top Left
    OffsetX: 1084
    OffsetY: 1
    Callback: YourMenuButtonTrigger

    Dialog - Set Screen Button Border Image
    ScreenButtonID: 1
    BorderImage: Assets\Textures\ui_gamemenu_topbuttons_normalpressed.dds
    HoverImage: Assets\Textures\ui_gamemenu_topbuttons_normaloverpressedover.dds
    BorderType: EndCap

    Dialog - Set Dialog Item Style
    Dialog Item: Screen Button
    ScreenButtonID: 1
    Style: "MenuBarButton_Terr" or "MenuBarButton_Zerg" or "MenuBarButton_Prot"
    Players: ThePlayersMatchingTheRace

    Dialog - Set Dialog Item Color
    Dialog Item: Screen Button
    ScreenButtonID: 1
    Color: R20 G86 B34 (Terran) or R122 G70 B35 (Zerg) or R6 G124 B125 (Protoss)
    Players: ThePlayersMatchingTheRace

    For the colors, I used exactly half of the Minimap Border color, from the Data Editor. This works out quite well for Zerg, but after testing, less so for Terran and Protoss. My main goal was figuring out the right coordinates, style, and color for the Zerg. You might want to play a little with the RGB values for Terran and Protoss.

    Posted in: Tutorials
  • To post a comment, please or register a new account.