So I've built some custom action bars, theyre 90% functional (just have to add in count quantities for some things) but I'm having a dilemma.
Basically I use some 60x60 dialog items stacked together to display a key. Say the base clickable button, an image overlay to show the actual icon since normal button images have to be twice as tall for 2 images which I dont need. Next up is the mapped-key display then I have a countdown timer over the main image and lastly a quantity counter in the bottom right corner.
The thing is, is it better to create the all the dialog items for each key space or to only create them when theyre actually being used? I'm honestly not sure whats better for memory usage etc to have it all pre-made and just leave say the labels blank when theyre not being used?
Any help would be appreciated 'cause im trying to keep my display, and code, clean.
Erm, you're building custom UI with abilities and wanna place hotkeys?
About your question - i dont get what u mean, you doing abilies and wanna make dialogs for displaying ability hotkey?
That would generate a very large amount of traffic, since the event would run every time a key is pressed (While typing too), therefore increasing lag.
I already have my setup running, basically its a matter of how the visuals are setup should I generate the graphical display dialogs like the labels etc when they're set (ie hotkey binding and numerical countdown/quantities) and destroy the graphic when they're not in use... or do I do like I currently have implemented and just have all the dialog items pre-created and only update them when a button component is activated.
And no if you hit enter and bring up the in game chat feature it suspends keystroke reading as I have discovered.
My abilities arent the built in ones. The way the hotkeys are setup abilities have their own hotkeys. In my setup the slots have hotkeys which can be assigned and the abilities can be assigned to the hotkey slots. Its all working just fine I just am not sure how best to implement the graphical portion of it.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So I've built some custom action bars, theyre 90% functional (just have to add in count quantities for some things) but I'm having a dilemma.
Basically I use some 60x60 dialog items stacked together to display a key. Say the base clickable button, an image overlay to show the actual icon since normal button images have to be twice as tall for 2 images which I dont need. Next up is the mapped-key display then I have a countdown timer over the main image and lastly a quantity counter in the bottom right corner.
The thing is, is it better to create the all the dialog items for each key space or to only create them when theyre actually being used? I'm honestly not sure whats better for memory usage etc to have it all pre-made and just leave say the labels blank when theyre not being used?
Any help would be appreciated 'cause im trying to keep my display, and code, clean.
Erm, you're building custom UI with abilities and wanna place hotkeys? About your question - i dont get what u mean, you doing abilies and wanna make dialogs for displaying ability hotkey?
Take a look at Starjeweled, they have a great example of a unique ui.
I'd do something like...
Variable - Ability - AbilityBarSlot[]
Variable - String - AbilityBarHotkeySlot[]
AbilityBarSlot[1] = Chain Lighting
AbilityBarHotkeySlot[1] = C
AbilityBarSlot[2] = Fireball
AbilityBarHotkeySlot[2] = F
AbilityBarSlot[3] = Sprint
AbilityBarHotkeySlot[3] = S
MaxAbilitys = 3
For Each integer i from 1 - MaxAbilitys
If Pressed Key = AbilityBarHotkeySlot[i] then
cast AbilityBarSlot[i]
End If
End for each
Just a rough example, but that's how I'd set them up.
@Dustin374: Go
That would generate a very large amount of traffic, since the event would run every time a key is pressed (While typing too), therefore increasing lag.
There's not alot else you can do to setup custom hotkeys.
And I'm not sure if keydetection registers while typing. I'll check it out.
I do this method on my map with 6 players spamming keys I didn't get a single bit of lag. So the footprint isn't that big at all.
@Dustin374: Go
I already have my setup running, basically its a matter of how the visuals are setup should I generate the graphical display dialogs like the labels etc when they're set (ie hotkey binding and numerical countdown/quantities) and destroy the graphic when they're not in use... or do I do like I currently have implemented and just have all the dialog items pre-created and only update them when a button component is activated.
And no if you hit enter and bring up the in game chat feature it suspends keystroke reading as I have discovered.
Why dont you use the lay out files to make your UI appear the way you want it. Then just use the command card Hot keys for your ability?
no triggering required....
@Sneakervek: Go
Oh I gotcha, sorry I misread the first thread.
I'd keep my dialogs and just show/hide as needed and update when needed.
Constant creation and destruction of dialogs seems like it would be more loadbearing on your map.
@SouLCarveRR: Go
My abilities arent the built in ones. The way the hotkeys are setup abilities have their own hotkeys. In my setup the slots have hotkeys which can be assigned and the abilities can be assigned to the hotkey slots. Its all working just fine I just am not sure how best to implement the graphical portion of it.