some UI changes

This commit is contained in:
Eduardo Bart
2012-01-14 17:31:20 -02:00
parent c6013dfeda
commit 5e5ddae167
20 changed files with 48 additions and 47 deletions

View File

@@ -1,7 +1,8 @@
Skills = {}
-- private variables
local skillWindow = nil
local skillWindow
local skillsButton
-- private functions
local function getNumberString(number)
@@ -42,13 +43,21 @@ end
-- public functions
function Skills.create()
skillWindow = displayUI('skills.otui', { parent = Game.gameRightPanel })
--skillsButton = TopMenu.addButton('skillsButton', 'Skills (Ctrl+S)', '/core_styles/icons/skills.png', Skills.toggle)
--skillsButton:setWidth(32)
end
function Skills.destroy()
--skillsButton:destroy()
--skillsButton = nil
skillWindow:destroy()
skillWindow = nil
end
function Skills.toggle()
end
function Skills.onSkillButtonClick(button)
local percentBar = button:getChildById('percent')
if percentBar then

View File

@@ -2,9 +2,7 @@ SkillFirstWidget < UIWidget
SkillButton < UIButton
height: 21
margin-top: 3
margin-left: 10
margin-right: 10
margin-bottom: 2
&onClick: Skills.onSkillButtonClick
SkillNameLabel < GameLabel
@@ -35,15 +33,11 @@ SkillPercentPanel < ProgressBar
MiniWindow
id: skillWindow
text: Skills
size: 200 310
size: 200 350
Panel
id: skillPanel
anchors.fill: parent
margin-top: 26
margin-bottom: 3
margin-left: 3
margin-right: 3
layout: verticalBox
SkillButton