• 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.

Showing a picture inside dialogs

Status
Not open for further replies.
Level 9
Joined
Dec 21, 2006
Messages
490
hi me again :/


i managed to show icons of items inside of dialogItems (thx to Dr) but i cannot create a small version of it. means the dialogitem has to be about 200x200 to show the icon at all but i want it to be small size, about 50x50. is there any way to refactor this, any action i missed or anything...
 
Level 9
Joined
Dec 21, 2006
Messages
490
the dialogItem label doesn't show the image below 200x200, but the image itself is just 76x76
another possibility would be to use another dialogitem----> image; i was using the label one because it has text as input.

the problem with the image dialogItem is that i cannot convert a string to a file. at least all attempts to do so failed. <img path"variable"/> as custom value doesnt work.


i found this on sc2mapster:

Convert String to File - Image Options: Function Return Type: File - Image Parameters IconPath = No File <File - Image> Grammar Text: Ability Icon(Ability) Hint Text: (None) Custom Script Code Local Variables Actions General - Return IconPath

i made this out of it:


Convert String to File - Image Options: Function Return Type: File - Image Parameters IconPath = No File <File - Image>
Input = "" <String>
Grammar Text: IconPath = Input Hint Text: (None) Custom Script Code Local Variables Actions General - Return IconPath



ok i solved this! param input string then return type string, action return input, THEN change the return type to file, so it will work
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Um what?!
Code:
const int c_triggerControlPropertyImage                 = 4;        // string
const int c_triggerControlPropertyImageType             = 5;        // int
const int c_triggerControlPropertyBlendMode				= 30;       // int


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;

const int c_triggerBlendModeNormal            = 0;  
const int c_triggerBlendModeMultiply          = 1;    
const int c_triggerBlendModeLighten           = 2;
const int c_triggerBlendModeDarken            = 3;    
const int c_triggerBlendModeAdd               = 4;
const int c_triggerBlendModeSubtract          = 5;    
const int c_triggerBlendModeAlpha             = 6;  

native void     DialogControlSetPropertyAsString (int control, int property, playergroup players, string value);
native void     DialogControlSetPropertyAsInt (int control, int property, playergroup players, int value);
But the image path is a string.... What on earth are you talking about?

Additionally you can use the...
Code:
native text     StringToText (string s);
native to convert any string to text. This is obviously unlocalized text.
 
Level 9
Joined
Dec 21, 2006
Messages
490
i made a custom function "Convert" which returns a file - image having a string as input. to accomplish this i made a function which simply returns the input string. THEN just change the return type to file - image and a function is done which takes a string and gives back a file -image.
 
Status
Not open for further replies.
Top