Commit e8994c858e5c748f67052392db525137634ba53f

Authored by DarkGod
1 parent 28b73c5d

plop

@@ -29,6 +29,8 @@ function _M:init(t) @@ -29,6 +29,8 @@ function _M:init(t)
29 self.actor = assert(t.actor, "no actorframe actor") 29 self.actor = assert(t.actor, "no actorframe actor")
30 self.w = assert(t.w, "no actorframe w") 30 self.w = assert(t.w, "no actorframe w")
31 self.h = assert(t.h, "no actorframe h") 31 self.h = assert(t.h, "no actorframe h")
  32 + self.allow_cb = t.allow_cb
  33 + self.allow_shader = t.allow_shader
32 self.tiles = t.tiles or Tiles.new(self.w, self.h, nil, nil, true, nil) 34 self.tiles = t.tiles or Tiles.new(self.w, self.h, nil, nil, true, nil)
33 35
34 Base.init(self, t) 36 Base.init(self, t)
@@ -45,9 +47,9 @@ function _M:display(x, y, nb_keyframes, ox, oy) @@ -45,9 +47,9 @@ function _M:display(x, y, nb_keyframes, ox, oy)
45 local o = self.actor 47 local o = self.actor
46 if o and o.toScreen then 48 if o and o.toScreen then
47 if o.image then 49 if o.image then
48 - o:toScreen(self.tiles, x, y, self.w, self.h) 50 + o:toScreen(self.tiles, x, y, self.w, self.h, nil, self.allow_cb, self.allow_shader)
49 elseif o.image and o.add_mos then 51 elseif o.image and o.add_mos then
50 - o:toScreen(self.tiles, x, y - h, self.w, self.h * 2) 52 + o:toScreen(self.tiles, x, y - h, self.w, self.h * 2, nil, self.allow_cb, self.allow_shader)
51 end 53 end
52 end 54 end
53 55
@@ -37,15 +37,15 @@ function _M:makeUI() @@ -37,15 +37,15 @@ function _M:makeUI()
37 37
38 self.c_desc = Textzone.new{font=self.chat.dialog_text_font, width=self.iw - 10 - xoff, height=1, auto_height=true, text=self.text.."\n", can_focus=false} 38 self.c_desc = Textzone.new{font=self.chat.dialog_text_font, width=self.iw - 10 - xoff, height=1, auto_height=true, text=self.text.."\n", can_focus=false}
39 self.c_list = VariableList.new{font=self.chat.dialog_answer_font, width=self.iw - 10 - xoff, max_height=game.h * 0.70 - self.c_desc.h, list=self.list, fct=function(item) self:use(item) end, select=function(item) self:select(item) end} 39 self.c_list = VariableList.new{font=self.chat.dialog_answer_font, width=self.iw - 10 - xoff, max_height=game.h * 0.70 - self.c_desc.h, list=self.list, fct=function(item) self:use(item) end, select=function(item) self:select(item) end}
40 - local npc_frame = ActorFrame.new{actor=self.npc.chat_display_entity or self.npc, w=64, h=64}  
41 - local player_frame = ActorFrame.new{actor=self.player.chat_display_entity or self.player, w=64, h=64} 40 + local npc_frame = ActorFrame.new{actor=self.npc.chat_display_entity or self.npc, w=128, h=128, allow_shader=false, allow_cb=false}
  41 + local player_frame = ActorFrame.new{actor=self.player.chat_display_entity or self.player, w=128, h=128, allow_shader=false, allow_cb=false}
42 42
43 local uis = { 43 local uis = {
44 {left=0, top=0, ui=self.c_desc}, 44 {left=0, top=0, ui=self.c_desc},
45 {right=0, bottom=math.max(self.c_desc.h, npc_frame.h) + 5, ui=self.c_list}, 45 {right=0, bottom=math.max(self.c_desc.h, npc_frame.h) + 5, ui=self.c_list},
46 {left=5, top=self.c_desc.h - 10, ui=Separator.new{ui="simple", dir="vertical", size=self.iw - 10}}, 46 {left=5, top=self.c_desc.h - 10, ui=Separator.new{ui="simple", dir="vertical", size=self.iw - 10}},
47 - {right=-64, top=-64, ui=npc_frame, ignore_size=true},  
48 - {left=-64, top=-64, ui=player_frame, ignore_size=true}, 47 + {right=-128, vcenter=0, ui=npc_frame, ignore_size=true},
  48 + {left=-128, vcenter=0, ui=player_frame, ignore_size=true},
49 } 49 }
50 50
51 self:loadUI(uis) 51 self:loadUI(uis)