mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 15:26:49 +01:00
create in game interface panels and renable about and options windows
This commit is contained in:
19
modules/about/about.lua
Normal file
19
modules/about/about.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
About = {}
|
||||
|
||||
-- private variables
|
||||
local about
|
||||
|
||||
-- public functions
|
||||
function About.create()
|
||||
about = UI.loadAndDisplay("/about/about.otui")
|
||||
UI.root:lockChild(about)
|
||||
end
|
||||
|
||||
function About.destroy()
|
||||
about:destroy()
|
||||
about = nil
|
||||
end
|
||||
|
||||
function About.openWebpage()
|
||||
displayErrorBox("Error", "Not implemented yet")
|
||||
end
|
||||
13
modules/about/about.otmod
Normal file
13
modules/about/about.otmod
Normal file
@@ -0,0 +1,13 @@
|
||||
Module
|
||||
name: about
|
||||
description: Create the about window
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
autoLoad: true
|
||||
dependencies:
|
||||
- core
|
||||
|
||||
onLoad: |
|
||||
require 'about'
|
||||
return true
|
||||
|
||||
61
modules/about/about.otui
Normal file
61
modules/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
|
||||
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