master
Henrique 13 years ago
parent 35f7b816ee
commit d814932a16

@ -0,0 +1,40 @@
skillWindow = nil
local skills = {"Fist Fighting", "Club Fighting", "Sword Fighting", "Axe Fighting", "Distance Fighting", "Shielding", "Fishing"}
function csw()
skillWindow = loadUI("/game/ui/skillwindow.otui", UI.root)
local skillPanel = skillWindow:getChildById('skillPanel')
-- create first widget cause of layout
local widget = UIWidget.create()
skillPanel:addChild(widget)
widget:setStyle('SkillFirstWidget')
-- create skills
for i=1,#skills,1 do
local nameLabel = UILabel.create()
skillPanel:addChild(nameLabel)
nameLabel:setStyle('SkillNameLabel')
nameLabel:setText(skills[i])
local levelLabel = UILabel.create()
skillPanel:addChild(levelLabel)
levelLabel:setStyle('SkillLevelLabel')
levelLabel:setId('skillLevelId' .. i)
levelLabel:setText('10')
local percentPanel = UIWidget.create()
skillPanel:addChild(percentPanel)
percentPanel:setStyle('SkillPercentPanel')
end
end
function Game.setSkill(id, level, percent)
local skillPanel = skillWindow:getChildById('skillPanel')
local levelLabel = skillPanel:getChildById('skillLevel' .. id)
end

@ -0,0 +1,47 @@
SkillFirstWidget < UIWidget
margin.top: 2
anchors.top: parent.top
SkillNameLabel < Label
font: tibia-10px-monochrome
margin.top: 2
margin.left: 10
margin.right: 10
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
SkillLevelLabel < Label
font: tibia-10px-monochrome
align: right
margin.top: 2
margin.left: 10
margin.right: 10
anchors.top: prev.top
anchors.left: parent.left
anchors.right: parent.right
SkillPercentPanel < UIWidget
color: blue
background-color: red
height: 4
margin.top: 2
margin.left: 10
margin.right: 10
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
Window
id: skillWindow
title: Skills
size: 200 200
Panel
id: skillPanel
anchors.fill: parent
margin.top: 19
margin.bottom: 3
margin.left: 3
margin.right: 3

@ -0,0 +1,16 @@
VipListLabel < Label
font: tibia-10px-monochrome
margin.left: 30
Window
id: vipWindow
title: VIP
size: 200 200
TextList
id: vipList
anchors.fill: parent
margin.top: 19
margin.bottom: 3
margin.left: 3
margin.right: 3
Loading…
Cancel
Save