Repository navigation
MIR Backend - #94
Merged
Merged
MIR Backend#94
Conversation
- Corrected struct declarations - Corrected function names - Corrected function declarations - Other fixes
The selected row draws as if hovered (or active while pressed) with ImGuiSelectableFlags_Highlight, using a clearly brighter version of its own color for colored rows. Nav focus rectangles are hidden, including the one around the search bar.
The view follows the selection only when it moves or the results change, so manual scrolling is left alone. The scroll rect leaves a one-line margin so the next items stay slightly visible, and holding shift moves the selection five items at a time.
# Conflicts: # Libs/Editor/Src/Utils/FunctionGraphContextMenu.cpp
DrawChip paints a name over a rounded background of its color with an optional icon and ellipsizes it to fit a maximum width. Chip places one as a non-interactive item, so it takes layout space but has no id, and SelectableRow draws a selectable row that can highlight like a hovered item.
Type combo entries and the selected value are drawn as colored type chips with the type icon, using the UI chip widgets. Entries report their size to the layout so the dropdown grows to fit them, the closed combo fills its column and ellipsizes long names, and types are listed flat by default with an option to group them by category.
The variable editor gives types a wider column, and double clicking a function opens its file, selects its node and centers the graph on it.
Adds CStmtAssign, which references the variable a statement assigns, and ast::AddAssign to create it with its execution and value pins. The component is serialized with the rest.
References, assignments and operators now share PropagateTypes: references and assignments take the type of the variable they point to, and operators pass the first type they receive to their output.
The backend has no model for variables yet, so assignments are reported instead of being silently dropped.
Adds the node drawing with its unnamed value pins, and the context menu entry that creates it from an execution pin or from the canvas.
Literal and getter nodes hold their contents in the title, colored with their type, while the body of an assignment is that color darkened.
Covers the creation of the node, its statement links, the propagation of the variable type, that execution pins are not typed as expressions, and serialization.
[AST] Add variable assignments
Chip takes ChipFlags: Background paints the colored chip, None draws flat text. It is a non-interactive item, so containers grow with it. The separate DrawChip, DrawChipText and CalcChipWidth helpers are gone.
TypeCombo takes TypeComboFlags to draw the selected type as a chip and to group types by category. One type list is filtered per category with the pipe ECS helpers, and entries and the selected value are chip items, so the dropdown grows with them. GetTypeIcon takes a scope.
Double clicking a call or picking Show function in its context menu opens the type that owns the function and selects it there once drawn, or selects and centers it when it belongs to the open type. The elements panel double click no longer reopens its own type.
The drag moved nodes by indexing a selection that can change mid drag, reading past the snapshot of origins and moving nodes that were never dragged. The snapshot now holds the node ids with their origins.
Entry labels and keywords are views into interned names instead of copies, and the search is parsed only when its text changes. Matching and scoring ignore case and match through separators in place, so no lowercased copies are needed, and the cached keyword array stays inline. Operator entries are created through a shared helper, and their label is formatted when drawn.
Variables lead with the icon of their action and show their name as a chip of their type, and Get/Set join their searchable text. Variables, casts and constructors explain themselves with a delayed tooltip. Bumps Pipe for the SetItemTooltip hover flags.
…e/improved-node-rendering # Conflicts: # Libs/Editor/Src/Utils/FunctionGraph.cpp
[EDITOR] Context menu improvements and type chips
…e/improved-node-rendering
[EDITOR] Refactored nodes to follow a table structure
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.
Tracks the MIR backend work: AST features it needs (assignments, casts, for loops, generated names), the MIR/C codegen itself, and the editor/UI work built on top (node table layout, type chips, context menu improvements).