fix motd box issues
This commit is contained in:
parent
e9d69b7980
commit
841769cc7d
|
@ -75,7 +75,7 @@ function CharacterList.create(characters, premDays)
|
|||
label.worldHost = worldHost
|
||||
label.worldPort = worldIp
|
||||
|
||||
if i == 0 or Configs.get('lastUsedCharacter') == characterName then
|
||||
if i == 1 or Configs.get('lastUsedCharacter') == characterName then
|
||||
characterList:focusChild(label, ActiveFocusReason)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,6 +4,7 @@ EnterGame = { }
|
|||
local password
|
||||
local loadBox
|
||||
local enterGameWindow
|
||||
local hideCharlist = false
|
||||
|
||||
-- private functions
|
||||
local function onError(protocol, error)
|
||||
|
@ -14,16 +15,24 @@ end
|
|||
|
||||
local function onMotd(protocol, motd)
|
||||
loadBox:destroy()
|
||||
local motdNumber = string.sub(motd, 0, string.find(motd, "\n"))
|
||||
local motdNumber = tonumber(string.sub(motd, 0, string.find(motd, "\n")))
|
||||
local motdMessage = string.sub(motd, string.find(motd, "\n") + 1, string.len(motd))
|
||||
if motdNumber ~= Configs.get("motd") then
|
||||
displayInfoBox("Message of the day", motdMessage)
|
||||
if motdNumber ~= tonumber(Configs.get("motd")) then
|
||||
hideCharlist = true
|
||||
local motdBox = displayInfoBox("Message of the day", motdMessage)
|
||||
motdBox.onOk = function()
|
||||
CharacterList.show()
|
||||
end
|
||||
Configs.set("motd", motdNumber)
|
||||
end
|
||||
end
|
||||
|
||||
local function onCharacterList(protocol, characters, premDays)
|
||||
CharacterList.create(characters, premDays)
|
||||
if hideCharlist then
|
||||
CharacterList.hide()
|
||||
hideCharlist = false
|
||||
end
|
||||
end
|
||||
|
||||
-- public functions
|
||||
|
|
|
@ -34,7 +34,6 @@ MainWindow
|
|||
Account Status:
|
||||
Free Account
|
||||
font: helvetica-11px-bold
|
||||
color: #33cc66
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: next.top
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <execinfo.h>
|
||||
|
||||
struct X11PlatformPrivate {
|
||||
Display *display;
|
||||
|
@ -72,11 +71,12 @@ Platform g_platform;
|
|||
|
||||
#ifdef HANDLE_EXCEPTIONS
|
||||
|
||||
#include <csignal>
|
||||
#include <execinfo.h>
|
||||
|
||||
#define MAX_BACKTRACE_DEPTH 128
|
||||
#define DEMANGLE_BACKTRACE_SYMBOLS
|
||||
|
||||
#include <csignal>
|
||||
|
||||
void crashHandler(int signum, siginfo_t* info, void* secret)
|
||||
{
|
||||
logError("Application crashed");
|
||||
|
|
Loading…
Reference in New Issue