Hey guys sorry for noob questions i ask, but lack of programming knowledge appears when i'm doing custom ui. Plz can someone experienced tell me if i can combine multiple dialog items into single dialog item? For example for fancy ability button i'm using icon, button, and frame image, can i somehow combine them into single object? Or i must use global variables for each of them if i want to change their opacity and desaturation, for example? I thought i can use unknown (for me) sc2 trigger magic so i can create action definition for creating such a button (consist of 3 items) and then somehow get access to all items it consists of... Mb i'm writing bullshit here guys but i'm rly bad with triggers in terms of organization. And i want my triggers to be awesum and polished (and i want to use as less variables as possible). I thought mb i can use user types for this somehow.......
Also have second question. I'm using list items for my conversation system, but seems like i cant add more than one line of text in it. Is there any way to increase size of list items? For example in this screen (attached) i have all of possible options for conversation fit in one line, but what if i want to add longer phrase to them?
Plz guys need some advises for both of this questions.
I will throw another question in this thread if u guys dont mind, as far as i will progress through..
You could make your own dialog item container functionality, I suppose, and make a new action definition for each dialog item interaction action. It would be like going from 'Set Camera for Player' to 'Set Camera for Player Group'. A player group is a container of players, like a unit group is a container of units. You'd simply make your own (or steal one, I think I might have seen a library for it somewhere around here) for dialog items.
But no, sorry, there's no functionality for it built-in.
For the second question, there's also no functionality for multiple-lined list items, they'll always dot out. You could make your own list boxes and calculate the lines if you were to use a monospaced font. Monospaced means every character has the same width. Probs a bit complicado dough.
so how i can make this container? is it just few combined arrays? So i will need to create global variables for each dialog item which i want player to be able interact with, right?
Can i make list items with images somehow? I want spellbook made like list item which i can choose from and then upgrade desired aspect of this spell (like aoe, damage, or range)
so how i can make this container? is it just few combined arrays? So i will need to create global variables for each dialog item which i want player to be able interact with, right?
That's the gist of it, but I honestly don't think it's worth it. Not being able to combine dialog items isn't something I've found to be a large problem, and it seems to be more trouble than it's worth.
Can i make list items with images somehow? I want spellbook made like list item which i can choose from and then upgrade desired aspect of this spell (like aoe, damage, or range)
I just meant emulating a list box by using a bunch of dialog items. Which is funny, because I just said making dialog container functionality wouldn't be worth it, but it would be ideal for making your own list boxes.
I believe what you are looking for is a panel. This will allow you to group dialog items together and treat them as one within a Dialog. This will not work for all functions, but for things like positioning, showing/hiding, and setting transparency it will work. You can experiment with other functions to see if they work as well.
I have attached an example map for you.
Here is an overview of what panels are:
What are panels?
Panels are dialog items which basically act as containers for other dialog items that you can then put inside of a dialog. Think of them as a mini-dialog inside of a dialog. They allow you to manipulate an entire grouping of dialog items inside of a dialog as if they were a single item very easily.
This is especially useful when you have a map that uses lots of dialog items in complex menus or interfaces.
What do I need to know before diving into the example map?
The main difficulty of working with panels is they require a bit more work to setup than normal dialog items. Because they work using the ‘Create Dialog Item’ and ‘Create Dialog Item in Panel’ actions you need to set every individual property on your items using separate actions.
Pay careful attention to how we set the size and position of dialog items that are inside of a panel. You will need to use these individual actions to manipulate every aspect of a dialog item that is inside of a panel, such as its text, style, tint or image files.
It is also possible to use panels as a ‘mask’ for dialog items that are inside of it. This is only useful in a handful of situations (such as wanting to only show part of an image) but it is a nice trick to have up your sleeve.
Hey man thx for your time you spent on map with comments, but it seems i'm not able to set dialog item desaturation this way. Only transparency and color. One more question. Is there any function to make image brighter? look in attached screenshot. Buff icon (top right of portrait) looks darkish. I think default behaviour icons look more bright. Also i want this 2 buttons (top right of this char dialog) to glow when hero gains quest or lvlup. Is there any function to do it (instead of fade dialog item)?
Also i asked this before but i dont know mb blizz update something. Can i use animated image (like cooldown)? cuz taking it in photoshop and cut this to 48 pieces for custom function kinda suck if there is another way...
Bump. guys can i also do something with command tooltip. Can i edit game text value or this command tooltip value or something... in case i will use standart command buttons for my ui.. I Cannot hookup this tooltip properly it is very annoying
You can change the command tooltip's position with UI xml.
@glowing button
-> Change the used images (image and hover image).
@Animated image:
Have a look at my example map for that: https://dl.dropboxusercontent.com/u/4479839/CooldownImageDemo.SC2Map
But this requires you to put each animation frame into the same image which can be very annoying, too. It is possible to control the animation manually or just make it automated running as fast as it can (and running during pauses, lags, so the automated one is not useful for game-related data).
Btw, the texture coordinates are percentages of the whole image. 0.0000 to 0.2500 would mean top left up to 25% of the whole image's size.
Hey man, thanx very much. I assume i should use manual cooldown template for abils. Can you tell if it will be huge difference in lag with default ui and dialog-based on battlenet?
Also can i ask how do you figure this out with XML ui editing, i mean i don't rly get how you know what this kind of a template need to be set in it's options like Animating, AnimColumns, AnimCount...
Hey guys sorry for noob questions i ask, but lack of programming knowledge appears when i'm doing custom ui. Plz can someone experienced tell me if i can combine multiple dialog items into single dialog item? For example for fancy ability button i'm using icon, button, and frame image, can i somehow combine them into single object? Or i must use global variables for each of them if i want to change their opacity and desaturation, for example? I thought i can use unknown (for me) sc2 trigger magic so i can create action definition for creating such a button (consist of 3 items) and then somehow get access to all items it consists of... Mb i'm writing bullshit here guys but i'm rly bad with triggers in terms of organization. And i want my triggers to be awesum and polished (and i want to use as less variables as possible). I thought mb i can use user types for this somehow.......
Also have second question. I'm using list items for my conversation system, but seems like i cant add more than one line of text in it. Is there any way to increase size of list items? For example in this screen (attached) i have all of possible options for conversation fit in one line, but what if i want to add longer phrase to them?
Plz guys need some advises for both of this questions.
I will throw another question in this thread if u guys dont mind, as far as i will progress through..
@abvdzh: Go
You could make your own dialog item container functionality, I suppose, and make a new action definition for each dialog item interaction action. It would be like going from 'Set Camera for Player' to 'Set Camera for Player Group'. A player group is a container of players, like a unit group is a container of units. You'd simply make your own (or steal one, I think I might have seen a library for it somewhere around here) for dialog items.
But no, sorry, there's no functionality for it built-in.
For the second question, there's also no functionality for multiple-lined list items, they'll always dot out. You could make your own list boxes and calculate the lines if you were to use a monospaced font. Monospaced means every character has the same width. Probs a bit complicado dough.
so how i can make this container? is it just few combined arrays? So i will need to create global variables for each dialog item which i want player to be able interact with, right?
Can you go into a details plz
Can i make list items with images somehow? I want spellbook made like list item which i can choose from and then upgrade desired aspect of this spell (like aoe, damage, or range)
@abvdzh: Go
That's the gist of it, but I honestly don't think it's worth it. Not being able to combine dialog items isn't something I've found to be a large problem, and it seems to be more trouble than it's worth.
I just meant emulating a list box by using a bunch of dialog items. Which is funny, because I just said making dialog container functionality wouldn't be worth it, but it would be ideal for making your own list boxes.
I believe what you are looking for is a panel. This will allow you to group dialog items together and treat them as one within a Dialog. This will not work for all functions, but for things like positioning, showing/hiding, and setting transparency it will work. You can experiment with other functions to see if they work as well.
I have attached an example map for you.
Here is an overview of what panels are:
What are panels?
Panels are dialog items which basically act as containers for other dialog items that you can then put inside of a dialog. Think of them as a mini-dialog inside of a dialog. They allow you to manipulate an entire grouping of dialog items inside of a dialog as if they were a single item very easily.
This is especially useful when you have a map that uses lots of dialog items in complex menus or interfaces.
What do I need to know before diving into the example map?
The main difficulty of working with panels is they require a bit more work to setup than normal dialog items. Because they work using the ‘Create Dialog Item’ and ‘Create Dialog Item in Panel’ actions you need to set every individual property on your items using separate actions.
Pay careful attention to how we set the size and position of dialog items that are inside of a panel. You will need to use these individual actions to manipulate every aspect of a dialog item that is inside of a panel, such as its text, style, tint or image files.
It is also possible to use panels as a ‘mask’ for dialog items that are inside of it. This is only useful in a handful of situations (such as wanting to only show part of an image) but it is a nice trick to have up your sleeve.
Hey man thx for your time you spent on map with comments, but it seems i'm not able to set dialog item desaturation this way. Only transparency and color. One more question. Is there any function to make image brighter? look in attached screenshot. Buff icon (top right of portrait) looks darkish. I think default behaviour icons look more bright. Also i want this 2 buttons (top right of this char dialog) to glow when hero gains quest or lvlup. Is there any function to do it (instead of fade dialog item)?
Also i asked this before but i dont know mb blizz update something. Can i use animated image (like cooldown)? cuz taking it in photoshop and cut this to 48 pieces for custom function kinda suck if there is another way...
Bump. guys can i also do something with command tooltip. Can i edit game text value or this command tooltip value or something... in case i will use standart command buttons for my ui.. I Cannot hookup this tooltip properly it is very annoying
You can change the command tooltip's position with UI xml.
@glowing button
-> Change the used images (image and hover image).
@Animated image:
Have a look at my example map for that:
https://dl.dropboxusercontent.com/u/4479839/CooldownImageDemo.SC2Map
But this requires you to put each animation frame into the same image which can be very annoying, too. It is possible to control the animation manually or just make it automated running as fast as it can (and running during pauses, lags, so the automated one is not useful for game-related data).
Btw, the texture coordinates are percentages of the whole image. 0.0000 to 0.2500 would mean top left up to 25% of the whole image's size.
Hey man, thanx very much. I assume i should use manual cooldown template for abils. Can you tell if it will be huge difference in lag with default ui and dialog-based on battlenet?
Also can i ask how do you figure this out with XML ui editing, i mean i don't rly get how you know what this kind of a template need to be set in it's options like Animating, AnimColumns, AnimCount...