diff options
author | liam4 <towerofnix@gmail.com> | 2017-07-03 21:13:50 -0300 |
---|---|---|
committer | liam4 <towerofnix@gmail.com> | 2017-07-03 21:13:50 -0300 |
commit | b087c428ba492715626a7875185f9ba18fb30b3e (patch) | |
tree | c7ca597804b9cb3b13e43782d95b0a24fb83a73e /ui/form | |
parent | 930d61b9f067346f467d4d84015088f57c54da56 (diff) |
Improve cursor display
- Whether the cursor is displayed or not is now based on the cursorVisible property rather than whether cursorX and cursorY are set or not. - The actual shell cursor is now invisible... this is objectively an act of Evil, though! This doesn't look like too hard to fix, thankfully. - A new cleanCursor function has been added to ansi.js.
Diffstat (limited to 'ui/form')
-rw-r--r-- | ui/form/FocusElement.js | 1 | ||||
-rw-r--r-- | ui/form/TextInput.js | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/ui/form/FocusElement.js b/ui/form/FocusElement.js index 5967e26..18f13bf 100644 --- a/ui/form/FocusElement.js +++ b/ui/form/FocusElement.js @@ -6,6 +6,7 @@ module.exports = class FocusElement extends DisplayElement { constructor() { super() + this.cursorVisible = false this.cursorX = 0 this.cursorY = 0 diff --git a/ui/form/TextInput.js b/ui/form/TextInput.js index fc59cbb..a10a26f 100644 --- a/ui/form/TextInput.js +++ b/ui/form/TextInput.js @@ -11,6 +11,7 @@ module.exports = class TextInput extends FocusElement { super() this.value = '' + this.cursorVisible = true this.cursorIndex = 0 this.scrollChars = 0 } |