Commit Graph

24 Commits

Author SHA1 Message Date
Connor C 6f7de9c249 Update 2024-02-28 21:19:56 -07:00
VetheonGames b8ec35b545 Update readme 2023-10-07 10:46:31 -06:00
Connor C cc7629959e Update
Signed-off-by: Connor C <>
2023-10-06 16:33:24 -06:00
VetheonGames 2111665959 update bundle and gemspec 2023-09-20 00:09:56 -06:00
VetheonGames ad6a036b65 update gemspec description 2023-09-20 00:06:28 -06:00
VetheonGames d2d918c87f Just do some stuff to make an excuse to up the gem 2023-09-20 00:04:59 -06:00
VetheonGames 917db32314 Update license, and gitignore, also update bundle 2023-09-19 22:56:33 -06:00
VetheonGames a055cfd3e6 remove gem from repo 2023-09-17 13:29:25 -06:00
VetheonGames 22b3871196 Update version, license, and add package 2023-09-06 21:19:02 -06:00
Connor C 1784e6bdef Update LICENSE 2023-09-06 13:15:07 -06:00
VetheonGames 209a33c576 Fix gemspec typo 2023-08-02 15:36:44 -06:00
VetheonGames 5cc9f761ec Add ability to use up and down arrow keys...
to skip to the beginning and end of the line
2023-08-02 15:35:16 -06:00
VetheonGames 9afcf1b3c6 Bring bundle up to date with upstream depends 2023-07-27 16:20:30 -06:00
VetheonGames a27f41a601 feat: Introduce colored text windows and enhanced positioning
This commit introduces a significant enhancement to the DynamicCursesInput gem, enabling the creation of colored text windows within the terminal. The new `DynamicCursesInput::ColorWindow` class provides methods to add colored text to the window and handle user input.

Notable changes in this commit include:
- Implementation of colored windows with customizable color schemes and text content.
- Automatic centering of text within the window when 'x' is set to 'center.'
- Fine-tuning of centered positioning to shift back by 12 cells for improved visual layout.
- Removal of Fiber reliance and adoption of instance methods to resolve positioning issues.
- Compatibility fixes for different terminal environments to ensure consistent behavior.

Additionally, bug fixes have been made to resolve issues related to text misalignment and window positioning.

This feature-rich update aims to improve the user experience and offer better control over window positioning and color schemes. We hope these enhancements will be beneficial to our users. Feedback and suggestions are always welcome!
2023-07-26 16:31:20 -06:00
VetheonGames 5bf14c982a
Merge pull request #1 from Pixelated-Studios/VetheonGames-patch-1
2023-06-08 12:02:13 -06:00
VetheonGames 55f5aa9137
Signed-off-by: VetheonGames <>
2023-06-08 12:02:05 -06:00
VetheonGames 9008f55072
Signed-off-by: VetheonGames <>
2023-06-08 11:20:11 -06:00
VetheonGames ec7081fe08 remove built gem, it was included by accident 2023-06-08 11:06:54 -06:00
VetheonGames 750e7e2c9c Refactor InputHandler, Add Enter Key Handling, Improve Input Redraw, Add Comments, Remove RSpec Tests, and Manual Testing
This commit introduces several significant changes to the DynamicCursesInput gem:

1. **Refactoring of the InputHandler class**: The `handle_key` method in the `InputHandler` class has been refactored for improved readability and maintainability. The logic for handling different keys (left, right, backspace, enter, and default) has been broken down into separate methods (`handle_left_key`, `handle_right_key`, `handle_backspace_key`, `handle_enter_key`, and `handle_default_key`). This change enhances the modularity of the code and makes it easier to understand and modify.

2. **Addition of Enter Key Handling**: Logic has been added to handle the enter key in the `handle_key` method. Now, when the enter key (either carriage return or newline) is pressed, the input capture loop breaks and the input string is returned. This allows users to submit their input and makes the gem more useful in real-world applications.

3. **Improvement of the `redraw_input` method**: The `redraw_input` method in the `InputHandler` class has been improved. It now clears the line before redrawing the input, which fixes issues with leftover characters when deleting. This ensures that the displayed input accurately reflects the current state of the input string.

4. **Addition of Comments**: Comments have been added throughout the code to explain what each method does. These comments make the code easier to understand for other developers and will facilitate future maintenance and development.

5. **Removal of RSpec Tests**: The RSpec tests have been removed from the gem due to issues that were causing them to fail. The intention is to add tests back in the future once these issues have been resolved. This change is temporary and reflects a commitment to delivering high-quality, well-tested code.

6. **Manual Testing of the Gem**: A script has been written that uses the gem to create a simple text user interface. This script was used to manually test the gem in a real-world scenario and confirm that it works as expected. This testing process ensures that the gem is ready for use and meets the requirements of its intended applications.

These changes collectively enhance the functionality, usability, and maintainability of the DynamicCursesInput gem. They represent a significant step forward in the development of the gem and lay a solid foundation for future improvements.
2023-06-08 11:05:38 -06:00
VetheonGames f2685aa209 Add in the code 2023-06-07 16:19:23 -06:00
VetheonGames be9f822491
Signed-off-by: VetheonGames <>
2023-06-07 16:16:19 -06:00
VetheonGames b64f2069c4 fix up gemspec 2023-06-07 16:01:47 -06:00
VetheonGames 532b1d2cd4 initial commit 2023-06-07 15:56:30 -06:00
VetheonGames 3d908a2779
Initial commit 2023-06-07 15:54:09 -06:00