49 void Open(
int slot, std::shared_ptr<Menu> menu)
override;
50 bool IsOpen(
int slot)
const override;
51 void Close(
int slot)
override;
53 void CloseAll(
int slot, std::string_view replyKey)
override;
54 void Prompt(
int slot, std::string prompt, std::function<
bool(
int slot, std::string_view text)> callback)
override;
55 std::string
Translate(
int slot, std::string_view key, std::string_view fallback)
const override;
59 static constexpr int64_t PressGapMs = 200;
61 static constexpr int64_t RenderIntervalMs = 250;
70 bool operator==(
const Body&)
const =
default;
77 int64_t RenderedAt = 0;
86 uint64_t PrevButtons = 0;
87 int64_t LastInputTime = 0;
92 void Push(
int slot, std::shared_ptr<Menu> menu);
95 void ResetCursor(
int slot);
99 void Draw(
int slot,
bool changed);
100 std::string Render(
int slot, Menu& menu);
101 Body CurrentBody(
int slot)
const;
107 bool ReadKeys(
int slot);
109 void Select(
int slot,
int index);
110 bool RunKey(
int slot, uint64_t pressed);
111 void MoveCursor(
int slot,
int step);
112 void JumpPage(
int slot,
int delta);
117 PerSlot<Cursor> _cursors;
119 Subscription _onFrame;