- Exposed
@text_keys
as an instance variable instead of a local. - Wrote up notes on custom keyboard handling with a filtering example.
- Documented
#delete_forward
and#delete_back
methods. - Deprecated
on_clicked
and addedon_click
in it's place. - Documented
focused
argument and#focused?
aliases forfocussed
and#focussed?
- Fixed a bug when using
max_length
whereselection_end
(andselection_start
) where incorrectly set (thanks to @TheCire for reporting in Discord). - Fixed a cursor placement and selection background issues in the
Text
component.
- Updated clipboard to use getclipboard and setclipboard so the system clipboard is used
- Updated menu to handle scrolling with keyboard if there are too many items, including menu sizing
- First pass at menu positioning which tries to maximize the height to show as many items as possible
- Added
:focused
alias for:focussed
andfocused?
forfocussed?
- Added autocomplete filtering as you type
- Added
#shift_lock
attribute which helps with autocomplete on the prompt
- The cursor now returns to (nearly) full alpha while you're typing (or the value is changed in some other way)
- Exposed
value_changed
accessor which is true if the value changed in the last tick
- Slight optimizations in reflow, including not reflowing the text if you assign the same
w
,size_enum
orsize_px
.
- Added
#size_px=
,#size_enum=
and updated#w=
to allow resizing or changing the font size of theMultiline
- Note: this causes the content to be "reflowed" (find word breaks) which may impact performance for large texts
- Note: odd pixel sizes for fonts appear to measure incorrectly, so stick to even font sizes
- Updated "book" sample with a resizer and font size controls to demonstrate the above
- This release contains experimental Menu support as part of the DragonRuby console prompt replacement
- Moved
FontStyle
module insideInput
module to avoid global namespace pollution
- Added experimental support for replacing the DragonRuby console prompt
- Use
Input.replace_console!
to enable (Seebook_sample.rb
)
- Use
- Fixed a bug in
current_word
where 'wor|d pair' would result in 'word pair' being returned - Fixed performance for
current_word
in very long words in large documents
- Added support for
size_px
to specify font-sizes
- Fixed a bug where the input would break if
size_enum
is specified as a number - Refactored string size calculations by encapsulating them into a
FontStyle
object
- Fixes wrapping of words longer than the width of the multi-line input
- Fixes tests, such as they are
- Added
{dir}_arrow
to fix cursor keys not working in recent 5.2X versions
- Fixed release date for 0.0.9 below (off by a month)
- Removed padding from selection highlight to remove overlap in
Multiline
- Added
fill_from_bottom
option toMultiline
for things like logs or game terminals - Added color parsing code allowing
text_color
,background_color
,blurred_background_color
,prompt_color
,selection_color
, andblurred_selection_color
parameters to be passed as anArray
,Hash
,Integer
or separateInteger
values with_r
,_g
,_b
and_a
suffixes - Added
cursor_color
andcursor_width
- Added
delete_forward
and started treating delete and backspace correctly - Added Basic sample and updated README
- Implemented
Home
andEnd
keys - Added
insert_at(str, start_at, end_at)
- Added
append(str)
- Added
scroll_to(y)
- Breaking: renamed
content_y
toscroll_y
andcontent_x
toscroll_x
- Made
scroll_x
andscroll_y
accessors, and ensured that the@ensure_cursor_visible
internal variable is correctly reset - Updated
Scroller
in samples to react to clicks outside the thumbtrack with page up/down, and dragging the thumbtrack - Updated Log sample
- Added
readonly
option - Fixed a bug where
Multiline
would break if thevalue
isnil
at initialization - Fixed a bug where
Multiline#lines
was returning nil - Added Log sample app
- Fixed a bug where when content is shorter than height, mouse is off
- Made
handle_mouse
andon_clicked
smarter to handle right clicks - Fixed "EXCEPTION: wrong number of arguments (2 for 0)" for
NOOP
- Added
max_length
- Added
#current_word
- Added
prompt
andprompt_*
(r
,g
,b
,a
)
- Multiline Performance
- Draw only the lines in the view
- Speed up word break finding with Hashes
- Update edits to use data model instead or reparsing entire value
- Text Performance
- Draw text in the view
- Change
find_index_at_x
to use Binary search
- Speed up key repeat slight (4 ticks instead of 5 default)
- Added
rect
method - Fixed: Cursor renders outside of the bounds of the control
- Adjusted index finding for up/down cursor movement in
Multiline
- Added scrolling for
Multiline
and exposed#content_h
getter to help with building scroll bars - Added
#find
,#find_next
([meta|ctrl]+[g]
),#find_prev
([meta|ctrl]+[shift]+[g]
) methods - Added
#move_page_up
,#move_page_down
,#select_page_up
,#select_page_down
methods and keyboard short cuts
- Refactored to use
module Input
and classesText
andMultiline
- Fixed: move to start and end of line for Multiline
- Updated multiline selection to stop at text end
- Up and down for multiline no longer move to start and end on the first and last lines respectively anymore
- Fixed: up and down not working from the start of the line in multiline
- Refactored to use methods in response to keyboard, and documented methods
- Renamed
#focus!
tofocus
, andblur!
toblur
- Added blurred colors
- Documented accessors
- Added a background color property.
- Having a background improves the rendering quality.
- Added some usage notes to the README.md
- Fixed: Inserting multiple characters (paste, or multiple characters) in a single tick
- Implement key repeat for cursor movement
- Fixed: At some point walking single character words was fixed
- Added focus state,
#focussed?
,#focus
,#blur
- Added
on_clicked
andon_unhandled_key
callbacks - Added mouse selection for word wrapped control
- Added up and down (without
[alt]
) for word wrapped control - Improved mouse selection (finding cursor index by x position) for word wrapped input
- Introduced
LineCollection
data structure for word wrap to centralize a lot of the line handling, measuring and so on - Broke out classes for different input types
- Fixed (some) cursor start of line/end of line weirdnesses
- Word-wrap option and smart word breaks algorithm, with some tests
- Cursor for wrapping text
- Text selection for wrapping text, including multi-line selection
- Fixed: Something is wrong with inserting at the end
- Fixed: Rendering issue when deleting from non-wrapping field
- Add cut, copy, paste
- Added (initial) Rubocop config
- Moved all known issues into TODO and BUG comments
- First release
- Text entry (I mean, this is the very least it could do)
- Automatic height calc based on font and size (optional)
- Flashing cursor
- Cursor control
- [Left], [Right]
- [Alt]+[Left], [Alt]+[Right] to word boundaries
- [Meta]+[Left], [Ctrl]+[Left], [Ctrl]+[Right], [Meta]+[Right] to beginning, end
- Selection with [Shift] and cursor control
- [Meta]+[A], [Ctrl]+[A] select all
- Mouse cursor positioning and selection
- Mouse selection with [Shift] and current cursor location
- Scrolling when the value is longer than the input
// Sunday 08/11/24 at 09:46AM - 48 files in 0.15 secs
- lib/console.rb:145 Tab autocompletion failed. Let us know about this.\n#{e}"
- lib/line_collection.rb:55 Test
index_at
with multiple different fonts - lib/line_collection.rb:169 prolly need to replace \r\n with \n up front
- lib/line_collection.rb:173 consider how to render TAB, maybe convert TAB into 4 spaces?
- lib/line_collection.rb:179 consider smarter handling. "something!)something" would be considered a word right now, theres an extra step needed
- lib/line_collection.rb:197 consider how to render TAB, maybe convert TAB into 4 spaces?
- lib/line_collection.rb:236 make this a binary search
- lib/text.rb:35 undo/redo
- lib/text.rb:96 Word selection (double click), All selection (triple click)
- lib/text.rb:150 handle padding correctly
- lib/text.rb:167 implement sprite background
- lib/input.rb:14 Switch clipboard to system clipboard when setclipboard is available
- lib/input.rb:15 Drag selected text
- lib/input.rb:16 Render Squiggly lines
- lib/input.rb:17 “ghosting text” feature
- lib/input.rb:18 Find/Replace (all)
- lib/input.rb:19 Replace unavailable chars with [?]
- lib/menu.rb:99 home, pgup, end, pgdn
- lib/menu.rb:100 optional find by text
- lib/menu.rb:194 Fix menu value=
- lib/menu.rb:248 Implement line spacing
- lib/menu.rb:257 implement sprite background
- lib/menu.rb:260 implement scrolling
- lib/multiline.rb:75 undo/redo
- lib/multiline.rb:129 Retain a original_cursor_x when moving up/down to try stay generally in the same x range
- lib/multiline.rb:135 beginning of previous paragraph with alt
- lib/multiline.rb:144 end of next paragraph with alt
- lib/multiline.rb:281 Word selection (double click), All selection (triple click)
- lib/multiline.rb:343 Implement line spacing
- lib/multiline.rb:353 implement sprite background
- lib/multiline.rb:382 Line visibility