New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0008957: add missing vertical scrollbar functions to gui memo element #248
Conversation
Well, I could've named the commit better by adding memo to it, but oh well... |
@@ -320,9 +322,15 @@ void CLuaGUIDefs::AddGuiMemoClass(lua_State* luaVM) | |||
lua_classfunction(luaVM, "setCaretIndex", "guiMemoSetCaretIndex"); | |||
lua_classfunction(luaVM, "setReadOnly", "guiMemoSetReadOnly"); | |||
|
|||
lua_classfunction(luaVM, "getVerticalScrollPosition", "guiMemoGetVerticalScrollPosition"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should sit with getCaretIndex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Done.
@@ -320,9 +322,15 @@ void CLuaGUIDefs::AddGuiMemoClass(lua_State* luaVM) | |||
lua_classfunction(luaVM, "setCaretIndex", "guiMemoSetCaretIndex"); | |||
lua_classfunction(luaVM, "setReadOnly", "guiMemoSetReadOnly"); | |||
|
|||
lua_classfunction(luaVM, "getVerticalScrollPosition", "guiMemoGetVerticalScrollPosition"); | |||
|
|||
lua_classfunction(luaVM, "setVerticalScrollPosition", "guiMemoSetVerticalScrollPosition"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should sit with setCaretIndex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Done.
Mantis Bug Tracker issue:
8957
Summary:
guiMemoSetVerticalScrollPosition
andguiMemoGetVerticalScrollPosition
;guiMemoSetVerticalScrollPosition
takes in a float between 0 and 100;guiMemoGetVerticalScrollPosition
returns a float between 0 and 100;Note about guiMemoGetMaxVerticalScrollPosition (1a8dc0e):
guiMemoGetMaxVerticalScrollPosition
, which would return(document size - page size)
. However, @qaisjp and I ended up thinking it is unnecessary for now. If we ever want to implement it, the code is ready in 1a8dc0e.