a lot of changes in modules

This commit is contained in:
Eduardo Bart
2012-02-06 17:19:47 -02:00
parent add8505a5b
commit 88301c329a
50 changed files with 488 additions and 322 deletions

View File

@@ -1,38 +0,0 @@
Client = {}
function Client.init()
g_window.show()
g_window.setMinimumSize({ width = 600, height = 480 })
-- initialize in fullscreen mode on mobile devices
if g_window.getPlatformType() == "X11-EGL" then
g_window.setFullscreen(true)
else
-- window size
local size = { width = 800, height = 600 }
size = Settings.getSize('window-size', size)
g_window.resize(size)
-- window position, default is the screen center
local displaySize = g_window.getDisplaySize()
local defaultPos = { x = (displaySize.width - size.width)/2,
y = (displaySize.height - size.height)/2 }
local pos = Settings.getPoint('window-pos', defaultPos)
g_window.move(pos)
-- window maximized?
local maximized = Settings.getBoolean('window-maximized', false)
if maximized then g_window.maximize() end
end
g_window.setTitle('OTClient')
g_window.setIcon(resolvepath('clienticon.png'))
end
function Client.terminate()
-- save window configs
Settings.set('window-size', g_window.getUnmaximizedSize())
Settings.set('window-pos', g_window.getUnmaximizedPos())
Settings.set('window-maximized', g_window.isMaximized())
g_window.hide()
end

View File

@@ -1,24 +0,0 @@
Module
name: client
description: Load all other otclient dependecies
author: OTClient team
website: https://github.com/edubart/otclient
canUnload: false
// NOTE: order does matter
dependencies:
- client_background
- client_topmenu
- client_tibiafiles
- client_about
- client_options
- client_entergame
- client_modulemanager
- game
onLoad: |
dofile 'client'
Client.init()
onUnload: |
Client.terminate()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 518 B