From 9499262f38b402c9e73a84888a0a4e03e5d8c167 Mon Sep 17 00:00:00 2001 From: Alexander Sedov <alex0player@gmail.com> Date: Tue, 16 Dec 2014 16:20:21 +0300 Subject: [PATCH] Fixed summon orders --- game/modules/tome/dialogs/orders/Talents.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/game/modules/tome/dialogs/orders/Talents.lua b/game/modules/tome/dialogs/orders/Talents.lua index b6e597471e..7602d23d68 100644 --- a/game/modules/tome/dialogs/orders/Talents.lua +++ b/game/modules/tome/dialogs/orders/Talents.lua @@ -32,14 +32,16 @@ function _M:init(actor, def) self.def = def Dialog.init(self, "Define tactical talents usage", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) - self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - 10), height=1, auto_height=true, no_color_bleed=true, text=([[ + local vsep = Separator.new{dir="horizontal", size=self.ih - 10} + local halfwidth = math.floor((self.iw - vsep.w)/2) + self.c_tut = Textzone.new{width=halfwidth, height=1, auto_height=true, no_color_bleed=true, text=([[ %s is listening attentively, and wants to know what talents to use. You can modify the tactical weights of various talents to increase or decrease their use. The weights are multiplicative (zero will turn the talent off) and relative (changing everything to a weight of 2 will not alter how talents are used relative to each other). Word travels fast in Maj'Eyal, and if %s is a summon all future summons of the same type will remember your preferences. ]]):format(actor.name:capitalize(), actor.name)} - self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - 10), height=self.ih, no_color_bleed=true} + self.c_desc = TextzoneList.new{width=halfwidth, height=self.ih, no_color_bleed=true} - self.c_list = ListColumns.new{width=math.floor(self.iw / 2 - 10), height=self.ih - 10, sortable=true, scrollbar=true, columns={ + self.c_list = ListColumns.new{width=halfwidth, height=self.ih - 10, sortable=true, scrollbar=true, columns={ {name="", width={20,"fixed"}, display_prop="char", sort="id"}, {name="Talent Name", width=72, display_prop="name", sort="name"}, {name="Weight", width=20, display_prop="multiplier", sort="multiplier"}, @@ -51,7 +53,7 @@ Word travels fast in Maj'Eyal, and if %s is a summon all future summons of the s {left=0, top=0, ui=self.c_list}, {right=0, top=self.c_tut.h + 20, ui=self.c_desc}, {right=0, top=0, ui=self.c_tut}, - {hcenter=0, top=5, ui=Separator.new{dir="horizontal", size=self.ih - 10}}, + {hcenter=0, top=5, ui=vsep}, } self:setFocus(self.c_list) self:setupUI() -- GitLab