Improve minimap

This commit is contained in:
Eduardo Bart
2012-07-12 16:16:23 -03:00
parent 1f6cd33109
commit c0c2411854
5 changed files with 78 additions and 77 deletions

View File

@@ -1,27 +1,24 @@
MapControl < Button
size: 16 16
size: 20 20
$pressed:
image-clip: 0 0 16 16
icon-clip: 0 0 16 16
$hover !pressed:
image-clip: 0 16 16 16
icon-clip: 0 16 16 16
$!pressed !hover:
image-clip: 0 32 16 16
$disabled:
image-color: #ffffff88
icon-clip: 0 32 16 16
FloorUpControl < MapControl
image-source: /game_minimap/floor_up.png
icon-source: /game_minimap/floor_up.png
FloorDownControl < MapControl
image-source: /game_minimap/floor_down.png
icon-source: /game_minimap/floor_down.png
//ZoomOutControl < MapControl
//image-source: /game_minimap/zoom_out.png
//ZoomInControl < MapControl
//image-source: /game_minimap/zoom_in.png
@@ -37,81 +34,78 @@ MiniWindow
padding: 3
UIMap
id: minimap
anchors.left: parent.left
anchors.top: parent.top
size: 110 110
anchors.fill: parent
UIButton
id: compass
image-source: /game_minimap/compass.png
image-smooth: true
color: #ffffff
anchors.left: minimap.right
anchors.top: minimap.top
size: 60 60
margin-top: 3
margin-left: 5
anchors.left: parent.left
anchors.top: parent.top
size: 48 48
margin-top: 4
margin-left: 4
@onClick: function(...) Minimap.compassClick(...) end
UIButton
id: compassReset
text: Reset
text: R
font: verdana-11px-rounded
anchors.left: compass.left
anchors.top: compass.top
margin-top: 25
margin-left: 14
anchors.centerIn: compass
margin-top: 2
margin-right: 1
@onClick: function(...) Minimap.center(...) end
$pressed:
color: #eb9f4f88
margin-top: 26
margin-left: 15
$hover !pressed:
color: #eb9f4f
$!pressed !hover:
color: #ffffff
margin-top: 25
margin-left: 14
$disabled:
image-color: #ffffff88
FloorUpControl
id: floorUp
anchors.left: minimap.right
anchors.top: compass.bottom
margin-top: 10
margin-left: 15
anchors.right: parent.right
anchors.bottom: parent.bottom
margin-right: 28
margin-bottom: 28
enabled: true
@onClick: Minimap.onButtonClick(self:getId())
FloorDownControl
id: floorDown
anchors.left: floorUp.left
anchors.top: floorUp.bottom
margin-top: 4
anchors.right: parent.right
anchors.bottom: parent.bottom
margin-right: 28
margin-bottom: 4
enabled: true
@onClick: Minimap.onButtonClick(self:getId())
Button
id: zoomIn
text: +
size: 16 16
anchors.left: floorUp.right
anchors.top: floorUp.top
margin-left: 10
size: 20 20
anchors.right: parent.right
anchors.bottom: parent.bottom
margin-right: 4
margin-bottom: 28
enabled: true
@onClick: Minimap.onButtonClick(self:getId())
Button
id: zoomOut
text: -
font: terminus-14px-bold
size: 16 16
anchors.left: floorDown.right
anchors.top: floorDown.top
margin-left: 10
size: 20 20
anchors.right: parent.right
anchors.bottom: parent.bottom
margin-right: 4
margin-bottom: 4
enabled: true
@onClick: Minimap.onButtonClick(self:getId())