Skip to content

Conversation

patrikjuvonen
Copy link
Contributor

@patrikjuvonen 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
Copy link
Contributor Author

Well, I could've named the commit better by adding memo to it, but oh well...

lua_classfunction(luaVM, "setCaretIndex", "guiMemoSetCaretIndex");
lua_classfunction(luaVM, "setReadOnly", "guiMemoSetReadOnly");

lua_classfunction(luaVM, "getVerticalScrollPosition", "guiMemoGetVerticalScrollPosition");
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done.


lua_classfunction(luaVM, "getVerticalScrollPosition", "guiMemoGetVerticalScrollPosition");

lua_classfunction(luaVM, "setVerticalScrollPosition", "guiMemoSetVerticalScrollPosition");
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done.

@qaisjp qaisjp merged commit 14cf976 into multitheftauto:master Jul 22, 2018
jushar pushed a commit that referenced this pull request Jul 22, 2018
@patrikjuvonen patrikjuvonen added the enhancement New feature or request label Aug 7, 2018
@patrikjuvonen patrikjuvonen added this to the 1.5.6 milestone Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants