Version 0.95 BETA

This commit is contained in:
OTCv8
2019-10-02 03:38:52 +02:00
parent 9219c78f15
commit 5220a3bdd2
501 changed files with 38097 additions and 2 deletions

View File

@@ -0,0 +1,50 @@
-- private variables
local background
local clientVersionLabel
-- public functions
function init()
background = g_ui.displayUI('background')
background:lower()
clientVersionLabel = background:getChildById('clientVersionLabel')
clientVersionLabel:setText(g_app.getName() .. ' ' .. g_app.getVersion() .. '\nMade by:\n' .. g_app.getAuthor() .. "\notclient@otclient.ovh")
if not g_game.isOnline() then
addEvent(function() g_effects.fadeIn(clientVersionLabel, 1500) end)
end
connect(g_game, { onGameStart = hide })
connect(g_game, { onGameEnd = show })
end
function terminate()
disconnect(g_game, { onGameStart = hide })
disconnect(g_game, { onGameEnd = show })
g_effects.cancelFade(background:getChildById('clientVersionLabel'))
background:destroy()
Background = nil
end
function hide()
background:hide()
end
function show()
background:show()
end
function hideVersionLabel()
background:getChildById('clientVersionLabel'):hide()
end
function setVersionText(text)
clientVersionLabel:setText(text)
end
function getBackground()
return background
end

View File

@@ -0,0 +1,10 @@
Module
name: client_background
description: Handles the background of the login screen
author: edubart
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ background ]
dependencies: [ client_topmenu ]
@onLoad: init()
@onUnload: terminate()

View File

@@ -0,0 +1,24 @@
Panel
id: background
image-source: /images/background
image-smooth: true
image-fixed-ratio: true
anchors.top: topMenu.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
margin-top: 1
focusable: false
UILabel
id: clientVersionLabel
background-color: #00000099
anchors.right: parent.right
anchors.bottom: parent.bottom
text-align: center
text-auto-resize: false
width: 220
height: 90
padding: 2
color: #ffffff
font: terminus-14px-bold