[DO NOT MERGE] Text Block UI Rework & Abstracting - Multiline Editing, Tab Ribbon UI, & Other Goodies - #150
Draft
Superkat32 wants to merge 44 commits into
Draft
[DO NOT MERGE] Text Block UI Rework & Abstracting - Multiline Editing, Tab Ribbon UI, & Other Goodies#150Superkat32 wants to merge 44 commits into
Superkat32 wants to merge 44 commits into
Conversation
I would have waited longer to commit this, but there is a Windows update and I'm afraid of it destroying my progress
…I need to revert)
…is point, now. It was a bit complex but it is indeed nice Refactor: Abstractify tag formatting stuff from ColorPickerIncludedScreen into its own interface, TagFormatIncludedScreen Fix: Add formatting hotkeys to GlowcaseMultilineEditBox, and improve its cursor placement after tag insertions
Refactor: Split logic form GlowcaseMultilineEditBox into new FormattableMultilineTextField class
…tag losing the selection
Fix: Fixed a bug where Popup Blocks would say "No Content!" if there was only one line and it was formatted
…scrolling on PopupBlockViewScreen
…ionEditBox Chore: Cleanup old stuff
Refactor: Update widget field of SuggestionListWidget, it is now an AbstractWidget instead of an EditBox
…add height check to the SuggestionListWidget on mouseClicked
… turned into an Edit Box!)
… be entered if all text is selected
…t the value Refactor: Move some widgets into their own `number` folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE YET
Things to be done before merging is ready:
PR TLDR
Text Block Edit screen has options via tabs now, line editing logic for screens has been abstracted into a single widget and now allows for multiline selection & vertical scrolling, various other abstractions and small improvements have been made.
User Facing Changes
List of changes the user will see, including screenshots of the new result.
Text Block
- A ribbon tab UI has been added for the options, with the initial options on an "Edit" tab and remaining options on a "View" tab (fully replacing the previous Extra Properties screen).
- Multiline selection has been added.
- Vertical scrolling has been added if there's too many lines, and horizontal scrolling is now possible on the current line if it overflows the width of the editor.
- XYZ number offsets, yaw/pitch/roll rotations, and new anchor options have been added. For the offsets and rotation edit boxes, you can scroll or use the arrow keys to increase/decrease their numbers for quicker editing.
- A new "Insert Font Tag" button has been added, which inserts a selected QuickText font tag.
- Added Creature of Whimsy.
Other:Popup Block
- Uses the new text editor (multiline selection, formatting hotkeys, vertical & horizontal overflow scrolling).
- Added the formatting icon buttons to the edit screen.
- Added a couple pixels of vertical padding to the top of the screen to ensure it isn't touching the top of the screen.
- Fixed x positioning of buttons on smaller GUI scales (they are now always centered despite GUI scale).
View Screen:- The Popup Block's title is now shown at the top of the view screen. It is controlled by a block nbt entry (boolean), `view_screen_title` (true by default), but I don't recommend disabling it.
- The view screen can now vertically scroll if there are too many lines (I don't recommend having that many lines though).
Other:Note Item
Particle Block
Sound Block
Internal Changes
Main:
GlowcaseMultilineEditBox, has been created which contains text editing functionality. It uses theFormattableMultilineTextFieldclass to handle text logic (e.g. selection, holding the text), while the edit box handles the widget side of things (e.g. rendering, clicking). TheTextEditorScreenhas switched its main logic from theTextFieldHelperstuff to this new widget. All previous text editing screens (text/popup blocks, note item) now use this widget too.ColorPickerIncludedScreenhave been moved into a new interface,TagFormatIncludedScreen.MultilineTextViewAreawidget to render its text, allowing vertical scrolling if there's too many lines (I don't recommend that many lines though).Other:
Filter#apply()check, to allow for entering prefix characters when all of the text is selected.Vec3FieldsWidgetwas refactored some to allow for use of the newDegreeRotationEditBox, and repositioning & hovering of its children widgets.Vec3FieldsWidgetinto.../widget/ingame/number/(from.../widget/ingame/).LinearLayoutclass to position its option widgets (makes it easier to add new widgets).SuggestionListWidget'stextFieldWidgetwas renamed tofocusedWidget, and now allows anyAbstractWidgetinstead of specifically anEditBox(builder methods still require an EditBox though).SuggestionListWidgetnow has a height check on itsmouseClicked()method.Any changes can be made as needed. Thanks!