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

@ -4,7 +4,7 @@ Module
author: OTClient team
website: https://github.com/edubart/otclient
autoLoad: true
autoLoad: false
autoLoadAntecedence: 1000
onLoad: |

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

View File

@ -1,5 +1,4 @@
Item < UIItem
size: 34 34
padding: 1
image-source: /core_styles/images/panel_flat.png
image-border: 1
image-source: /core_styles/images/item.png
font: verdana-11px-rounded

View File

@ -2,3 +2,6 @@ ProgressBar < UIProgressBar
height: 16
background-color: red
border: 1 black
image: /core_styles/images/progressbar.png
image-border: 1

View File

@ -36,14 +36,21 @@ MainWindow < Window2
MiniWindow < UIWindow
font: verdana-11px-antialised
size: 192 200
text-offset: 0 5
text-align: top
margin-top: 10
icon: /core_styles/icons/login.png
icon-rect: 4 4 16 16
width: 192
height: 200
text-offset: 26 5
text-align: topLeft
margin-top: 2
margin-left: 6
margin-right: 6
move-policy: free updated
image-source: /core_styles/images/mini_window.png
image-border: 4
image-border-top: 25
image-border-top: 23
padding: 25 8 2 8
$on:
height: 24
image-border-bottom: 1

View File

@ -7,9 +7,9 @@ Module
dependencies:
- game_healthbar
- game_inventory
//- game_skills
- game_skills
- game_textmessage
- game_viplist
//- game_viplist
- game_console
- game_outfit
- game_containers

View File

@ -5,7 +5,7 @@ UIGame
InterfacePanel
id: gameRightPanel
width: 200
width: 178
layout: verticalBox
anchors.right: parent.right
anchors.top: parent.top

View File

@ -1,11 +1,9 @@
MiniWindow
size: 200 186
padding-top: 30
padding-left: 10
size: 200 221
layout:
type: grid
cell-size: 32 32
cell-size: 34 34
cell-spacing: 5
num-columns: 4
num-lines: 5

View File

@ -25,6 +25,7 @@ function Containers.onContainerOpen(containerId, itemId, name, capacity, hasPare
end
container = displayUI('container.otui', { parent = Game.gameRightPanel })
name = name:sub(1,1):upper() .. name:sub(2)
container:setText(name)
-- set icon, itemid

View File

@ -1,7 +1,7 @@
HealthBar < ProgressBar
id: healthBar
height: 15
background-color: red
background-color: #ff4444
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
@ -9,7 +9,7 @@ HealthBar < ProgressBar
ManaBar < ProgressBar
id: manaBar
height: 15
background-color: blue
background-color: #4444ff
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right

View File

@ -1,6 +1,6 @@
UIWindow
width: 192
height: 148
height: 154
margin-top: 10
margin-left: 6
margin-right: 6

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

View File

@ -1,19 +1,15 @@
VipListLabel < GameLabel
font: verdana-11px-monochrome
margin-left: 5
phantom: false
&onMousePress: VipList.onVipListLabelMousePress
MiniWindow
id: vipWindow
text: VIP List
height: 100
UIWidget
id: vipList
layout: verticalBox
anchors.fill: parent
margin-top: 27
margin-bottom: 6
margin-left: 6
margin-right: 6
&onMousePress: VipList.onVipListMousePress

View File

@ -36,7 +36,7 @@ public:
CreaturePtr getCreature() { return m_creature; }
private:
protected:
CreaturePtr m_creature;
};

View File

@ -25,11 +25,6 @@
#include <framework/graphics/graphics.h>
#include <framework/graphics/fontmanager.h>
UIItem::UIItem()
{
m_font = g_fonts.getFont("verdana-11px-rounded");
}
void UIItem::draw()
{
drawSelf();

View File

@ -30,15 +30,14 @@
class UIItem : public UIWidget
{
public:
UIItem();
void draw();
void setItem(const ItemPtr& item) { m_item = item; }
ItemPtr getItem() { return m_item; }
private:
protected:
ItemPtr m_item;
FontPtr m_font;
};
#endif