• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to resize an image in a dialog?

Status
Not open for further replies.
Level 5
Joined
Aug 27, 2008
Messages
127
When I use this:

  • Dialog - Create an image for dialog (Last created dialog) with the dimensions (35, 35) anchored to Top Left with an offset of (100, 55) setting the tooltip to "" using the image Assets\Textures\icon-mineral.dds as a Normal type with tiled set to True tint color White and blend mode Normal
The image gets cropped (chopped in half) and its really ugly. Is there a way to actually resize it and use it in a dialog?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Try changing the image type.

Code:
// Image types
const int c_triggerImageTypeNone                        = 0;
const int c_triggerImageTypeNormal                      = 1;
const int c_triggerImageTypeBorder                      = 2;
const int c_triggerImageTypeHorizontalBorder            = 3;
const int c_triggerImageTypeEndCap                      = 4;

Some of them tile (so when you increase their size the image repeats). Others of them will cause the image to stretch.
 
Level 5
Joined
Aug 27, 2008
Messages
127
:O Now thats a piece of work good job :D Yes, it really is working but still, I aint touching jass (its jass in sc2 editor too, right?). I make everything with GUI. Thanks for the help tho :p

Ok, I may not write in jass but I understand it, its not that hard. I examined your code and I did it with gui:

Dialog - Create a Image for dialog (Last created dialog)
Dialog - Set (Last created dialog item) size to (35, 35) for (All players)
Dialog - Move (Last created dialog item) to (50, 55) relative to Top Left of dialog for (All players)
Dialog - Set (Last created dialog item) image to Assets\Textures\icon-mineral.dds for (All players)

This actually WORKED! Thanks +rep :p . The action that I was doing before was supposed to combine them all in one, but I guess not exactly.

p.s. Bleh, I cant give your rep now because it says that I have to spread some around. Guess you are the one that helped me the last time :p I will give you rep for this when I can.
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
I aint touching jass (its jass in sc2 editor too, right?).
Its Galaxy script...

This actually WORKED! Thanks +rep :p . The action that I was doing before was supposed to combine them all in one, but I guess not exactly.
Thats one of the reasons I avoid GUI. It abstracts one too much away from the actual mechanics of the script.
 
Status
Not open for further replies.
Top