Skip to content
Snippets Groups Projects
Commit e6edcbe4 authored by DarkGod's avatar DarkGod
Browse files

fix some dialogs

Mystical Cunning only gives traps/poisons depending how what you know
parent 07fe15d4
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,7 @@ function _M:init(title, player)
{name="Who", width=20, display_prop="who", sort="who"},
}, list=self.list, fct=function(item) end, select=function(item, sel) self:select(item) end}
local sep = Separator.new{dir="horizontal", size=self.ih - 10 - self.c_self.h}
self:loadUI{
{left=0, top=0, ui=self.c_self},
{left=self.c_self.w, top=0, ui=self.c_main},
......@@ -79,8 +80,8 @@ function _M:init(title, player)
{left=0, top=self.c_self.h, ui=self.c_list},
{left=self.iw * 0.6 + 10, top=self.c_self.h, ui= self.c_image},
{right=0, top=self.c_image.h + self.c_self.h, ui=self.c_desc},
{left=self.iw * 0.6 - 5, top=self.c_self.h + 5, ui=Separator.new{dir="horizontal", size=self.ih - 10 - self.c_self.h}},
{left=self.c_list.w+sep.w, top=self.c_image.h + self.c_self.h, ui=self.c_desc},
{left=self.iw * 0.6 - 5, top=self.c_self.h + 5, ui=sep},
}
self:setFocus(self.c_list)
self:setupUI()
......
......@@ -48,8 +48,13 @@ function _M:init(t)
self.plus = _M:getUITexture("ui/plus.png")
self.minus = _M:getUITexture("ui/minus.png")
-- Draw the scrollbar
if self.scrollbar then
self.scrollbar = Slider.new{size=self.h, max=1}
end
local w = self.w
if self.scrollbar then w = w - 10 end
if self.scrollbar then w = w - self.scrollbar.w end
local colw = 0
for j, col in ipairs(self.columns) do
if type(col.width) == "table" then
......@@ -176,11 +181,6 @@ function _M:generate()
self.max_display = math.floor(self.h / fh)
-- Draw the scrollbar
if self.scrollbar then
self.scrollbar = Slider.new{size=self.h - fh, max=1}
end
-- Draw the tree items
self:drawTree()
......
......@@ -63,13 +63,14 @@ function _M:init()
{name="Version", width=20, display_prop="version_txt"},
}, list={}, fct=function(item) self:switchAddon(item) end, select=function(item, sel) self:select(item) end}
local sep = Separator.new{dir="horizontal", size=self.ih - 10}
self:loadUI{
{left=0, top=0, ui=url1},
{left=url1, top=0, ui=url2},
{left=0, top=url1.h, ui=self.c_list},
{right=0, top=url1.h, ui=self.c_adds},
{left=self.c_list.w+sep.w, top=url1.h, ui=self.c_adds},
{left=0, bottom=0, ui=self.c_compat},
{left=self.c_list.w + 5, top=5+url1.h, ui=Separator.new{dir="horizontal", size=self.ih - 10}},
{left=self.c_list.w + 5, top=5+url1.h, ui=sep},
}
self:setFocus(self.c_list)
self:setupUI()
......
......@@ -55,12 +55,13 @@ function _M:init()
select=function(item, sel) self:select(item) end,
}
local sep = Separator.new{dir="horizontal", size=self.ih - 10}
self:loadUI{
{left=0, top=0, ui=self.c_tree},
{right=0, top=0, ui=self.c_desc},
{left=self.c_tree.w+sep.w, top=0, ui=self.c_desc},
{right=0, bottom=0, ui=self.c_delete, hidden=true},
{left=0, bottom=0, ui=self.c_play, hidden=true},
{left=self.c_tree.w + 5, top=5, ui=Separator.new{dir="horizontal", size=self.ih - 10}},
{left=self.c_tree.w + 5, top=5, ui=sep},
{left=self.c_tree.w - self.c_compat.w, bottom=0, ui=self.c_compat},
}
self:setFocus(self.c_tree)
......@@ -156,7 +157,7 @@ function _M:innerDisplay(x, y, nb_keyframes)
local h = w / r
h = math.min(h, self.ih / 1.7)
w = h * r
s[1]:toScreenFull(x + self.ix + self.iw - self.c_desc.w, y + self.ih - h - 20, w, h, s[2] * w / s.w, s[3] * h / s.h)
s[1]:toScreenFull(x + self.ix + self.iw - self.c_desc.w + 10, y + self.ih - h - 20, w, h, s[2] * w / s.w, s[3] * h / s.h)
end
function _M:playSave()
......
......@@ -43,12 +43,13 @@ function _M:init()
{name="Version", width=20, display_prop="version_txt"},
}, list=self.list, fct=function(item) end, select=function(item, sel) self:select(item) end}
local sep = Separator.new{dir="horizontal", size=self.ih - 10}
self:loadUI{
{left=0, top=0, ui=self.c_list},
{right=0, top=0, ui=self.c_desc},
{left=self.c_list.w+sep.w, top=0, ui=self.c_desc},
{left=0, bottom=self.c_compat.h, ui=self.c_switch},
{left=0, bottom=0, ui=self.c_compat},
{left=self.c_list.w + 5, top=5, ui=Separator.new{dir="horizontal", size=self.ih - 10}},
{left=self.c_list.w + 5, top=5, ui=sep},
}
self:setFocus(self.c_list)
self:setupUI()
......
......@@ -52,11 +52,12 @@ function _M:init()
columns = {{name="World",width=100,display_prop="world"}},
list={}, select=function(item,sel) self:changeworlds(item) end, fct=function(item) end}
local sep = Separator.new{dir="horizontal", size=self.ih - 10}
self:loadUI{
{left=0, top=0, ui=self.c_list},
{right=0, top=0, ui=self.c_desc},
{left=self.c_list.w+sep.w, top=0, ui=self.c_desc},
{left=0, bottom=0, ui=self.c_sublist},
{left=self.c_list.w + 5, top=5, ui=Separator.new{dir="horizontal", size=self.ih - 10}},
{left=self.c_list.w + 5, top=5, ui=sep},
}
self:setFocus(self.c_list)
self:setupUI()
......
......@@ -64,8 +64,8 @@ uberTalent{
end} },
on_learn = function(self, t)
self:attr("combat_spellresist", 20)
self:learnTalent(self.T_VULNERABILITY_POISON, true, nil, {no_unlearn=true})
self:learnTalent(self.T_GRAVITIC_TRAP, true, nil, {no_unlearn=true})
if self:knowTalent(self.T_VILE_POISONS) then self:learnTalent(self.T_VULNERABILITY_POISON, true, nil, {no_unlearn=true}) end
if self:knowTalent(self.T_TRAP_MASTERY) then self:learnTalent(self.T_GRAVITIC_TRAP, true, nil, {no_unlearn=true}) end
end,
on_unlearn = function(self, t)
self:attr("combat_spellresist", -20)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment