#pragma once #include #include "entities/solid_box.hpp" #include "utils/globals.hpp" #include "utils/light.hpp" #include "text/handler.hpp" namespace Nimbin { class Camera; class GlRenderer; enum class PultAction : uint8_t { ScrollEditorUp, ScrollEditorDown, ClearEditor, Compile, RunProgram, ConnectProgram, ConnectEditor, }; struct PultButton final : public SolidBox { std::string label; PultAction action; double press_timer { 0.0 }; bool pressed { false }; bool player_on { false }; PultButton(const std::string& lbl, PultAction act, Vec3 world_pos); void press(); void tick (double dt); void draw (GlRenderer& gl, const Camera& cam, const Light& light) const override; }; struct Pult : public SolidBox { static constexpr float W = 0.50f; static constexpr float H = 0.28f; static constexpr float D = 0.40f; Text::Handler label; DynArray buttons; std::string name; float half_w { W }; float half_d { D }; Pult(const std::string& n, Vec3 world_pos, float half_width = W, float half_depth = D); void tick(double dt); void draw(GlRenderer& gl, const Camera& cam, const Light& light) const override; }; } // namespace Nimbin