Files
waylight/src/ImGui.cpp

27 lines
587 B
C++
Raw Normal View History

#include "ImGui.hpp"
ImGui::ImGui(std::shared_ptr<TextRenderer> text_renderer)
: m_text_renderer(text_renderer)
{
}
void ImGui::begin(
std::pmr::vector<u32> const input_runes, bool ctrl, bool shift)
{
m_input_runes = input_runes;
m_ctrl = ctrl;
m_shift = shift;
}
void ImGui::end() { }
auto ImGui::text_input(std::size_t id, std::pmr::string &str, Rectangle rec,
TextInputOptions options) -> std::bitset<2>
{
bool submitted { false };
bool changed { false };
return std::bitset<2> { static_cast<unsigned long long>(
(submitted ? 1 : 0) | (changed ? 2 : 0)) };
}