merge total remake
@@ -1,10 +0,0 @@
|
||||
glyph-height: 14
|
||||
glyph-spacing: [1, 1]
|
||||
top-margin: 2
|
||||
image: helvetica-11px-bold.png
|
||||
image-glyph-size: [16, 16]
|
||||
|
||||
glyph-widths:
|
||||
32: 4
|
||||
65: 8
|
||||
|
Before Width: | Height: | Size: 8.3 KiB |
@@ -1,9 +0,0 @@
|
||||
glyph-height: 14
|
||||
glyph-spacing: [1, 1]
|
||||
top-margin: 1
|
||||
image: helvetica-11px.png
|
||||
image-glyph-size: [16, 16]
|
||||
|
||||
glyph-widths:
|
||||
32: 4
|
||||
|
Before Width: | Height: | Size: 8.1 KiB |
@@ -1,10 +0,0 @@
|
||||
glyph-height: 16
|
||||
glyph-spacing: [1, 1]
|
||||
top-margin: 2
|
||||
image: helvetica-12px-bold.png
|
||||
image-glyph-size: [18, 18]
|
||||
|
||||
glyph-widths:
|
||||
32: 4
|
||||
65: 9
|
||||
|
Before Width: | Height: | Size: 9.8 KiB |
@@ -1,9 +0,0 @@
|
||||
glyph-height: 15
|
||||
glyph-spacing: [1, 1]
|
||||
top-margin: 1
|
||||
image: helvetica-12px.png
|
||||
image-glyph-size: [16, 16]
|
||||
|
||||
glyph-widths:
|
||||
32: 4
|
||||
65: 8
|
Before Width: | Height: | Size: 9.0 KiB |
@@ -1,10 +0,0 @@
|
||||
glyph-height: 16
|
||||
glyph-spacing: [1, 1]
|
||||
top-margin: 2
|
||||
image: helvetica-14px-bold.png
|
||||
image-glyph-size: [20, 20]
|
||||
|
||||
glyph-widths:
|
||||
32: 4
|
||||
65: 9
|
||||
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,8 +0,0 @@
|
||||
-- AnchorPoint
|
||||
AnchorNone = 0
|
||||
AnchorTop = 1
|
||||
AnchorBottom = 2
|
||||
AnchorLeft = 3
|
||||
AnchorRight = 4
|
||||
AnchorVerticalCenter = 5
|
||||
AnchorHorizontalCenter = 6
|
@@ -1,3 +0,0 @@
|
||||
require 'constants'
|
||||
require 'util'
|
||||
require 'messagebox'
|
@@ -1,92 +0,0 @@
|
||||
MessageBox = {}
|
||||
MessageBox.__index = MessageBox
|
||||
|
||||
-- messagebox flags
|
||||
MessageBoxOk = 1
|
||||
MessageBoxCancel = 2
|
||||
|
||||
function MessageBox.create(title, text, flags)
|
||||
local box = {}
|
||||
setmetatable(box, MessageBox)
|
||||
|
||||
-- create messagebox window
|
||||
local window = UIWindow.create()
|
||||
id = "messageBoxWindow"
|
||||
window.title = title
|
||||
window:centerIn(rootUI)
|
||||
window:setLocked(true)
|
||||
rootUI:addChild(window)
|
||||
|
||||
-- create messagebox label
|
||||
local label = UILabel.create()
|
||||
id = "messageBoxLabel"
|
||||
label.text = text
|
||||
label:addAnchor(AnchorHorizontalCenter, window.id, AnchorHorizontalCenter)
|
||||
label:addAnchor(AnchorTop, window.id, AnchorTop)
|
||||
--label:setMargin(27, 0)
|
||||
window:addChild(label)
|
||||
|
||||
-- set window size based on label size
|
||||
window.width = label.width + 40
|
||||
window.height = label.height + 64
|
||||
|
||||
-- setup messagebox first button
|
||||
local buttonText
|
||||
local button1 = UIButton.new()
|
||||
id = "messageBoxButton1"
|
||||
button1:addAnchor(AnchorBottom, window.id, AnchorBottom)
|
||||
button1:addAnchor(AnchorRight, window.id, AnchorRight)
|
||||
--button1:setMargin(10)
|
||||
button1.width = 64
|
||||
window:addChild(button1)
|
||||
|
||||
if flags == MessageBoxOk then
|
||||
button1.text = "Ok"
|
||||
box.onOk = createEmptyFunction()
|
||||
button1.onClick = function()
|
||||
box.onOk()
|
||||
box:destroy()
|
||||
end
|
||||
elseif flags == MessageBoxCancel then
|
||||
button1.text = "Cancel"
|
||||
box.onCancel = createEmptyFunction()
|
||||
button1.onClick = function()
|
||||
box.onCancel()
|
||||
box:destroy()
|
||||
end
|
||||
end
|
||||
|
||||
box.window = window
|
||||
return box
|
||||
end
|
||||
|
||||
function MessageBox:destroy()
|
||||
if self.onDestroy then
|
||||
self.onDestroy()
|
||||
self.onDestroy = nil
|
||||
end
|
||||
if self.window then
|
||||
self.window:destroy()
|
||||
self.window = nil
|
||||
end
|
||||
self.onOk = nil
|
||||
self.onCancel = nil
|
||||
end
|
||||
|
||||
-- shortcuts for creating message boxes
|
||||
function displayMessageBox(title, text, flags)
|
||||
return MessageBox.create(title, text, flags)
|
||||
end
|
||||
|
||||
function displayErrorBox(title, text)
|
||||
return MessageBox.create(title, text, MessageBoxOk)
|
||||
end
|
||||
|
||||
function displayInfoBox(title, text)
|
||||
return MessageBox.create(title, text, MessageBoxOk)
|
||||
end
|
||||
|
||||
function displayCancelBox(title, text)
|
||||
return MessageBox.create(title, text, MessageBoxCancel)
|
||||
end
|
||||
|
@@ -1,5 +0,0 @@
|
||||
function createEmptyFunction()
|
||||
local emptyFunction = function() end
|
||||
return emptyFunction
|
||||
end
|
||||
|
@@ -1,57 +0,0 @@
|
||||
function EnterGame_connectToLoginServer()
|
||||
-- create login protocol
|
||||
local protocolLogin = ProtocolLogin.create()
|
||||
|
||||
-- used to recreate enter game window
|
||||
local recreateEnterGame = function()
|
||||
loadUI("ui/entergamewindow")
|
||||
end
|
||||
|
||||
-- display loading message box
|
||||
local loadBox = displayCancelBox("Please wait", "Connecting..")
|
||||
|
||||
-- cancel loading callback
|
||||
loadBox.onCancel = function(msgbox)
|
||||
-- cancel protocol and reacreate enter game window
|
||||
protocolLogin:cancel()
|
||||
recreateEnterGame()
|
||||
end
|
||||
|
||||
-- error callback
|
||||
protocolLogin.onError = function(protocol, error)
|
||||
-- destroy loading message box
|
||||
loadBox:destroy()
|
||||
|
||||
-- display error message
|
||||
local errorBox = displayErrorBox("Login Error", error)
|
||||
|
||||
-- cancel protocol and reacreate enter game window
|
||||
protocol:cancel()
|
||||
errorBox.onOk = recreateEnterGame
|
||||
end
|
||||
|
||||
-- motd callback
|
||||
protocolLogin.onMotd = function(protocol, motd)
|
||||
-- destroy loading message box
|
||||
loadBox:destroy()
|
||||
|
||||
-- display motd
|
||||
local motdNumber = string.sub(motd, 0, string.find(motd, "\n"))
|
||||
local motdText = string.sub(motd, string.find(motd, "\n") + 1, string.len(motd))
|
||||
local motdBox = displayInfoBox("Message of the day", motdText)
|
||||
|
||||
-- cancel protocol and reacreate enter game window
|
||||
protocol:cancel()
|
||||
motdBox.onOk = recreateEnterGame
|
||||
end
|
||||
|
||||
-- get account and password then login
|
||||
local enterGameWindow = rootUI:getChild("enterGameWindow")
|
||||
local account = enterGameWindow:getChild("accountNameTextEdit").text
|
||||
local password = enterGameWindow:getChild("passwordTextEdit").text
|
||||
protocolLogin:login(account, password)
|
||||
|
||||
-- destroy enter game window
|
||||
enterGameWindow:destroy()
|
||||
end
|
||||
|
@@ -1,16 +0,0 @@
|
||||
require 'entergame'
|
||||
|
||||
function initializeApplication()
|
||||
mainMenu = loadUI("ui/mainmenu", rootUI)
|
||||
end
|
||||
|
||||
function terminateApplication()
|
||||
exit()
|
||||
end
|
||||
|
||||
-- here is where everything starts
|
||||
if not initialized then
|
||||
initializeApplication()
|
||||
onClose = terminateApplication
|
||||
initialized = true
|
||||
end
|
@@ -1,54 +0,0 @@
|
||||
%window#enterGameWindow
|
||||
title: Enter Game
|
||||
size: [236, 160]
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
%label#accountNameLabel
|
||||
skin: large
|
||||
text: Account name
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 28
|
||||
|
||||
%textEdit#accountNameTextEdit
|
||||
text: otclient0
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin.left: 18
|
||||
margin.right: 18
|
||||
|
||||
%label#passwordLabel
|
||||
skin: large
|
||||
text: Password
|
||||
anchors.left: prev.left
|
||||
anchors.top: prev.bottom
|
||||
margin.top: 8
|
||||
|
||||
%textEdit#passwordTextEdit
|
||||
text: 123456
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin.left: 18
|
||||
margin.right: 18
|
||||
|
||||
%button#okButton
|
||||
text: Ok
|
||||
width: 64
|
||||
anchors.right: next.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 16
|
||||
margin.right: 16
|
||||
onClick: EnterGame_connectToLoginServer()
|
||||
|
||||
%button#cancelButton
|
||||
text: Cancel
|
||||
width: 64
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 16
|
||||
margin.right: 16
|
||||
onClick: function(self) rootUI:getChild("enterGameWindow"):destroy() end
|
@@ -1,63 +0,0 @@
|
||||
%window#infoWindow
|
||||
title: Info
|
||||
size: [244, 221]
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onLoad: function(self) self:setLocked() end
|
||||
|
||||
%panel#infoPanel
|
||||
skin: flatPanel
|
||||
size: [208, 129]
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.top: 32
|
||||
margin.left: 18
|
||||
|
||||
%label#infoLabel
|
||||
align: center
|
||||
text: |-
|
||||
OTClient
|
||||
Version 0.2.0
|
||||
Created by edubart
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
margin.top: 20
|
||||
|
||||
%lineDecoration#bottomSeparator
|
||||
size: [190, 2]
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.top: 83
|
||||
margin.left: 9
|
||||
|
||||
%label#websiteLabel
|
||||
text: Official Website
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 14
|
||||
margin.left: 9
|
||||
|
||||
%button#websiteButton
|
||||
text: Github Page
|
||||
size: [88, 24]
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 9
|
||||
margin.right: 9
|
||||
|
||||
%lineDecoration#bottomSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 40
|
||||
margin.left: 13
|
||||
margin.right: 13
|
||||
|
||||
%button#okButton
|
||||
text: Ok
|
||||
size: [46, 24]
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.top: 191
|
||||
margin.left: 188
|
||||
onClick: function(self) self.parent:destroy() end
|
@@ -1,42 +0,0 @@
|
||||
%panel#background
|
||||
skin: mainMenuBackground
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
%panel#mainMenu
|
||||
skin: roundedGridPanel
|
||||
size: [144, 162]
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin.left: 60
|
||||
margin.bottom: 70
|
||||
|
||||
%button#enterGameButton
|
||||
text: Enter Game
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin.top: 18
|
||||
onClick: loadUI("entergamewindow", rootUI)
|
||||
|
||||
%button#optionsButton
|
||||
text: Options
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin.top: 10
|
||||
onClick: loadUI("optionswindow", rootUI)
|
||||
|
||||
%button#infoButton
|
||||
text: Info
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin.top: 10
|
||||
onClick: loadUI("infowindow", rootUI)
|
||||
|
||||
%button#exitGameButton
|
||||
text: Exit
|
||||
anchors.top: prev.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin.top: 10
|
||||
onClick: terminateApplication()
|
@@ -1,113 +0,0 @@
|
||||
%window#optionsWindow
|
||||
title: Options
|
||||
size: [286, 262]
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onLoad: function(self) self:setLocked(true) end
|
||||
|
||||
# general
|
||||
%button#generalButton
|
||||
text: General
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 32
|
||||
|
||||
%label#generalLabel
|
||||
text: |-
|
||||
Change general
|
||||
game options
|
||||
anchors.left: prev.right
|
||||
anchors.top: prev.top
|
||||
margin.left: 10
|
||||
margin.top: -2
|
||||
|
||||
# graphics
|
||||
%button#graphicsButton
|
||||
text: Graphics
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 65
|
||||
|
||||
%label#graphicsLabel
|
||||
text: |-
|
||||
Change graphics and
|
||||
performance settings
|
||||
anchors.left: prev.right
|
||||
anchors.top: prev.top
|
||||
margin.left: 10
|
||||
margin.top: -2
|
||||
|
||||
# console
|
||||
%button#consoleButton
|
||||
text: Console
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 98
|
||||
|
||||
%label#consoleLabel
|
||||
text: Customise the console
|
||||
anchors.left: prev.right
|
||||
anchors.top: prev.top
|
||||
margin.left: 10
|
||||
margin.top: -2
|
||||
|
||||
# hotkeys
|
||||
%button#hotkeysButton
|
||||
text: Hotkeys
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 131
|
||||
|
||||
%label#hotkeysLabel
|
||||
text: Edit your hotkey texts
|
||||
anchors.left: prev.right
|
||||
anchors.top: prev.top
|
||||
margin.left: 10
|
||||
margin.top: -2
|
||||
|
||||
%lineDecoration#middleSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 97
|
||||
margin.left: 18
|
||||
margin.right: 18
|
||||
|
||||
# motd
|
||||
%button#motdButton
|
||||
text: Motd
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin.left: 18
|
||||
margin.bottom: 60
|
||||
|
||||
%label#motdLabel
|
||||
text: |
|
||||
Show the most recent
|
||||
Message of the Day
|
||||
anchors.left: prev.right
|
||||
anchors.top: prev.top
|
||||
margin.left: 10
|
||||
margin.top: -2
|
||||
|
||||
%lineDecoration#bottomSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 40
|
||||
margin.left: 13
|
||||
margin.right: 13
|
||||
|
||||
# ok button
|
||||
%button#okButton
|
||||
text: Ok
|
||||
size: [43, 20]
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.right: 10
|
||||
margin.bottom: 13
|
||||
onClick: function(self) self.parent:destroy() end
|
Before Width: | Height: | Size: 1.9 MiB |
Before Width: | Height: | Size: 825 B |
Before Width: | Height: | Size: 833 B |
Before Width: | Height: | Size: 859 B |
Before Width: | Height: | Size: 34 KiB |
@@ -1,80 +0,0 @@
|
||||
default font: helvetica-12px
|
||||
default font color: [210, 210, 210, 255]
|
||||
|
||||
buttons:
|
||||
default:
|
||||
font: helvetica-11px-bold
|
||||
font color: [240, 173, 77, 255]
|
||||
default size: [106, 24]
|
||||
|
||||
bordered image:
|
||||
source: button.png
|
||||
border: 5
|
||||
|
||||
hover state:
|
||||
bordered image:
|
||||
source: button_hover.png
|
||||
border: 5
|
||||
|
||||
down state:
|
||||
text translate: [1, 1]
|
||||
bordered image:
|
||||
source: button_down.png
|
||||
border: 5
|
||||
panels:
|
||||
default:
|
||||
# the default panel is empty
|
||||
|
||||
mainMenuBackground:
|
||||
image: background.png
|
||||
antialised: true
|
||||
|
||||
roundedGridPanel:
|
||||
bordered image:
|
||||
source: panel_rounded.png
|
||||
border: 4
|
||||
|
||||
flatPanel:
|
||||
bordered image:
|
||||
source: panel_flat.png
|
||||
border: 1
|
||||
|
||||
labels:
|
||||
default:
|
||||
|
||||
large:
|
||||
font: helvetica-12px-bold
|
||||
|
||||
windows:
|
||||
default:
|
||||
font: helvetica-11px-bold
|
||||
font color: [240, 173, 77, 255]
|
||||
head:
|
||||
height: 20
|
||||
bordered image:
|
||||
source: window.png
|
||||
size: [256, 19]
|
||||
border: 4
|
||||
bottom: 3
|
||||
|
||||
body:
|
||||
bordered image:
|
||||
source: window.png
|
||||
size: [256, 237]
|
||||
offset: [0, 19]
|
||||
border: 4
|
||||
top: 0
|
||||
|
||||
text edits:
|
||||
default:
|
||||
default size: [86, 20]
|
||||
text margin: 3
|
||||
bordered image:
|
||||
source: panel_flat.png
|
||||
border: 1
|
||||
|
||||
line decorations:
|
||||
default:
|
||||
bordered image:
|
||||
source: horizontal_separator.png
|
||||
top: 2
|
Before Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 35 KiB |