mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
Progress updating to cv981/pv973:
* Implemented the new client AND protocol version methods. * Implemented the new speed laws added in cv980 (http://www.tibia.com/news/?subtopic=newsarchive&id=2251). * Added more missing bytea to login packets (client version/type and some unknown bytes). * Fixed the InputMessage::getDouble method. * Cleaned up some of the const values. * Started on the pending state features. TODO: * Pending game state feature. * Ensure version compatibility hasn't been compromised.
This commit is contained in:
@@ -118,14 +118,14 @@ function onGameEditText(id, itemId, maxLength, text, writter, time)
|
||||
end
|
||||
|
||||
local newLineCount = string.count(textEdit:getText(), '\n')
|
||||
if(newLineCount >= 9) then
|
||||
if newLineCount >= 9 then
|
||||
textScroll:setMaximum(newLineCount-9)
|
||||
end
|
||||
|
||||
local _prev, _next = 0, 11
|
||||
local scrollOnValueChange = function(widget, value, delta)
|
||||
local line = getLineByCursorPos(textEdit:getText(), textEdit:getCursorPos(), newLineCount)
|
||||
if(delta > 0) then
|
||||
if delta > 0 then
|
||||
textEdit:setCursorPos(getCursorPosByNewLine(textEdit:getText(), _next + delta - 1))
|
||||
if writeable then textEdit:setCursorPos(getCursorPosByNewLine(textEdit:getText(), line + delta)) end
|
||||
else
|
||||
@@ -180,7 +180,7 @@ function onGameEditText(id, itemId, maxLength, text, writter, time)
|
||||
return false
|
||||
end
|
||||
|
||||
if(not writeable) then
|
||||
if not writeable then
|
||||
textEdit:setCursorPos(0)
|
||||
textWindow.onKeyPress = onKeyPress -- textEdit won't receive focus
|
||||
else
|
||||
@@ -244,4 +244,4 @@ function onGameEditList(id, doorId, text)
|
||||
okButton.onClick = doneFunc
|
||||
textWindow.onEnter = doneFunc
|
||||
textWindow.onEscape = destroy
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user