5 ISPanel.initialise(
self)
7 self.avatarBackgroundTexture =
getTexture("media/ui/avatarBackground.png")
9 local FONT_HGT_MEDIUM =
getTextManager():getFontHeight(UIFont.Medium)
11 local comboHgt = FONT_HGT_SMALL + 3 * 2
15 self.avatarPanel.borderColor = {r=1, g=1, b=1,
a=0.2}
17 self.avatarPanel:setState("idle")
18 self.avatarPanel:setDirection(
self.direction)
19 self.avatarPanel:setIsometric(false)
20 self.avatarPanel:setDoRandomExtAnimations(true)
21 self.avatarPanel:reportEvent(
self.defaultAnimation and
self.defaultAnimation or "EventWalk")
23 self.turnLeftButton = ISButton:new(
self.avatarPanel.
x,
self.avatarPanel:getBottom()-15, 15, 15, "",
self,
self.onTurnChar)
25 self.turnLeftButton:initialise()
26 self.turnLeftButton:instantiate()
30 self.turnRightButton = ISButton:new(
self.avatarPanel:getRight()-15,
self.avatarPanel:getBottom()-15, 15, 15, "",
self,
self.onTurnChar)
32 self.turnRightButton:initialise()
33 self.turnRightButton:instantiate()
34 self.turnRightButton:setImage(
getTexture("media/ui/ArrowRight.png"))
38 self.animCombo:initialise()
40 self.animCombo:addOptionWithData(getText("IGUI_anim_Walk"), "EventWalk")
41 self.animCombo:addOptionWithData(getText("IGUI_anim_Idle"), "EventIdle")
42 self.animCombo:addOptionWithData(getText("IGUI_anim_Run"), "EventRun")
43 self.animCombo.selected = 1
54 local direction =
self.avatarPanel:getDirection()
55 if button.
internal == "TURNCHARACTERLEFT" then
57 self.avatarPanel:setDirection(direction)
58 elseif button.
internal == "TURNCHARACTERRIGHT" then
60 self.avatarPanel:setDirection(direction)
65--
self.avatarPanel:setState(combo:getOptionData(combo.selected))
66 self.avatarPanel:reportEvent(combo:getOptionData(combo.selected))
70 self.avatarPanel:setCharacter(character)
74 self.avatarPanel:setSurvivorDesc(survivorDesc)
83 -- The panel is bigger than it appears when the animation selection
dropdown is removed. Maybe there's
a better way to handle that?
85 o.borderColor = {r=0, g=0, b=0,
a=0}
86 o.direction = defaultDirection and defaultDirection or
IsoDirections.SW
87 o.defaultAnimation = defaultAnimation
void FrameworkZ UI CharacterPreview()
void processingNotification backgroundColor a()
void self textCloseButton internal()
void self playerListPanel prerender()
void button backgroundColor()
void onAnimSelected(combo)
void onTurnChar(button, x, y)
void setSurvivorDesc(survivorDesc)
void setCharacter(character)
Contains all of the User Interfaces for FrameworkZ.