mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
new layout system, new UI state/styles system
This commit is contained in:
34
modules/mainmenu/ui/charlist.otui
Normal file
34
modules/mainmenu/ui/charlist.otui
Normal file
@@ -0,0 +1,34 @@
|
||||
MainWindow
|
||||
id: charactersWindow
|
||||
title: Charlist
|
||||
size: 200 250
|
||||
|
||||
TextList
|
||||
id: charactersList
|
||||
anchors.fill: parent
|
||||
margin.top: 30
|
||||
margin.bottom: 50
|
||||
margin.left: 16
|
||||
margin.right: 16
|
||||
|
||||
Button
|
||||
id: buttonOk
|
||||
text: Ok
|
||||
width: 64
|
||||
anchors.right: next.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 16
|
||||
margin.right: 16
|
||||
|
||||
Button
|
||||
id: buttonCancel
|
||||
text: Cancel
|
||||
width: 64
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 16
|
||||
margin.right: 16
|
||||
onClick: |
|
||||
function(self)
|
||||
self:getParent():destroy()
|
||||
end
|
@@ -1,7 +1,8 @@
|
||||
MenuButton < Button
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin.top: 10
|
||||
margin.bottom: 11
|
||||
margin.left: 20
|
||||
margin.right: 20
|
||||
|
||||
|
||||
Panel
|
||||
id: mainMenuBackground
|
||||
@@ -9,6 +10,7 @@ Panel
|
||||
source: /mainmenu/ui/background.png
|
||||
smooth: true
|
||||
anchors.fill: parent
|
||||
focusable: false
|
||||
|
||||
RoundedPanel
|
||||
id: mainMenu
|
||||
@@ -17,24 +19,20 @@ Panel
|
||||
anchors.bottom: parent.bottom
|
||||
margin.left: 60
|
||||
margin.bottom: 70
|
||||
layout: verticalBox
|
||||
|
||||
MenuButton
|
||||
text: Enter Game
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin.top: 18
|
||||
onClick: |
|
||||
local enterGameWindow = loadUI("/mainmenu/ui/entergamewindow.otui")
|
||||
rootWidget:addChild(enterGameWindow)
|
||||
GFX.fadeIn(enterGameWindow)
|
||||
onClick: UI.loadAndDisplayLocked("/mainmenu/ui/entergamewindow.otui")
|
||||
|
||||
MenuButton
|
||||
text: Options
|
||||
onClick: rootWidget:addChild(loadUI("/mainmenu/ui/optionswindow.otui"))
|
||||
onClick: UI.loadAndDisplayLocked("/mainmenu/ui/optionswindow.otui")
|
||||
|
||||
MenuButton
|
||||
text: Info
|
||||
onClick: rootWidget:addChild(loadUI("/mainmenu/ui/infowindow.otui"))
|
||||
onClick: UI.loadAndDisplayLocked("/mainmenu/ui/infowindow.otui")
|
||||
|
||||
MenuButton
|
||||
text: Exit
|
||||
|
@@ -89,7 +89,7 @@ MainWindow
|
||||
onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
|
||||
Label
|
||||
text: |
|
||||
text: |-
|
||||
Show the most recent
|
||||
Message of the Day
|
||||
anchors.left: prev.right
|
||||
|
Reference in New Issue
Block a user