I searched on here and didn't find anyone with a similar problem. Either no one has seen it, or they didn't know what it was they were seeing so i figured i would drop a post on here. SC2Mapster has helped me out so much, figured i would pay it forward.
As many may be aware you can, instead of putting text on a button put an image right in there on the text line. The selection is on the bottom, hit browse, and import the image to the button. What you may not realize is that your image will vanish unless your button is of a proper size. For a 1900x1200 screen resolution, the button needs to be 79x79 to fit the BTN images (74x74 i think). Heres the shenanigans. When you play the game at a different resolution than you coded it on, it will look VERY different. Almost all of my buttons coded at 1900 resolution didn't show up on anything smaller than that, and it gave the effect of the button not functioning. I have since added code to have the player set the buttons to the be able to be viewed on their native resolution, scaling up the UI and preventing any unseemly viewing problems.
Thought i would put that out there, and to recommend if your coding a game to test it on other resolutions. Count myself lucky that my game doesn't look terrible on lower resolutions, seeing as assumed a change in resolution would scale my dialogs and images automatically.
Actually if you make an image dialog item or screen image (depending on the button you use) after the button with the same size+position and set ONLY the image to be displayed (no tooltips) it will draw over the button without blocking events on any resolution.
Yea, thats what i originally had going, but my situation was slightly skewed. I was making an action bar and spellbook interface, and wanted the player to be able to select any ability from their spellbook, and place it on any bar button they wanted. The reason why just dropping an image where the button was, is after the image was down, it was insanely hard to get it to go away if another button was to be placed on top of it. By changing the button text to the image, i was able to sidestep that, and when an image was placed to match a button ability, it would overwrite the previous button text.
Why would you place another button on top of it? Wouldn't it be easier to have an array of buttons/abilities/images and change the respective ability/image without actually removing/adding any dialog items?
What command changes a dialog in place? Curious, because of this post i have started to rewrite my code where my action bar is concerned, and for the life of me i cant find a single ability relating to changing a dialog image from one type to another.
Let me get my terminology right. Im trying to find the command you are referring to, that goes into a trigger, and changes a dialog image placed on a dialog from one image to another, WITHOUT leaving the old image underneath.
Idk if he meant this but..
Dialogbutton[1] contains abilitydialogItem[1];
show Dialogbutton[1];
(player drops newAbility on Dialogbutton[1])
destroy dialog item abilitydialogItem[1];
abilitydialogItem[1] = newAbility;
Put dialog item abilitydialogitem[1] in dialogButton[1];
show dialogButton[1];
I searched on here and didn't find anyone with a similar problem. Either no one has seen it, or they didn't know what it was they were seeing so i figured i would drop a post on here. SC2Mapster has helped me out so much, figured i would pay it forward.
As many may be aware you can, instead of putting text on a button put an image right in there on the text line. The selection is on the bottom, hit browse, and import the image to the button. What you may not realize is that your image will vanish unless your button is of a proper size. For a 1900x1200 screen resolution, the button needs to be 79x79 to fit the BTN images (74x74 i think). Heres the shenanigans. When you play the game at a different resolution than you coded it on, it will look VERY different. Almost all of my buttons coded at 1900 resolution didn't show up on anything smaller than that, and it gave the effect of the button not functioning. I have since added code to have the player set the buttons to the be able to be viewed on their native resolution, scaling up the UI and preventing any unseemly viewing problems.
Thought i would put that out there, and to recommend if your coding a game to test it on other resolutions. Count myself lucky that my game doesn't look terrible on lower resolutions, seeing as assumed a change in resolution would scale my dialogs and images automatically.
Actually if you make an image dialog item or screen image (depending on the button you use) after the button with the same size+position and set ONLY the image to be displayed (no tooltips) it will draw over the button without blocking events on any resolution.
@jwebbb01: Go
Yea, thats what i originally had going, but my situation was slightly skewed. I was making an action bar and spellbook interface, and wanted the player to be able to select any ability from their spellbook, and place it on any bar button they wanted. The reason why just dropping an image where the button was, is after the image was down, it was insanely hard to get it to go away if another button was to be placed on top of it. By changing the button text to the image, i was able to sidestep that, and when an image was placed to match a button ability, it would overwrite the previous button text.
Why would you place another button on top of it? Wouldn't it be easier to have an array of buttons/abilities/images and change the respective ability/image without actually removing/adding any dialog items?
@jwebbb01: Go
What command changes a dialog in place? Curious, because of this post i have started to rewrite my code where my action bar is concerned, and for the life of me i cant find a single ability relating to changing a dialog image from one type to another.
@coronbale: Go
Let me get my terminology right. Im trying to find the command you are referring to, that goes into a trigger, and changes a dialog image placed on a dialog from one image to another, WITHOUT leaving the old image underneath.
Idk if he meant this but.. Dialogbutton[1] contains abilitydialogItem[1]; show Dialogbutton[1]; (player drops newAbility on Dialogbutton[1]) destroy dialog item abilitydialogItem[1]; abilitydialogItem[1] = newAbility; Put dialog item abilitydialogitem[1] in dialogButton[1]; show dialogButton[1];
Or something to that effect.
I swear I put returns in between those lines... I blame my phone