This tutorial assumes you have a base knowledge of triggers, variables, arrays, dialogs, and dialog items. Note that none of the following is difficult, it's just not something many people do, and it adds a lot to the production quality of your mods.
SelectionMenu will act as the background for our selection menu, so we aren't stuck the same default background used by 95% of all other mods.
The 4x2 array is for our buttons. Note that each button is made up of a button, a border image, and a real image.
PlayerSelection is used to keep track of which buttons the player is interacting with, since our buttons are made up of multiple dialog items.
Hiding the background of the dialog is critical for adding our own custom backgrounds. Use This to find good assets to use as background images. Note the image type required (via: "Set Dialog Item Image Type", or within "Create Dialog Item (image)") associated with each image. Also note that Normal image are only really good for specific image sizes (ie, they will become pixelated if you try to make them fullscreen).
You can either set the background image to the size of the parent dialog, or to whatever size you want if you use fullscreen dialogs. This method allows for simple hiding of dialog items grouped with a particular dialog.
Here we create some nicely spaced buttons, with their borders (also found with This, and images, and anchor them all together. We set the buttons items to transparent, as hiding them renders them unusable. I'm going to use image saturation as an indicator of which button is highlighted, so I've desaturated all the images on creation.
All of the above was part of one "dialog initialization" function. It yields this.
Now to make our fancy buttons respond like the default buttons, we've got to add events for them to be highlighted or clicked.
Ignore the "set selected color to yellow"... it turns the transparent button yellow, and thus has no effect. The rest of these actions find which dialog item was used and then sets the dialog item image and border to be modified. For complicated selections menus, I tend to use strings to identify which item was selected (ie, inventory vs. equipped items) but this will do for our purposes.
This de/saturates the buttons image depending on whether or not it's highlighted. The PlayerSelection variable is used to make sure that the players current selection is always saturated.
Now we've got decent looking buttons that shine when highlighed!
The final part of this trigger controls the clicking of buttons. It 'resets' the color of all of the borders and the saturation of their images, and then sets the border color and saturation of the selected button.
Just out of curiosity, how do you know the image type for those?
Rollback Post to RevisionRollBack
Marine : You want a piece of me boy?
Ghost : Ghost Reporting
Director : You just screwed it up! >:(
Ghost : T.T Sorry Man I am getting edgy because of the Stim Packs ^.^
Marine : HEY THOSE ARE FOR ME -_-!!!!!!
I'm having a problem with a few of the images, they are being split into 4 images next to eachother, and is being displayed totally messed up ingame?
Assets\Textures\ui_battle_frame_summary_metal_protoss.dds is one of the affected images/frames.
Do you know any way to fix this?
But I seriously want to say thanks for the list of assets. I downloaded the picture to my computer for reference if that's okay.
Thanks a ton!
Rollback Post to RevisionRollBack
Check out BorgDragon's Texture tutorial!
Blade with whom I have lived, blade with whom I now die, serve right and justice one last time, seek one last heart of evil, still one last life of pain, cut well old friend, and then farewell.