11 ISPanel.initialise(
self)
13 self.avatarBackgroundTexture = getTexture("media/
ui/avatarBackground.png")
18 self.avatarPanel.backgroundColor = {r=0, g=0, b=0,
a=0.8}
19 self.avatarPanel.borderColor = {r=1, g=1, b=1,
a=0.2}
21 self.avatarPanel:setState("idle")
22 self.avatarPanel:setDirection(
self.direction)
23 self.avatarPanel:setIsometric(false)
24 self.avatarPanel:setDoRandomExtAnimations(true)
25 self.avatarPanel:reportEvent(
self.defaultAnimation and
self.defaultAnimation or "EventWalk")
27 self.turnLeftButton = ISButton:new(
self.avatarPanel.
x,
self.avatarPanel:getBottom()-15, 15, 15, "",
self,
self.onTurnChar)
29 self.turnLeftButton:initialise()
30 self.turnLeftButton:instantiate()
31 self.turnLeftButton:setImage(getTexture("media/
ui/ArrowLeft.png"))
34 self.turnRightButton = ISButton:new(
self.avatarPanel:getRight()-15,
self.avatarPanel:getBottom()-15, 15, 15, "",
self,
self.onTurnChar)
36 self.turnRightButton:initialise()
37 self.turnRightButton:instantiate()
38 self.turnRightButton:setImage(getTexture("media/
ui/ArrowRight.png"))
42 self.animCombo:initialise()
44 self.animCombo:addOptionWithData(getText("IGUI_anim_Walk"), "EventWalk")
45 self.animCombo:addOptionWithData(getText("IGUI_anim_Idle"), "EventIdle")
46 self.animCombo:addOptionWithData(getText("IGUI_anim_Run"), "EventRun")
47 self.animCombo.selected = 1
51 ISPanel.prerender(
self)
58 local direction =
self.avatarPanel:getDirection()
59 if button.
internal == "TURNCHARACTERLEFT" then
60 direction = IsoDirections.RotLeft(direction)
61 self.avatarPanel:setDirection(direction)
62 elseif button.
internal == "TURNCHARACTERRIGHT" then
63 direction = IsoDirections.RotRight(direction)
64 self.avatarPanel:setDirection(direction)
69--
self.avatarPanel:setState(combo:getOptionData(combo.selected))
70 self.avatarPanel:reportEvent(combo:getOptionData(combo.selected))
78 self.avatarPanel:setSurvivorDesc(survivorDesc)
87 -- The panel is bigger than it appears when the animation selection
dropdown is removed. Maybe there's
a better way to handle that?
88 o.backgroundColor = {r=0, g=0, b=0,
a=0}
89 o.borderColor = {r=0, g=0, b=0,
a=0}
90 o.direction = defaultDirection and defaultDirection or IsoDirections.SW
91 o.defaultAnimation = defaultAnimation
void local FONT_HGT_SMALL()
void PFW_CharacterPreview()
void local FONT_HGT_MEDIUM()
void processingNotification backgroundColor a()
void onAnimSelected(combo)
void onTurnChar(button, x, y)
void setSurvivorDesc(survivorDesc)
void setCharacter(character)