Implemented the mount interface, Fixed some interface stuff, Some cosmetics, and Updated the outfits window

* Added new arrow buttons.
* Fixed the vertical separator.
* Added new game_playermount module to handle player mounting.
* Moved the battle icons to /images.
* Outfit window accommodates for mounts, loads addons more efficiently and keeps addons set on update, added new Outfit.randomize function that allows you to randomize your outfit colors, and set up a new layout.
This commit is contained in:
BeniS
2012-07-15 23:49:28 +12:00
parent 3db6217b7c
commit 5520501673
39 changed files with 506 additions and 267 deletions

View File

@@ -1,5 +1,8 @@
Minimap = {}
-- public variables
minimapFirstLoad = true
-- private variables
local minimapWidget
local minimapButton
@@ -8,7 +11,6 @@ local DEFAULT_ZOOM = 60
local MAX_FLOOR_UP = 0
local MAX_FLOOR_DOWN = 15
local navigating = false
minimapFirstLoad = true
-- private functions
function onMinimapMouseRelease(self, mousePosition, mouseButton)
@@ -54,9 +56,9 @@ function Minimap.init()
minimapWindow = g_ui.loadUI('minimap.otui', GameInterface.getRightPanel())
minimapWidget = minimapWindow:recursiveGetChildById('minimap')
g_mouse.bindAutoPress(minimapWidget, Minimap.compassClick, nil, MouseRightButton)
g_mouse.bindAutoPress(minimapWidget, Minimap.compassClick, nil, MouseLeftButton)
minimapWidget:setAutoViewMode(false)
minimapWidget:setViewMode(1) -- mid view
minimapWidget:setDrawMinimapColors(true)
@@ -150,13 +152,13 @@ function Minimap.onButtonClick(id)
elseif id == "floorUp" then
local pos = minimapWidget:getCameraPosition()
pos.z = pos.z - 1
if(pos.z > MAX_FLOOR_UP) then
if pos.z > MAX_FLOOR_UP then
minimapWidget:setCameraPosition(pos)
end
elseif id == "floorDown" then
local pos = minimapWidget:getCameraPosition()
pos.z = pos.z + 1
if(pos.z < MAX_FLOOR_DOWN) then
if pos.z < MAX_FLOOR_DOWN then
minimapWidget:setCameraPosition(pos)
end
end

View File

@@ -1,5 +1,6 @@
MapControl < Button
size: 20 20
icon-clip: 0 32 16 16
$pressed:
icon-clip: 0 0 16 16
@@ -7,19 +8,16 @@ MapControl < Button
$hover !pressed:
icon-clip: 0 16 16 16
$!pressed !hover:
icon-clip: 0 32 16 16
FloorUpControl < MapControl
icon-source: /game_minimap/floor_up.png
FloorDownControl < MapControl
icon-source: /game_minimap/floor_down.png
//ZoomOutControl < MapControl
ZoomOutControl < MapControl
//image-source: /game_minimap/zoom_out.png
//ZoomInControl < MapControl
ZoomInControl < MapControl
//image-source: /game_minimap/zoom_in.png
MiniWindow
@@ -64,10 +62,9 @@ MiniWindow
enabled: true
@onClick: Minimap.onButtonClick(self:getId())
Button
ZoomInControl
id: zoomIn
text: +
size: 20 20
anchors.right: parent.right
anchors.bottom: parent.bottom
margin-right: 4
@@ -75,11 +72,10 @@ MiniWindow
enabled: true
@onClick: Minimap.onButtonClick(self:getId())
Button
ZoomOutControl
id: zoomOut
text: -
font: terminus-14px-bold
size: 20 20
anchors.right: parent.right
anchors.bottom: parent.bottom
margin-right: 4