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

Add improved FlxInputText to core Flixel #3219

Merged
merged 50 commits into from
Aug 6, 2024

Commits on Jun 19, 2024

  1. Configuration menu
    Copy the full SHA
    cce7231 View commit details
    Browse the repository at this point in the history
  2. Fix code climate?

    Starmapo committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    9908757 View commit details
    Browse the repository at this point in the history
  3. Add missing FLX_MOUSE check

    Starmapo committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    2922838 View commit details
    Browse the repository at this point in the history
  4. Add multiline variable

    - Regenerate text graphic when `passwordMode` changes
    Starmapo committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    dd2ff7e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    54a650c View commit details
    Browse the repository at this point in the history
  6. Selection boxes + selected text color

    - Add `setSelection()` function
    - `FlxInputText` variables are now destroyed properly
    Starmapo committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    73220a2 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

  1. Implement text selection with mouse & text scrolling

    - Added `scrollH`, `scrollV`, `bottomScrollV`, `maxScrollH` & `maxScrollV` variables
    - Return end of text if character isn't found at position
    Starmapo committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    99055c7 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2024

  1. Fix selection not working correctly when mouse is out of bounds

    - Selection boxes are now clipped inside the text bounds
    - Simplified getting the Y offset of a line
    Starmapo committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    8ea7c58 View commit details
    Browse the repository at this point in the history
  2. Mouse wheel scrolling

    - Fix scrollV not being able to be modified directly
    Starmapo committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    090642b View commit details
    Browse the repository at this point in the history
  3. Implemented double press and dragging

    - Selection sprites now just change their color instead of making new graphics
    - scrollH can now be modified properly as well
    - Word wrap no longer changes with multiline (multiline only affects adding new lines)
    Starmapo committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    20afded View commit details
    Browse the repository at this point in the history
  4. Action callbacks

    Starmapo committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    9064680 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2257a36 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2024

  1. Various fixes & improvements

    - Caret is now positioned properly with different alignments
    - Caret is now clipped inside the text bounds
    - Caret is now automatically resized when changing `bold`, `font`, `italic`, `size` or `systemFont` variables
    - Fixed crash when pressing down a key while there isn't a focused input text
    - Fixed selected text format overwriting the border color
    - Fixed caret not being visible when text is empty
    - Fixed selection boxes sometimes not being updated immediately
    - Added `useSelectedTextFormat` variable
    - Double press check is now when the mouse is released (same as OpenFL)
    Starmapo committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    2e043ab View commit details
    Browse the repository at this point in the history
  2. Add forceCase and filterMode`

    - Moved action callback types to an enum abstract
    Starmapo committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    febc1f3 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2024

  1. Added background for text input

    - Added `focusGained` and `focusLost` callbacks
    - Fixed selection boxes not being clipped properly when they're compeletely out of bounds
    Starmapo committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    abbc89b View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Some improvements

    - Added bounds check while changing `caretIndex`, `caretWidth`, `fieldBorderThickness` and `maxLength`
    - FlxInputText is now single-line by default
    - Fixed text scroll being reset while moving selection with mouse
    - Caret index now starts at the end of the text if focus is enabled through code
    - Background now gets regenerated in `regenGraphic` instead of instantly after changing a related variable
    Starmapo committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    9e14f27 View commit details
    Browse the repository at this point in the history
  2. Added editable and selectable` variables

    - Added change and scroll action callbacks
    - Made `replaceSelectedText()` public
    Starmapo committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    8010c88 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. Flixel hotkeys (volume & debugger) are now disabled while inputting text

    - Fixed space not being inputted on HTML5
    Starmapo committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    678c129 View commit details
    Browse the repository at this point in the history
  2. Caret flashing timer

    - Fixed text going out of bounds when enabling multiline without a field height set
    - Last click time for double click now resets if the mouse clicked on something else
    Starmapo committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    21d996f View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. Optimized selection box sprites (only visible lines are accounted for…

    … now)
    
    - Fixed untypeable characters being added to text input on Flash
    Starmapo committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    87da676 View commit details
    Browse the repository at this point in the history
  2. Various fixes for Flash

    - Fixed text selection and caret positioning on Flash
    - Copy, cut, paste and select all commands now work on Flash
    - Fixed horizontal scroll not being set automatically on Flash
    - Moved to using Flash's `TextEvent.TEXT_INPUT` event (does not dispatch with invalid characters)
    Starmapo committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    d286bc3 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2024

  1. Configuration menu
    Copy the full SHA
    2dfba26 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d53767f View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2024

  1. Added touch support

    - Now uses `window.setTextInputRect()` to prevent keyboard overlay from blocking the text field
    - Fixed pointer position being inaccurate with camera scrolling
    - Fixed `getCharBoundaries()` not giving the correct Y position
    Starmapo committed Jun 30, 2024
    Configuration menu
    Copy the full SHA
    262a7a0 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2024

  1. Added documentation

    - Fixed not being able to add text if the field starts out empty
    - Fixed the caret being the wrong size if the text field is empty
    - Fixed the background not being resized when auto size is enabled
    - Changing `customFilterPattern` now automatically sets `filterMode` to `CUSTOM_FILTER`
    - Renamed `_lastClickTime` to `_lastPressTime`
    Starmapo committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    2aa0176 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2024

  1. Add documentation to multiline variable

    - Remove setting `_autoHeight` to false after setting multiline to true as its no longer needed
    Starmapo committed Jul 13, 2024
    Configuration menu
    Copy the full SHA
    9a8d3cc View commit details
    Browse the repository at this point in the history
  2. Add mouseWheelEnabled variable

    - Remove unneeded `selectable` comment
    Starmapo committed Jul 13, 2024
    Configuration menu
    Copy the full SHA
    0d35d34 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2024

  1. Replaced PREVIOUS_LINE and NEXT_LINE with WORD_LEFT and `WORD_R…

    …IGHT`
    
    - Ctrl + Up/Down now dispatches `LINE_LEFT` or `LINE_RIGHT` instead of `HOME` or `END`
    - Renamed `LINE_BEGINNING` and `LINE_END` to `LINE_LEFT` and `LINE_RIGHT`
    Starmapo committed Jul 14, 2024
    Configuration menu
    Copy the full SHA
    a0042fc View commit details
    Browse the repository at this point in the history
  2. Various fixes

    - Clip rect should now work properly
    - Fixed caret showing up after changing `text` through code
    - Focus will not be removed due to clicking outside of the text field if it has been granted via code in the same frame
    - Caret will no longer be visible if the text field isn't editable
    - Fixed some html5 tests not compiling on CI
    Starmapo committed Jul 14, 2024
    Configuration menu
    Copy the full SHA
    6eafd06 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. Configuration menu
    Copy the full SHA
    3126a33 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9b5161a View commit details
    Browse the repository at this point in the history
  3. Various more fixes

    - Fixed crash from recursive calls to `regenBackground()` due to `clipSprite()`
    - Fixed crash from `pointer.getWorldPosition()`
    - Fixed background not being updated after changing text format
    - Moved caret sprite regeneration to `regenGraphic()`
    Starmapo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    e9fc095 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a8d5277 View commit details
    Browse the repository at this point in the history
  5. Fixed missing rename

    Starmapo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    14f9731 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

  1. Replace callback with onTextChange and onScrollChange signals

    - Replace `focusGained` and `focusLost` with `onFocusChange` signal
    - Renamed filter mode options and added `CHARS` option
    - Removed `customFilterPattern` as its now defined in the enum itself
    Starmapo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    4ae5c24 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    47c1966 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2024

  1. Implement destroy() for FlxInputTextManager

    - Add `unregisterAll()` to FlxInputTextManager
    Starmapo committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    070c7f0 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. add onTypingAction

    Geokureli committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    bb7f700 View commit details
    Browse the repository at this point in the history
  2. allow custom manager

    Geokureli committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    8c05933 View commit details
    Browse the repository at this point in the history
  3. add setManager

    Geokureli committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    ae1644b View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2024

  1. Configuration menu
    Copy the full SHA
    c3b7622 View commit details
    Browse the repository at this point in the history
  2. better destroy/init

    Geokureli committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    2046850 View commit details
    Browse the repository at this point in the history
  3. use case ifs

    Geokureli committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    f7895dc View commit details
    Browse the repository at this point in the history
  4. improve mac key behavior

    Geokureli committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    6664a93 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f3d2597 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2024

  1. Configuration menu
    Copy the full SHA
    2a69a6e View commit details
    Browse the repository at this point in the history
  2. use final signals

    Geokureli committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    af4de4a View commit details
    Browse the repository at this point in the history
  3. let openfl handle maxChars

    Geokureli committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    ef09deb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fdf3f1d View commit details
    Browse the repository at this point in the history
  5. simplify caret blink

    Geokureli committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    949f3bd View commit details
    Browse the repository at this point in the history