mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
BEAWARE all game functionality is disabled with this commit for a while
* rework client modules * hide main window when loading * remake top menu functions * rework modules autoload * improve path resolving for otml and lua * move core_widgets to core_lib * fix tooltip issues * split some styles * add bit32 lua library * fix assert issues * fix compilation on linux 32 systems * rework gcc compile options * renable and fix some warnings * remove unused constants * speedup sprite cache * move UIGame to lua (not funcional yet) * fix a lot of issues in x11 window * fix crash handler * add some warnings do uiwidget and much more...
This commit is contained in:
@@ -2,22 +2,33 @@ About = {}
|
||||
|
||||
-- private variables
|
||||
local aboutButton
|
||||
local aboutWindow
|
||||
|
||||
-- public functions
|
||||
function About.init()
|
||||
aboutButton = TopMenu.addRightButton('aboutButton', 'About', 'about.png', About.display)
|
||||
end
|
||||
|
||||
function About.display()
|
||||
displayUI('about.otui', { locked = true })
|
||||
aboutButton = TopMenu.addRightButton('aboutButton', 'About', 'about.png', About.show)
|
||||
aboutWindow = displayUI('about.otui')
|
||||
aboutWindow:hide()
|
||||
end
|
||||
|
||||
function About.terminate()
|
||||
aboutButton:destroy()
|
||||
aboutButton = nil
|
||||
aboutWindow:destroy()
|
||||
aboutWindow = nil
|
||||
About = nil
|
||||
end
|
||||
|
||||
function About.show()
|
||||
aboutWindow:show()
|
||||
aboutWindow:raise()
|
||||
aboutWindow:focus()
|
||||
end
|
||||
|
||||
function About.hide()
|
||||
aboutWindow:hide()
|
||||
end
|
||||
|
||||
function About.openWebpage()
|
||||
displayErrorBox("Error", "Not implemented yet")
|
||||
end
|
||||
|
@@ -3,16 +3,14 @@ Module
|
||||
description: Create the about window
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
autoload: true
|
||||
autoload-antecedence: 160
|
||||
unloadable: true
|
||||
reloadable: true
|
||||
|
||||
dependencies:
|
||||
- client_topmenu
|
||||
|
||||
onLoad: |
|
||||
@onLoad: |
|
||||
dofile 'about'
|
||||
About.init()
|
||||
|
||||
onUnload: |
|
||||
@onUnload: |
|
||||
About.terminate()
|
||||
|
@@ -3,6 +3,9 @@ MainWindow
|
||||
text: Info
|
||||
size: 244 221
|
||||
|
||||
@onEnter: About.hide()
|
||||
@onEscape: About.hide()
|
||||
|
||||
FlatPanel
|
||||
size: 208 129
|
||||
anchors.left: parent.left
|
||||
@@ -52,4 +55,4 @@ MainWindow
|
||||
size: 46 24
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
@onClick: self:getParent():destroy()
|
||||
@onClick: About.hide()
|
||||
|
Reference in New Issue
Block a user