Skip to content
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

Merged
merged 3 commits into from Jul 22, 2018

Conversation

Projects
2 participants
@patrikjuvonen
Copy link
Member

patrikjuvonen commented Jul 22, 2018

Mantis Bug Tracker issue:
8957

Summary:

  • Added guiMemoSetVerticalScrollPosition and guiMemoGetVerticalScrollPosition;
  • guiMemoSetVerticalScrollPosition takes in a float between 0 and 100;
  • guiMemoGetVerticalScrollPosition returns a float between 0 and 100;
  • Pretty small and simple addition, easy to test.

Note about guiMemoGetMaxVerticalScrollPosition (1a8dc0e):

  • Was about to add 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.
@patrikjuvonen

This comment has been minimized.

Copy link
Member Author

patrikjuvonen commented Jul 22, 2018

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");

This comment has been minimized.

@qaisjp

qaisjp Jul 22, 2018

Member

this line should sit with getCaretIndex

This comment has been minimized.

@patrikjuvonen

patrikjuvonen Jul 22, 2018

Author Member

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");

This comment has been minimized.

@qaisjp

qaisjp Jul 22, 2018

Member

this line should sit with setCaretIndex

This comment has been minimized.

@patrikjuvonen

patrikjuvonen Jul 22, 2018

Author Member

Thanks. Done.

@qaisjp qaisjp merged commit 14cf976 into multitheftauto:master Jul 22, 2018

3 checks passed

WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

patrikjuvonen added a commit to patrikjuvonen/mtasa-blue that referenced this pull request Jul 22, 2018

Jusonex added a commit that referenced this pull request Jul 22, 2018

@patrikjuvonen patrikjuvonen added this to In progress in release/v1.5.6 via automation Aug 7, 2018

@patrikjuvonen patrikjuvonen added this to the 1.5.6 milestone Aug 7, 2018

@patrikjuvonen patrikjuvonen moved this from In progress to Done in release/v1.5.6 Aug 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.