Repository navigation
[EDITOR] Draw type dropdown entries as colored type chips - #112
Merged
Merged
Conversation
Moves the context menu chip helpers into the UI library: DrawChip draws a name over a rounded background of its color with an optional icon, DrawChipText draws plain chip text, and SelectableRow draws a selectable row that can highlight like a hovered item.
The type dropdown in the variable editor and the details panel now draws its entries as colored chips with the type's icon, matching the graph context menu. TypeCombo takes whether the selected type in the closed combo is also drawn as a chip: the variable editor shows it, while the details panel keeps the plain preview because its row is already colored by the type.
TypeCombo takes whether types are grouped in Native, Structs and Classes categories or listed flat and sorted by name. The selected type chip is now drawn with BeginComboPreview/EndComboPreview, the supported custom preview path of the current ImGui.
Member
Author
|
Updated:
Note on the missing chips: I verified the drawing headlessly against the built |
Member
Author
|
Superseded — these commits were moved into #109 on feature/editor-improvements. |
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.
Summary
The type dropdown (variable editor, details panel) now renders its entries like the graph context menu: colored type chips with the type icon, e.g.
[I32].UI::DrawChip(name over a rounded background of its color, optional icon),UI::DrawChipTextandUI::SelectableRow(selectable row that can highlight like a hovered item) now live inUI/Widgets.h. The context menu uses them instead of its private copies.TypeCombotakes aselectedAsChipflag controlling whether the closed combo also shows the selected type as a chip:true, default)false) because the row is already tinted with the type colorStacked on #109 (
feature/editor-improvements).Testing
cmake --build Buildpassesctest --output-on-failurepasses