mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
change in topmenu and some fixes
This commit is contained in:
@@ -80,6 +80,14 @@ function TopMenu.removeButton(param)
|
||||
button:destroy()
|
||||
end
|
||||
|
||||
function TopMenu.hideGameButtons()
|
||||
gameButtonsPanel:hide()
|
||||
end
|
||||
|
||||
function TopMenu.showGameButtons()
|
||||
gameButtonsPanel:show()
|
||||
end
|
||||
|
||||
function TopMenu.getButton(id)
|
||||
return topMenu:recursiveGetChildById(id)
|
||||
end
|
||||
@@ -87,3 +95,7 @@ end
|
||||
function TopMenu:getLogoutButton(id)
|
||||
return TopMenu.getButton('logoutButton')
|
||||
end
|
||||
|
||||
|
||||
connect(Game, { onLogin = TopMenu.showGameButtons,
|
||||
onLogout = TopMenu.hideGameButtons})
|
@@ -25,45 +25,13 @@ GameTopButton < UIButton
|
||||
icon-color: #ffffffff
|
||||
image-border: 3
|
||||
|
||||
$hover:
|
||||
$on:
|
||||
image-clip: 0 0 26 26
|
||||
image-color: #ffffffff
|
||||
icon-color: #ffffffff
|
||||
|
||||
$first:
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
margin-top: 4
|
||||
margin-left: 6
|
||||
|
||||
$!first:
|
||||
anchors.top: prev.top
|
||||
anchors.left: prev.right
|
||||
margin-left: 6
|
||||
|
||||
TopLeftButton < TopButton
|
||||
$first:
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
margin-top: 4
|
||||
margin-left: 6
|
||||
|
||||
$!first:
|
||||
anchors.top: prev.top
|
||||
anchors.left: prev.right
|
||||
margin-left: 6
|
||||
|
||||
TopRightButton < TopButton
|
||||
$first:
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
margin-top: 4
|
||||
margin-right: 6
|
||||
|
||||
$!first:
|
||||
anchors.top: prev.top
|
||||
anchors.right: prev.left
|
||||
margin-right: 6
|
||||
|
||||
TopPanel
|
||||
id: topMenu
|
||||
@@ -77,7 +45,11 @@ TopPanel
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
width: 150
|
||||
layout:
|
||||
type: horizontalBox
|
||||
spacing: 4
|
||||
fit-children: true
|
||||
padding: 6 4
|
||||
|
||||
Panel
|
||||
id: gameButtonsPanel
|
||||
@@ -85,13 +57,21 @@ TopPanel
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: prev.right
|
||||
anchors.right: next.left
|
||||
layout:
|
||||
type: horizontalBox
|
||||
spacing: 4
|
||||
padding: 6 4
|
||||
|
||||
Panel
|
||||
id: rightButtonsPanel
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
width: 70
|
||||
layout:
|
||||
type: horizontalBox
|
||||
spacing: 4
|
||||
fit-children: true
|
||||
padding: 6 4
|
||||
|
||||
FrameCounter
|
||||
id: frameCounter
|
||||
|
Reference in New Issue
Block a user