some UI changes

master
Eduardo Bart 12年前
コミット 5e5ddae167

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

バイナリファイルは表示されません。

変更後

幅:  |  高さ:  |  サイズ: 391 B

バイナリファイルは表示されません。

変更後

幅:  |  高さ:  |  サイズ: 1.1 KiB

バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 42 KiB

変更後

幅:  |  高さ:  |  サイズ: 39 KiB

バイナリファイルは表示されません。

変更後

幅:  |  高さ:  |  サイズ: 400 B

@ -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

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

@ -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

@ -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

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

@ -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

@ -23,20 +23,21 @@ function Containers.onContainerOpen(containerId, itemId, name, capacity, hasPare
if container then
Game.gameRightPanel:removeChild(container)
end
container = displayUI('container.otui', { parent = Game.gameRightPanel })
name = name:sub(1,1):upper() .. name:sub(2)
container:setText(name)
-- set icon, itemid
-- closebutton
-- resize
if hasParent then
-- parent button
end
container.itemCount = 0
container.capacity = capacity
for i=1,capacity do
local item = UIItem.create()
item:setStyle('Item')
@ -65,7 +66,7 @@ function Containers.onContainerAddItem(containerId, item)
local pos = item:getPos()
pos.z = container.itemCount
item:setPos(pos)
local itemWidget = container:getChildByIndex(container.itemCount + 1)
itemWidget:setItem(item)
container.itemCount = container.itemCount + 1

@ -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

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

@ -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

@ -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

@ -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

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

@ -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();

@ -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

読み込み中…
キャンセル
保存