mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
reorganize modules
This commit is contained in:
18
modules/client_about/about.lua
Normal file
18
modules/client_about/about.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
About = {}
|
||||
|
||||
-- private variables
|
||||
local aboutWindow
|
||||
|
||||
-- public functions
|
||||
function About.create()
|
||||
aboutWindow = UI.display('about.otui', { locked = true })
|
||||
end
|
||||
|
||||
function About.destroy()
|
||||
aboutWindow:destroy()
|
||||
aboutWindow = nil
|
||||
end
|
||||
|
||||
function About.openWebpage()
|
||||
displayErrorBox("Error", "Not implemented yet")
|
||||
end
|
10
modules/client_about/about.otmod
Normal file
10
modules/client_about/about.otmod
Normal file
@@ -0,0 +1,10 @@
|
||||
Module
|
||||
name: client_about
|
||||
description: Create the about window
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
|
||||
onLoad: |
|
||||
require 'about'
|
||||
return true
|
||||
|
61
modules/client_about/about.otui
Normal file
61
modules/client_about/about.otui
Normal file
@@ -0,0 +1,61 @@
|
||||
MainWindow
|
||||
id: about
|
||||
title: Info
|
||||
size: 244 221
|
||||
|
||||
FlatPanel
|
||||
size: 208 129
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin-top: 32
|
||||
margin-left: 18
|
||||
|
||||
Label
|
||||
text-align: center
|
||||
text: |-
|
||||
OTClient
|
||||
Version 0.2.0
|
||||
Created by edubart
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
margin-top: 20
|
||||
|
||||
HorizontalSeparator
|
||||
size: 190 2
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin-top: 83
|
||||
margin-left: 9
|
||||
|
||||
Label
|
||||
text: Official Website
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin-bottom: 14
|
||||
margin-left: 9
|
||||
|
||||
Button
|
||||
text: Github Page
|
||||
size: 88 24
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin-bottom: 9
|
||||
margin-right: 9
|
||||
@onClick: About.openWebpage()
|
||||
|
||||
HorizontalSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin-bottom: 40
|
||||
margin-left: 13
|
||||
margin-right: 13
|
||||
|
||||
Button
|
||||
text: Ok
|
||||
size: 46 24
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin-top: 191
|
||||
margin-left: 188
|
||||
@onClick: About.destroy()
|
Reference in New Issue
Block a user