Dialog box items/images

Flare

Stops copies me!
Reaction score
662
EDIT: Bleh, seems I messed up on an array index for the Marauder... although I managed to get what would appear to be a more pleasant solution by anchoring the images to the centre of the buttons, relative to the centre (o_O)

For those interested in the code...
Code:
Unit Spawn Dialog
    Events
        Timer - Elapsed time is 0.0 Game Time seconds
    Local Variables
    Conditions
    Actions
        Visibility - Change visibility for player 1 to Explored within (Playable map area) and Do Not check cliff level
        Camera - Pan the camera for player 1 to (Center of (Playable map area)) over 2.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
        ------- Creation of the dialog box
        Dialog - Create a Modal dialog of size (500, 400) at (0, 0) relative to Center of screen
        Variable - Set SelectionDialog = (Last created dialog)
        Dialog - Show (Last created dialog) for (All players)
        ------- Creation of the first button (spawn Marine)
        Dialog - Create a Button for dialog SelectionDialog
        Variable - Set DialogSelectionButtons[0] = (Last created dialog item)
        Dialog - Move DialogSelectionButtons[0] to (50, 50) relative to Top Left of dialog for (All players)
        ------- Creation of the first image (spawn Marine)
        Dialog - Create a Image for dialog SelectionDialog
        Variable - Set DialogSelectionImages[0] = (Last created dialog item)
        Dialog - Move DialogSelectionImages[0] to (0, 0) relative to Center of DialogSelectionButtons[0] for (All players) (from Center)
        Dialog - Set DialogSelectionImages[0] image to Assets\Textures\btn-unit-terran-marine.dds for (All players)
        ------- Creation of the second button (spawn Marauder)
        Dialog - Create a Button for dialog SelectionDialog
        Variable - Set DialogSelectionButtons[1] = (Last created dialog item)
        Dialog - Move DialogSelectionButtons[1] to (50, 50) relative to Top Right of dialog for (All players)
        ------- Creation of the second image (spawn Marauder)
        Dialog - Create a Image for dialog SelectionDialog
        Variable - Set DialogSelectionImages[1] = (Last created dialog item)
        Dialog - Move DialogSelectionImages[1] to (0, 0) relative to Center of DialogSelectionButtons[1] for (All players) (from Center)
        Dialog - Set DialogSelectionImages[1] image to Assets\Textures\btn-unit-terran-marauder.dds for (All players)

Original post, prior to solving... :X
Been working on a little dialog (to get a handle on the Trigger Editor, annoying as it may be) - the dialog is meant to spawn a few units (which works just fine), but the images for the dialog items are... messed up

See for yourself

Code:
Unit Spawn Dialog
    Events
        Timer - Elapsed time is 0.0 Game Time seconds
    Local Variables
    Conditions
    Actions
        Visibility - Change visibility for player 1 to Explored within (Playable map area) and Do Not check cliff level
        Camera - Pan the camera for player 1 to (Center of (Playable map area)) over 2.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
        [COLOR="SeaGreen"]------- Creation of the dialog box[/COLOR]
        Dialog - Create a Modal dialog of size (500, 400) at (0, 0) relative to Center of screen
        Variable - Set SelectionDialog = (Last created dialog)
        Dialog - Show (Last created dialog) for (All players)
        [COLOR="SeaGreen"]------- Creation of the first button (spawn Marine)[/COLOR]
        Dialog - Create a Button for dialog SelectionDialog
        Variable - Set DialogSelectionButtons[0] = (Last created dialog item)
        Dialog - Move DialogSelectionButtons[0] to (50, 50) relative to Top Left of dialog for (All players)
        [COLOR="SeaGreen"]------- Creation of the first image (spawn Marine)[/COLOR]
        Dialog - Create a Image for dialog SelectionDialog
        Variable - Set DialogSelectionImages[0] = (Last created dialog item)
        Dialog - Move DialogSelectionButtons[0] to (50, 50) relative to Top Left of dialog for (All players)
        Dialog - Set DialogSelectionButtons[0] image to Assets\Textures\btn-unit-terran-marine.dds for (All players)
        [COLOR="SeaGreen"]------- Creation of the second button (spawn Marauder)[/COLOR]
        Dialog - Create a Button for dialog SelectionDialog
        Variable - Set DialogSelectionButtons[1] = (Last created dialog item)
        Dialog - Move DialogSelectionButtons[1] to (50, 50) relative to Top Right of dialog for (All players)
        [COLOR="SeaGreen"]------- Creation of the second image (spawn Marauder)[/COLOR]
        Dialog - Create a Image for dialog SelectionDialog
        Variable - Set DialogSelectionImages[1] = (Last created dialog item)
        Dialog - Move DialogSelectionImages[1] to (50, 50) relative to Top Right of dialog for (All players)
        Dialog - Set DialogSelectionButtons[0] image to Assets\Textures\btn-unit-terran-marauder.dds for (All players)

Before, I tried using Button-type Dialog Items, and applying an image to them. In doing so, the white box visible in the screenshots there does not appear, but that grey 'smudge' seen at the left remains - the dialog item at the right didn't have any picture for some peculiar reason.

Am I using the wrong button paths, or is there some sort of knack for correctly applying these images
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top