Arming state for confirm-gated menu items (ImGui-free, testable). More...
#include <canvas_menu.h>
Public Member Functions | |
| void | NoteRendered (ImGuiID id, int frame) |
| bool | IsArmed (ImGuiID id, int frame) const |
| bool | Click (ImGuiID id, int frame) |
| void | Reset () |
| ImGuiID | armed_id () const |
Private Attributes | |
| ImGuiID | armed_id_ = 0 |
| int | last_frame_ = -1 |
Arming state for confirm-gated menu items (ImGui-free, testable).
At most one item is armed at a time. An armed item stays armed only while it is rendered on consecutive frames; a gap (menu closed) disarms it.
Definition at line 264 of file canvas_menu.h.
| void yaze::gui::MenuConfirmState::NoteRendered | ( | ImGuiID | id, |
| int | frame ) |
Definition at line 51 of file canvas_menu.cc.
References armed_id_, last_frame_, and Reset().

| bool yaze::gui::MenuConfirmState::IsArmed | ( | ImGuiID | id, |
| int | frame ) const |
Definition at line 63 of file canvas_menu.cc.
References armed_id_, and last_frame_.
Referenced by Click().
| bool yaze::gui::MenuConfirmState::Click | ( | ImGuiID | id, |
| int | frame ) |
Definition at line 67 of file canvas_menu.cc.
References armed_id_, IsArmed(), last_frame_, and Reset().
Referenced by yaze::gui::RenderMenuItem().

|
inline |
Definition at line 276 of file canvas_menu.h.
References armed_id_, and last_frame_.
Referenced by Click(), and NoteRendered().
|
inline |
Definition at line 281 of file canvas_menu.h.
References armed_id_.
|
private |
Definition at line 284 of file canvas_menu.h.
Referenced by armed_id(), Click(), IsArmed(), NoteRendered(), and Reset().
|
private |
Definition at line 285 of file canvas_menu.h.
Referenced by Click(), IsArmed(), NoteRendered(), and Reset().