mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
reorganize modules
This commit is contained in:
22
modules/background/background.lua
Normal file
22
modules/background/background.lua
Normal file
@@ -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
|
18
modules/background/background.otmod
Normal file
18
modules/background/background.otmod
Normal file
@@ -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()
|
||||
|
12
modules/background/background.otui
Normal file
12
modules/background/background.otui
Normal file
@@ -0,0 +1,12 @@
|
||||
Panel
|
||||
id: background
|
||||
image:
|
||||
source: /background/background.png
|
||||
smooth: true
|
||||
fixed ratio: true
|
||||
anchors.top: topMenu.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.top: 1
|
||||
focusable: false
|
BIN
modules/background/background.png
Normal file
BIN
modules/background/background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 MiB |
Reference in New Issue
Block a user