styles adjustment

This commit is contained in:
Eduardo Bart 2012-01-11 10:06:50 -02:00
parent 71ed758a3f
commit 0e88b03693
16 changed files with 57 additions and 124 deletions

8
TODO
View File

@ -40,7 +40,7 @@
[bart] reapply anchor styles when adding new childs [bart] reapply anchor styles when adding new childs
[bart] ui text selection [bart] ui text selection
[bart] implement ui window moving policies [bart] implement ui window moving policies
make set of background/icon/image width alone work
break window anchors when moving break window anchors when moving
== Client modules == Client modules
@ -89,14 +89,12 @@ break window anchors when moving
===== KNOWN BUGS ===== KNOWN BUGS
2x2 corpses is drawn above players 2x2 corpses is drawn above players
creatures with invisible effect is not rendered correctly
animatedtext is displayed in non visible floors animatedtext is displayed in non visible floors
attack while walking cancels the walk attack while walking cancels the walk
trying to walking in follow doesn't cancel de walk
if a spell is used while pressing arrows keys the walk is canceled and it doesnt starts walking again if a spell is used while pressing arrows keys the walk is canceled and it doesnt starts walking again
game map text message boxes is not displayed like tibia game map text message boxes is not displayed like tibia
name/shields doesnt follow the creature when walking on parcels name/shields doesnt follow the creature when walking on parcels
hotkeys wont work with caps lock hotkeys wont work with caps lock
hotkeys works while windows are locked, it shouldnt hotkeys works while windows are locked, it shouldnt
some animated hits are displayed as 2 hits instead of one
-- current todo
allow usage of background width alone

View File

@ -7,8 +7,6 @@ MainWindow
size: 208 129 size: 208 129
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
margin-top: 32
margin-left: 18
Label Label
text-align: center text-align: center
@ -46,16 +44,12 @@ MainWindow
HorizontalSeparator HorizontalSeparator
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.top: prev.bottom
margin-bottom: 40 margin-top: 12
margin-left: 13
margin-right: 13
Button Button
text: Ok text: Ok
size: 46 24 size: 46 24
anchors.left: parent.left anchors.right: parent.right
anchors.top: parent.top anchors.bottom: parent.bottom
margin-top: 191
margin-left: 188
@onClick: self:getParent():destroy() @onClick: self:getParent():destroy()

View File

@ -19,10 +19,7 @@ MainWindow
id: characterList id: characterList
anchors.fill: parent anchors.fill: parent
anchors.bottom: next.top anchors.bottom: next.top
margin-top: 30
margin-bottom: 5 margin-bottom: 5
margin-left: 16
margin-right: 16
padding: 1 padding: 1
focusable: false focusable: false
@ -34,7 +31,6 @@ MainWindow
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: separator.top anchors.bottom: separator.top
margin-left: 16
margin-bottom: 5 margin-bottom: 5
HorizontalSeparator HorizontalSeparator
@ -42,8 +38,6 @@ MainWindow
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: next.top anchors.bottom: next.top
margin-left: 16
margin-right: 16
margin-bottom: 10 margin-bottom: 10
//CheckBox //CheckBox
@ -63,8 +57,7 @@ MainWindow
width: 64 width: 64
anchors.right: next.left anchors.right: next.left
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
margin-bottom: 16 margin-right: 10
margin-right: 16
@onClick: CharacterList.doLogin() @onClick: CharacterList.doLogin()
Button Button
@ -73,6 +66,4 @@ MainWindow
width: 64 width: 64
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
margin-bottom: 16
margin-right: 16
@onClick: CharacterList.destroy() @onClick: CharacterList.destroy()

View File

@ -9,8 +9,6 @@ MainWindow
text: Account name text: Account name
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
margin-left: 18
margin-top: 28
LineEdit LineEdit
id: accountNameLineEdit id: accountNameLineEdit
@ -18,8 +16,6 @@ MainWindow
anchors.right: parent.right anchors.right: parent.right
anchors.top: prev.bottom anchors.top: prev.bottom
margin-top: 2 margin-top: 2
margin-left: 18
margin-right: 18
LargerLabel LargerLabel
text: Password text: Password
@ -33,8 +29,6 @@ MainWindow
anchors.right: parent.right anchors.right: parent.right
anchors.top: prev.bottom anchors.top: prev.bottom
margin-top: 2 margin-top: 2
margin-left: 18
margin-right: 18
LargerLabel LargerLabel
id: serverLabel id: serverLabel
@ -76,8 +70,6 @@ MainWindow
anchors.right: parent.right anchors.right: parent.right
anchors.top: prev.bottom anchors.top: prev.bottom
margin-top: 10 margin-top: 10
margin-left: 18
margin-right: 18
@onCheckChange: self:getParent():getChildById('autoLoginBox'):setEnabled(self:isChecked()) @onCheckChange: self:getParent():getChildById('autoLoginBox'):setEnabled(self:isChecked())
CheckBox CheckBox
@ -88,17 +80,14 @@ MainWindow
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: prev.bottom anchors.top: prev.bottom
margin-top: 8 margin-top: 2
margin-left: 18
margin-right: 18
Button Button
text: Ok text: Ok
width: 64 width: 64
anchors.right: next.left anchors.right: next.left
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
margin-bottom: 16 margin-right: 10
margin-right: 16
@onClick: EnterGame.doLogin() @onClick: EnterGame.doLogin()
Button Button
@ -106,6 +95,4 @@ MainWindow
width: 64 width: 64
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
margin-bottom: 16
margin-right: 16
@onClick: EnterGame.hide() @onClick: EnterGame.hide()

View File

@ -1,25 +1,23 @@
OptionCheckBox < CheckBox OptionCheckBox < CheckBox
margin-left: 18
margin-right: 18
@onCheckChange: Options.changeOption(self:getId(), self:isChecked()) @onCheckChange: Options.changeOption(self:getId(), self:isChecked())
@onSetup: self:setChecked(Options[self:getId()]) @onSetup: self:setChecked(Options[self:getId()])
$first: $first:
margin-top: 28
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
$middle: $middle:
margin-top: 10
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: prev.bottom anchors.top: prev.bottom
margin-top: 2
MainWindow MainWindow
id: optionsWindow id: optionsWindow
text: Options text: Options
size: 286 280 size: 286 230
@onEnter: Options.hide() @onEnter: Options.hide()
@onEscape: Options.hide() @onEscape: Options.hide()
@ -59,6 +57,7 @@ MainWindow
OptionCheckBox OptionCheckBox
id: showLevelsInConsole id: showLevelsInConsole
text: Show levels in console text: Show levels in console
//OptionCheckBox //OptionCheckBox
// id: showPrivateMessagesInConsole // id: showPrivateMessagesInConsole
// text: Show private messages in console // text: Show private messages in console
@ -68,6 +67,4 @@ MainWindow
width: 64 width: 64
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
margin-right: 10
margin-bottom: 10
@onClick: Options.hide() @onClick: Options.hide()

View File

@ -3,19 +3,16 @@ Button < UIButton
color: #f0ad4dff color: #f0ad4dff
size: 106 24 size: 106 24
text-offset: 0 0 text-offset: 0 0
image-color: white image-color: white
image-source: /core_styles/images/button.png image-source: /core_styles/images/button.png
image-border: 5 image-border: 5
$hover: $hover:
image-source: /core_styles/images/button_hover.png image-source: /core_styles/images/button_hover.png
image-border: 5
$pressed: $pressed:
text-offset: 1 1 text-offset: 1 1
image-source: /core_styles/images/button_down.png image-source: /core_styles/images/button_down.png
image-border: 5
$disabled: $disabled:
color: #f0ad4d88 color: #f0ad4d88

View File

@ -1,29 +1,26 @@
CheckBox < UICheckBox CheckBox < UICheckBox
size: 12 12 size: 16 16
box-size: 12 12
text-align: left text-align: left
text-offset: 16 0 text-offset: 16 0
color: #aaaaaa color: #aaaaaa
image-color: #ffffffff image-color: #ffffffff
image-rect: 0 0 12 12 image-rect: 0 0 12 12
image-offset: 0 2
image-source: /core_styles/images/checkbox.png
$hover: $hover:
color: #cccccc color: #cccccc
$!checked: $!checked:
image-source: /core_styles/images/checkbox.png
image-clip: 0 0 12 12 image-clip: 0 0 12 12
$hover !checked: $hover !checked:
image-source: /core_styles/images/checkbox.png
image-clip: 0 12 12 12 image-clip: 0 12 12 12
$checked: $checked:
image-source: /core_styles/images/checkbox.png
image-clip: 0 24 12 12 image-clip: 0 24 12 12
$hover checked: $hover checked:
image-source: /core_styles/images/checkbox.png
image-clip: 0 36 12 12 image-clip: 0 36 12 12
$disabled: $disabled:
@ -32,39 +29,31 @@ CheckBox < UICheckBox
ColorBox < UICheckBox ColorBox < UICheckBox
size: 16 16 size: 16 16
box-size: 16 16
image-color: #ffffffff image-color: #ffffffff
image-source: /core_styles/images/colorbox.png
$checked: $checked:
image: image-clip: 16 0 16 16
source: /core_styles/images/colorbox.png
clip: 16 0 16 16
$!checked: $!checked:
image: image-clip: 0 0 16 16
source: /core_styles/images/colorbox.png
clip: 0 0 16 16
ButtonBox < UICheckBox ButtonBox < UICheckBox
font: verdana-11px-antialised font: verdana-11px-antialised
color: #f0ad4dff color: #f0ad4dff
size: 106 24 size: 106 24
box-size: 106 24
text-offset: 0 0 text-offset: 0 0
text-align: center text-align: center
image-color: white
image-source: /core_styles/images/button.png image-source: /core_styles/images/button.png
image-color: white
image-border: 5 image-border: 5
$hover: $hover:
image-source: /core_styles/images/button_hover.png image-source: /core_styles/images/button_hover.png
image-border: 5
$checked: $checked:
text-offset: 1 1 text-offset: 1 1
image-source: /core_styles/images/button_down.png image-source: /core_styles/images/button_down.png
image-border: 5
$disabled: $disabled:
color: #f0ad4d88 color: #f0ad4d88

View File

@ -1,14 +1,9 @@
ComboBoxPopupMenuButton < UIButton ComboBoxPopupMenuButton < UIButton
height: 18
font: verdana-11px-antialised font: verdana-11px-antialised
image-color: alpha
text-align: left text-align: left
text-offset: 2 0 text-offset: 2 0
color: #aaaaaa color: #aaaaaa
height: 18
margin-left: 1
margin-right: 1
margin-top: 0
margin-bottom: 0
background-color: white background-color: white
$hover: $hover:
@ -18,18 +13,10 @@ ComboBoxPopupMenuButton < UIButton
$disabled: $disabled:
color: #555555 color: #555555
$first:
margin-top: 1
$last:
margin-bottom: 1
ComboBoxPopupMenuSeparator < UIWidget ComboBoxPopupMenuSeparator < UIWidget
margin-left: 1
margin-right: 1
image-source: /core_styles/images/combobox.png image-source: /core_styles/images/combobox.png
image-repeated: true image-repeated: true
clip: 1 59 89 1 image-clip: 1 59 89 1
height: 1 height: 1
phantom: true phantom: true
@ -38,6 +25,7 @@ ComboBoxPopupMenu < UIPopupMenu
image-clip: 0 60 89 20 image-clip: 0 60 89 20
image-border: 1 image-border: 1
image-border-top: 0 image-border-top: 0
padding: 1
ComboBox < UIComboBox ComboBox < UIComboBox
font: verdana-11px-antialised font: verdana-11px-antialised
@ -51,13 +39,7 @@ ComboBox < UIComboBox
image-clip: 0 0 89 20 image-clip: 0 0 89 20
$hover: $hover:
image-source: /core_styles/images/combobox.png
image-border: 1
image-border-right: 17
image-clip: 0 20 89 20 image-clip: 0 20 89 20
$on: $on:
image-source: /core_styles/images/combobox.png
image-border: 1
image-border-right: 17
image-clip: 0 40 89 20 image-clip: 0 40 89 20

View File

@ -20,7 +20,7 @@ InterfacePanel2 < Panel
image-source: /core_styles/images/interface_panel2.png image-source: /core_styles/images/interface_panel2.png
image-border: 4 image-border: 4
Map< UIMap Map < UIMap
padding: 4 padding: 4
image-source: /core_styles/images/map_panel.png image-source: /core_styles/images/map_panel.png
image-border: 4 image-border: 4

View File

@ -1,12 +1,10 @@
PopupMenuButton < UIButton PopupMenuButton < UIButton
font: verdana-11px-antialised
image-color: alpha
color: #aaaaaa
height: 18 height: 18
margin-left: 3 margin-left: 3
margin-right: 3 margin-right: 3
margin-top: 0 font: verdana-11px-antialised
margin-bottom: 0
color: #aaaaaa
background-color: alpha background-color: alpha
$hover: $hover:
@ -16,12 +14,6 @@ PopupMenuButton < UIButton
$disabled: $disabled:
color: #555555 color: #555555
$first:
margin-top: 3
$last:
margin-bottom: 3
PopupMenuSeparator < UIWidget PopupMenuSeparator < UIWidget
margin-left: 2 margin-left: 2
margin-right: 2 margin-right: 2
@ -34,6 +26,7 @@ PopupMenuSeparator < UIWidget
PopupMenu < UIPopupMenu PopupMenu < UIPopupMenu
width: 50 width: 50
border-image:
image-source: /core_styles/images/menubox.png image-source: /core_styles/images/menubox.png
image-border: 3 image-border: 3
padding-top: 3
padding-bottom: 3

View File

@ -1,4 +1,4 @@
ProgressBar < UIProgressBar ProgressBar < UIProgressBar
height: 15 height: 16
background-color: red background-color: red
border: 1 black border: 1 black

View File

@ -1,6 +1,6 @@
HorizontalSeparator < UIWidget HorizontalSeparator < UIWidget
image-source: /core_styles/images/horizontal_separator.png image-source: /core_styles/images/horizontal_separator.png
image-border.top: 2 image-border-top: 2
height: 2 height: 2
phantom: true phantom: true
focusable: false focusable: false

View File

@ -11,12 +11,29 @@ Window < UIWindow
image-border: 4 image-border: 4
image-border-top: 20 image-border-top: 20
//$pressed:
// opacity: 0.75
$disabled: $disabled:
color: #aaaaaa88 color: #aaaaaa88
Window2 < UIWindow
font: verdana-11px-antialised
size: 200 200
opacity: 1
color: white
text-offset: 0 2
text-align: top
image-source: /core_styles/images/window.png
image-border: 4
image-border-top: 20
padding-top: 28
padding-left: 16
padding-right: 16
padding-bottom: 16
$disabled:
color: #aaaaaa88
MainWindow < Window2
anchors.centerIn: parent
MiniWindow < UIWindow MiniWindow < UIWindow
font: verdana-11px-antialised font: verdana-11px-antialised
size: 192 200 size: 192 200
@ -30,5 +47,3 @@ MiniWindow < UIWindow
image-border: 4 image-border: 4
image-border-top: 25 image-border-top: 25
MainWindow < Window
anchors.centerIn: parent

View File

@ -140,7 +140,7 @@ function Outfit.create(creature, outfitList)
local outfitColor = getOufitColor(j*19 + i) local outfitColor = getOufitColor(j*19 + i)
color:setId('color' .. j*19+i) color:setId('color' .. j*19+i)
color.colorId = j*19 + i color.colorId = j*19 + i
color:setBackgroundColor(outfitColor) color:setImageColor(outfitColor)
color:setMarginTop(j * 3 + j * 14) color:setMarginTop(j * 3 + j * 14)
color:setMarginLeft(10 + i * 3 + i * 14) color:setMarginLeft(10 + i * 3 + i * 14)

View File

@ -59,7 +59,7 @@ MiniWindow
text: Level text: Level
SkillValueLabel SkillValueLabel
SkillPercentPanel SkillPercentPanel
image-color: red background-color: red
SkillButton SkillButton
id: health id: health
@ -102,7 +102,7 @@ MiniWindow
text: Magic Level text: Magic Level
SkillValueLabel SkillValueLabel
SkillPercentPanel SkillPercentPanel
image-color: red background-color: red
SkillButton SkillButton
id: skillId0 id: skillId0

View File

@ -9,25 +9,18 @@ MainWindow
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
margin-left: 16
margin-right: 16
margin-top: 32
LineEdit LineEdit
id: name id: name
anchors.top: prev.bottom anchors.top: prev.bottom
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
margin-left: 16
margin-right: 16
margin-top: 4 margin-top: 4
HorizontalSeparator HorizontalSeparator
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: next.top anchors.bottom: next.top
margin-left: 16
margin-right: 16
margin-bottom: 10 margin-bottom: 10
Button Button
@ -35,8 +28,7 @@ MainWindow
width: 64 width: 64
anchors.right: next.left anchors.right: next.left
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
margin-bottom: 16 margin-right: 10
margin-right: 16
@onClick: VipList.addVip() @onClick: VipList.addVip()
Button Button
@ -44,6 +36,4 @@ MainWindow
width: 64 width: 64
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
margin-bottom: 16
margin-right: 16
@onClick: VipList.destroyAddWindow() @onClick: VipList.destroyAddWindow()