Refactor modules, closes #223

* All modules are sandboxed now
* All images,sounds,fonts,translations and styles were moved to "data" folder
* Reorganize image files folders
* Remove unmaintained modules: client_particles, client_shaders
* Implement new automatic way to load styles and fonts
* Add hide/show offline option in VipList
* Add invite/exclude to/from private channel in players menus
* Many other minor changes
This commit is contained in:
Eduardo Bart
2013-01-18 20:39:11 -02:00
parent 20d9176d10
commit 28b5fc1d5a
330 changed files with 1171 additions and 1823 deletions

View File

@@ -1,15 +1,13 @@
Background = { }
-- private variables
local background
-- public functions
function Background.init()
background = g_ui.displayUI('background.otui')
function init()
background = g_ui.displayUI('background')
background:lower()
local clientVersionLabel = background:getChildById('clientVersionLabel')
clientVersionLabel:setText('OTClient ' .. g_app.getVersion() .. '\n' ..
clientVersionLabel:setText(g_app.getName() .. ' ' .. g_app.getVersion() .. '\n' ..
'Rev ' .. g_app.getBuildRevision() .. ' ('.. g_app.getBuildCommit() .. ')\n' ..
'Built on ' .. g_app.getBuildDate())
@@ -17,13 +15,13 @@ function Background.init()
g_effects.fadeIn(clientVersionLabel, 1500)
end
connect(g_game, { onGameStart = Background.hide })
connect(g_game, { onGameEnd = Background.show })
connect(g_game, { onGameStart = hide })
connect(g_game, { onGameEnd = show })
end
function Background.terminate()
disconnect(g_game, { onGameStart = Background.hide })
disconnect(g_game, { onGameEnd = Background.show })
function terminate()
disconnect(g_game, { onGameStart = hide })
disconnect(g_game, { onGameEnd = show })
g_effects.cancelFade(background:getChildById('clientVersionLabel'))
background:destroy()
@@ -32,14 +30,14 @@ function Background.terminate()
Background = nil
end
function Background.hide()
function hide()
background:hide()
end
function Background.show()
function show()
background:show()
end
function Background.hideVersionLabel()
function hideVersionLabel()
background:getChildById('clientVersionLabel'):hide()
end

View File

@@ -3,13 +3,8 @@ Module
description: Handles the background of the login screen
author: edubart
website: www.otclient.info
dependencies:
- client_topmenu
@onLoad: |
dofile 'background'
Background.init()
@onUnload: |
Background.terminate()
sandboxed: true
scripts: [ background ]
dependencies: [ client_topmenu ]
@onLoad: init()
@onUnload: terminate()

View File

@@ -1,6 +1,6 @@
Panel
id: background
image-source: /client_background/background.png
image-source: /images/background
image-smooth: true
image-fixed-ratio: true
anchors.top: topMenu.bottom

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB