View Single Post
  #9  
Unread 12-11-2006, 09:05 PM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

Aye, was gonna post the same as gm9. If all you're doing is a variable image...

1) Create an ImageStyle for each class name
2) Add a placeholder image to the window
3) Give the window an OnShow script that sets the placeholder's style reference to the class name.

Note: gm9's code uses concatination to point the style reference to a global namespace. If the ImageStyles are in the window itself, you won't need the concatination bit.

That's prety much how the Map window works.

The button text comparison method is useful when you need to set some other value based on class. For example, you might want the color of something to be red if class is Guardian, Green if Templar, Yellow if Ranger, etc.

If you've done some programming in the past, it might help to think of buttons as a script replacement for functions. Any time you're script is doing something more complex than setting some simple values, you probably want to call a button script.
Reply With Quote