@ -0,0 +1,22 @@
|
|||||||
|
Background = { }
|
||||||
|
|
||||||
|
-- private variables
|
||||||
|
local background
|
||||||
|
|
||||||
|
-- public functions
|
||||||
|
function Background.create()
|
||||||
|
background = UI.loadAndDisplay('/background/background.otui')
|
||||||
|
end
|
||||||
|
|
||||||
|
function Background.destroy()
|
||||||
|
background:destroy()
|
||||||
|
background = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function Background.hide()
|
||||||
|
background:hide()
|
||||||
|
end
|
||||||
|
|
||||||
|
function Background.show()
|
||||||
|
background:show()
|
||||||
|
end
|
@ -0,0 +1,18 @@
|
|||||||
|
Module
|
||||||
|
name: background
|
||||||
|
description: Handles the background of the login screen
|
||||||
|
author: OTClient team
|
||||||
|
website: https://github.com/edubart/otclient
|
||||||
|
autoLoad: true
|
||||||
|
dependencies:
|
||||||
|
- core
|
||||||
|
- topmenu
|
||||||
|
|
||||||
|
onLoad: |
|
||||||
|
require 'background'
|
||||||
|
Background.create()
|
||||||
|
return true
|
||||||
|
|
||||||
|
onUnload:
|
||||||
|
Background.destroy()
|
||||||
|
|
@ -1,13 +1,7 @@
|
|||||||
MenuButton < Button
|
|
||||||
margin.bottom: 11
|
|
||||||
margin.left: 20
|
|
||||||
margin.right: 20
|
|
||||||
|
|
||||||
|
|
||||||
Panel
|
Panel
|
||||||
id: mainMenuBackground
|
id: background
|
||||||
image:
|
image:
|
||||||
source: /mainmenu/ui/background.png
|
source: /background/background.png
|
||||||
smooth: true
|
smooth: true
|
||||||
fixed ratio: true
|
fixed ratio: true
|
||||||
anchors.top: topMenu.bottom
|
anchors.top: topMenu.bottom
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
After Width: | Height: | Size: 9.7 KiB |
@ -0,0 +1,17 @@
|
|||||||
|
Module
|
||||||
|
name: core_styles
|
||||||
|
description: Contains ui styles used by other modules
|
||||||
|
author: OTClient team
|
||||||
|
website: https://github.com/edubart/otclient
|
||||||
|
dependencies:
|
||||||
|
- core_fonts
|
||||||
|
onLoad: |
|
||||||
|
importStyles 'styles/buttons.otui'
|
||||||
|
importStyles 'styles/labels.otui'
|
||||||
|
importStyles 'styles/panels.otui'
|
||||||
|
importStyles 'styles/separators.otui'
|
||||||
|
importStyles 'styles/lineedits.otui'
|
||||||
|
importStyles 'styles/windows.otui'
|
||||||
|
importStyles 'styles/listboxes.otui'
|
||||||
|
return true
|
||||||
|
|
Before Width: | Height: | Size: 763 B After Width: | Height: | Size: 763 B |
Before Width: | Height: | Size: 932 B After Width: | Height: | Size: 932 B |
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 696 B |
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 385 B |
Before Width: | Height: | Size: 660 B After Width: | Height: | Size: 660 B |
Before Width: | Height: | Size: 825 B After Width: | Height: | Size: 825 B |
Before Width: | Height: | Size: 833 B After Width: | Height: | Size: 833 B |
Before Width: | Height: | Size: 859 B After Width: | Height: | Size: 859 B |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
@ -0,0 +1,5 @@
|
|||||||
|
TextList < UIWidget
|
||||||
|
layout: verticalBox
|
||||||
|
border-image:
|
||||||
|
source: /core_styles/images/panel_flat.png
|
||||||
|
border: 4
|
@ -1,6 +1,6 @@
|
|||||||
HorizontalSeparator < UIWidget
|
HorizontalSeparator < UIWidget
|
||||||
border-image:
|
border-image:
|
||||||
source: /core_ui/images/horizontal_separator.png
|
source: /core_styles/images/horizontal_separator.png
|
||||||
border.top: 2
|
border.top: 2
|
||||||
height: 2
|
height: 2
|
||||||
phantom: true
|
phantom: true
|
@ -1,13 +0,0 @@
|
|||||||
Module
|
|
||||||
name: core_ui
|
|
||||||
description: Contains ui styles used by other modules
|
|
||||||
author: OTClient team
|
|
||||||
website: https://github.com/edubart/otclient
|
|
||||||
version: 0.2
|
|
||||||
autoLoad: true
|
|
||||||
dependencies:
|
|
||||||
- core_fonts
|
|
||||||
onLoad: |
|
|
||||||
require 'ui'
|
|
||||||
return true
|
|
||||||
|
|
Before Width: | Height: | Size: 171 B |
@ -1,5 +0,0 @@
|
|||||||
TextList < UIWidget
|
|
||||||
layout: verticalBox
|
|
||||||
border-image:
|
|
||||||
source: /core_ui/images/panel_flat.png
|
|
||||||
border: 4
|
|
@ -0,0 +1,21 @@
|
|||||||
|
Module
|
||||||
|
name: entergame
|
||||||
|
description: Manages enter game and character list windows
|
||||||
|
author: OTClient team
|
||||||
|
website: https://github.com/edubart/otclient
|
||||||
|
autoLoad: true
|
||||||
|
dependencies:
|
||||||
|
- core
|
||||||
|
- topmenu
|
||||||
|
- background
|
||||||
|
|
||||||
|
onLoad: |
|
||||||
|
require 'entergame'
|
||||||
|
require 'characterlist'
|
||||||
|
EnterGame.create()
|
||||||
|
return true
|
||||||
|
|
||||||
|
onUnload:
|
||||||
|
EnterGame.destroy()
|
||||||
|
|
||||||
|
|
@ -1,14 +1,10 @@
|
|||||||
UIWidget
|
UIWidget
|
||||||
id: gameRootInterface
|
id: gameRootInterface
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
anchors.top: topMenu.bottom
|
||||||
|
margin.top: 1
|
||||||
|
|
||||||
UIMap
|
UIMap
|
||||||
id: gameMap
|
id: gameMap
|
||||||
anchors.fill:parent
|
anchors.fill:parent
|
||||||
margin.right: 200
|
margin.right: 200
|
||||||
|
|
||||||
Button
|
|
||||||
anchors.left: gameMap.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
text: Logout
|
|
||||||
onClick: Game.logout(false)
|
|
@ -1,15 +0,0 @@
|
|||||||
Module
|
|
||||||
name: gfx
|
|
||||||
description: Contains utilities for generating graphics effects
|
|
||||||
author: OTClient team
|
|
||||||
website: https://github.com/edubart/otclient
|
|
||||||
version: 0.2
|
|
||||||
autoLoad: true
|
|
||||||
dependencies:
|
|
||||||
- core
|
|
||||||
|
|
||||||
onLoad: |
|
|
||||||
require 'gfx'
|
|
||||||
return true
|
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
MainMenu = { }
|
|
||||||
|
|
||||||
-- private variables
|
|
||||||
local mainMenu
|
|
||||||
|
|
||||||
-- public functions
|
|
||||||
function MainMenu.create()
|
|
||||||
mainMenu = UI.loadAndDisplay("/mainmenu/ui/mainmenu.otui")
|
|
||||||
end
|
|
||||||
|
|
||||||
function MainMenu.destroy()
|
|
||||||
mainMenu:destroy()
|
|
||||||
mainMenu = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
function MainMenu.hide()
|
|
||||||
mainMenu:hide()
|
|
||||||
end
|
|
||||||
|
|
||||||
function MainMenu.show()
|
|
||||||
mainMenu:show()
|
|
||||||
end
|
|
@ -1,27 +0,0 @@
|
|||||||
Module
|
|
||||||
name: mainmenu
|
|
||||||
description: Create the game main menu
|
|
||||||
author: OTClient team
|
|
||||||
website: https://github.com/edubart/otclient
|
|
||||||
version: 0.2
|
|
||||||
autoLoad: true
|
|
||||||
dependencies:
|
|
||||||
- core
|
|
||||||
- topmenu
|
|
||||||
|
|
||||||
onLoad: |
|
|
||||||
require 'mainmenu'
|
|
||||||
require 'entergame'
|
|
||||||
require 'characterlist'
|
|
||||||
|
|
||||||
if not initialized then
|
|
||||||
MainMenu.create()
|
|
||||||
EnterGame.show()
|
|
||||||
initialized = true
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
|
|
||||||
onUnload: |
|
|
||||||
MainMenu.destroy()
|
|
||||||
initialized = false
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
RoundedRectPanel
|
|
||||||
id: loginPanel
|
|
||||||
background-color: #000000e5
|
|
||||||
size: 192 164
|
|
||||||
anchors.centerIn: parent
|
|
||||||
margin.top: 64
|
|
||||||
opacity: 0
|
|
||||||
|
|
||||||
LargerLabel
|
|
||||||
text: Account name
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: parent.top
|
|
||||||
margin.left: 16
|
|
||||||
margin.top: 12
|
|
||||||
|
|
||||||
LineEdit
|
|
||||||
id: accountNameLineEdit
|
|
||||||
text: otclient0
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: prev.bottom
|
|
||||||
margin.left: 14
|
|
||||||
margin.right: 14
|
|
||||||
|
|
||||||
LargerLabel
|
|
||||||
text: Password
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: prev.bottom
|
|
||||||
margin.left: 16
|
|
||||||
margin.top: 8
|
|
||||||
|
|
||||||
PasswordLineEdit
|
|
||||||
id: accountPasswordLineEdit
|
|
||||||
text: 123456
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: prev.bottom
|
|
||||||
margin.left: 14
|
|
||||||
margin.right: 14
|
|
||||||
|
|
||||||
Button
|
|
||||||
id: loginButton
|
|
||||||
text: Login
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
margin.bottom: 20
|
|
||||||
onClick: EnterGame.doLogin()
|
|
Before Width: | Height: | Size: 5.4 KiB |
@ -1 +1 @@
|
|||||||
--UI.loadAndDisplayLocked('/mainmenu/ui/charlist.otui')
|
-- place any code for testing purposes here
|