Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
FormSpec : Add an auto vertical scrollbar to the textarea
  • Loading branch information
adelcoding1 authored and nerzhul committed Oct 9, 2017
1 parent c830347 commit 9b8fa99
Show file tree
Hide file tree
Showing 8 changed files with 1,856 additions and 34 deletions.
1 change: 1 addition & 0 deletions build/android/jni/Android.mk
Expand Up @@ -149,6 +149,7 @@ LOCAL_SRC_FILES := \
jni/src/genericobject.cpp \
jni/src/gettext.cpp \
jni/src/guiChatConsole.cpp \
jni/src/guiEditBoxWithScrollbar.cpp \
jni/src/guiEngine.cpp \
jni/src/guiPathSelectMenu.cpp \
jni/src/guiFormSpecMenu.cpp \
Expand Down
3 changes: 2 additions & 1 deletion doc/lua_api.txt
Expand Up @@ -1918,8 +1918,9 @@ examples.
* if <close_on_enter> is false, pressing enter in the field will submit the form but not close it
* defaults to true when not specified (ie: no tag for a field)

#### `textarea[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]`
#### `textarea[<X>,<Y>;<W>,<H>;<name>;<label>;<default>;<scrollbar>]`
* Same as fields above, but with multi-line input
* if <scrollbar> is true an auto vertical scrollbar is added

#### `label[<X>,<Y>;<label>]`
* `x` and `y` work as per field
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Expand Up @@ -511,6 +511,7 @@ set(client_SRCS
fontengine.cpp
game.cpp
guiChatConsole.cpp
guiEditBoxWithScrollbar.cpp
guiEngine.cpp
guiPathSelectMenu.cpp
guiFormSpecMenu.cpp
Expand Down

1 comment on commit 9b8fa99

@paramat
Copy link
Contributor

@paramat paramat commented on 9b8fa99 Oct 9, 2017

Choose a reason for hiding this comment

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

@adelcoding1 Warnings during build:

src/guiEditBoxWithScrollbar.cpp:1436:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (getTextDimension().Height > m_frame_rect.getHeight()) {

src/intlGUIEditBox.cpp:1520:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (getTextDimension().Height > FrameRect.getHeight()) {

Please sign in to comment.