mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
Minor fixes to some previous commits.
* Fixed a bug with storing the protocol version. * Fixed an issue with text windows cancelling. * Fixed a typo in the source.
This commit is contained in:
@@ -91,8 +91,8 @@ function terminate()
|
||||
g_settings.set('window-pos', g_window.getUnmaximizedPos())
|
||||
g_settings.set('window-maximized', g_window.isMaximized())
|
||||
|
||||
local clientVersion = g_game.getProtocolVersion()
|
||||
if clientVersion ~= 0 then
|
||||
g_settings.set('client-version', clientVersion)
|
||||
local protocolVersion = g_game.getProtocolVersion()
|
||||
if protocolVersion ~= 0 then
|
||||
g_settings.set('protocol-version', protocolVersion)
|
||||
end
|
||||
end
|
||||
|
@@ -85,13 +85,13 @@ function onGameEditText(id, itemId, maxLength, text, writter, time)
|
||||
end
|
||||
|
||||
okButton.onClick = doneFunc
|
||||
cancelButton.onClick = destroy
|
||||
cancelButton.onClick = destroyWindows
|
||||
|
||||
if not writeable then
|
||||
textWindow.onEnter = doneFunc
|
||||
end
|
||||
|
||||
textWindow.onEscape = destroy
|
||||
textWindow.onEscape = destroyWindows
|
||||
|
||||
table.insert(windows, textWindow)
|
||||
end
|
||||
@@ -121,8 +121,10 @@ function onGameEditList(id, doorId, text)
|
||||
end
|
||||
|
||||
okButton.onClick = doneFunc
|
||||
cancelButton.onClick = destroyWindows
|
||||
|
||||
textWindow.onEnter = doneFunc
|
||||
textWindow.onEscape = destroy
|
||||
textWindow.onEscape = destroyWindows
|
||||
|
||||
table.insert(windows, textWindow)
|
||||
end
|
||||
|
Reference in New Issue
Block a user