mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
improve minimap
This commit is contained in:
@@ -65,6 +65,15 @@ function GameInterface.init()
|
||||
Keyboard.bindKeyDown('Ctrl+L', GameInterface.tryLogout, gameRootPanel)
|
||||
Keyboard.bindKeyDown('Ctrl+W', function() g_map.cleanTexts() TextMessage.clearMessages() end, gameRootPanel)
|
||||
|
||||
Keyboard.bindKeyDown('Ctrl+.', function()
|
||||
if gameMapPanel:isKeepAspectRatioEnabled() then
|
||||
gameMapPanel:setKeepAspectRatio(false)
|
||||
else
|
||||
gameMapPanel:setKeepAspectRatio(true)
|
||||
gameMapPanel:setVisibleDimension({ width = 15, height = 11 })
|
||||
end
|
||||
end)
|
||||
|
||||
if g_game.isOnline() then
|
||||
GameInterface.show()
|
||||
end
|
||||
|
@@ -5,9 +5,6 @@ Module
|
||||
website: www.otclient.info
|
||||
|
||||
@onLoad: |
|
||||
importStyle 'styles/items.otui'
|
||||
importStyle 'styles/creatures.otui'
|
||||
importStyle 'styles/miniwindow.otui'
|
||||
importStyle 'styles/countwindow.otui'
|
||||
|
||||
dofile 'widgets/uigamemap'
|
||||
|
@@ -1,5 +0,0 @@
|
||||
Creature < UICreature
|
||||
size: 80 80
|
||||
padding: 1
|
||||
image-source: /images/panel_flat.png
|
||||
image-border: 1
|
@@ -1,6 +0,0 @@
|
||||
Item < UIItem
|
||||
size: 34 34
|
||||
padding: 1
|
||||
image-source: /images/item.png
|
||||
font: verdana-11px-rounded
|
||||
border-color: white
|
@@ -1,91 +0,0 @@
|
||||
MiniWindow < UIMiniWindow
|
||||
font: verdana-11px-antialised
|
||||
icon-rect: 4 4 16 16
|
||||
width: 192
|
||||
height: 200
|
||||
text-offset: 24 5
|
||||
text-align: topLeft
|
||||
image-source: /images/miniwindow.png
|
||||
image-border: 4
|
||||
image-border-top: 23
|
||||
image-border-bottom: 4
|
||||
focusable: false
|
||||
&minimizedHeight: 24
|
||||
|
||||
$on:
|
||||
image-border-bottom: 2
|
||||
|
||||
UIButton
|
||||
id: closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
margin-top: 5
|
||||
margin-right: 5
|
||||
size: 14 14
|
||||
image-source: /images/miniwindowbuttons.png
|
||||
image-clip: 28 0 14 14
|
||||
|
||||
$hover:
|
||||
image-clip: 28 14 14 14
|
||||
|
||||
$pressed:
|
||||
image-clip: 28 28 14 14
|
||||
|
||||
UIButton
|
||||
id: minimizeButton
|
||||
anchors.top: closeButton.top
|
||||
anchors.right: closeButton.left
|
||||
margin-right: 3
|
||||
size: 14 14
|
||||
image-source: /images/miniwindowbuttons.png
|
||||
image-clip: 0 0 14 14
|
||||
|
||||
$hover:
|
||||
image-clip: 0 14 14 14
|
||||
|
||||
$pressed:
|
||||
image-clip: 0 28 14 14
|
||||
|
||||
$on:
|
||||
image-clip: 14 0 14 14
|
||||
|
||||
$on hover:
|
||||
image-clip: 14 14 14 14
|
||||
|
||||
$on pressed:
|
||||
image-clip: 14 28 14 14
|
||||
|
||||
VerticalScrollBar
|
||||
id: miniwindowScrollBar
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
step: 14
|
||||
margin-top: 22
|
||||
margin-right: 2
|
||||
margin-bottom: 3
|
||||
pixels-scroll: true
|
||||
|
||||
$!on:
|
||||
width: 0
|
||||
|
||||
ResizeBorder
|
||||
id: bottomResizeBorder
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 3
|
||||
minimum: 64
|
||||
background: #ffffff88
|
||||
|
||||
MiniWindowContents < ScrollablePanel
|
||||
id: contentsPanel
|
||||
anchors.fill: parent
|
||||
anchors.right: miniwindowScrollBar.left
|
||||
margin-top: 19
|
||||
padding: 3 5 3 5
|
||||
vertical-scrollbar: miniwindowScrollBar
|
||||
|
||||
BorderlessGameWindow < UIWindow
|
||||
focusable: false
|
||||
margin: 2
|
Reference in New Issue
Block a user