#pragma once // Ghost multiplayer UI: the multiplayer menu (GhostDialog, bound to M) and // the always-present nameplate overlay (GhostNameplateOverlay) that labels // each remote ghost with its owner's display name. #include #include "native/skate3_native_ghost_proto.h" namespace skate3 { class GhostDialog final : public rex::ui::ImGuiDialog { public: explicit GhostDialog(rex::ui::ImGuiDrawer* drawer) : ImGuiDialog(drawer) {} void Show(); void Hide(); void Toggle(); bool visible() const { return visible_; } protected: void OnDraw(ImGuiIO& io) override; private: void SyncBuffersFromCvars(); bool visible_ = false; bool synced_ = false; bool copy_feedback_ = false; char room_input_[16] = {}; char server_input_[128] = {}; char name_input_[skate3::native_ghost::kGhostMaxNameLen + 1] = {}; int rate_int_ = 20; }; // Draws a small colored nameplate above every remote ghost whenever ghost // multiplayer is enabled. Registers like the render-mode indicator (always // present, draws only while active). class GhostNameplateOverlay final : public rex::ui::ImGuiDialog { public: explicit GhostNameplateOverlay(rex::ui::ImGuiDrawer* drawer) : ImGuiDialog(drawer) {} protected: void OnDraw(ImGuiIO& io) override; }; } // namespace skate3