1#ifndef YAZE_APP_CORE_INPUT_H
2#define YAZE_APP_CORE_INPUT_H
4#define IMGUI_DEFINE_MATH_OPERATORS
14#include "absl/strings/string_view.h"
16#include "imgui/imgui.h"
24IMGUI_API
bool InputHex(
const char *label, uint64_t *data);
25IMGUI_API
bool InputHex(
const char *label,
int *data,
int num_digits = 4,
26 float input_width = 50.f);
28IMGUI_API
bool InputHexShort(
const char *label, uint32_t *data);
29IMGUI_API
bool InputHexWord(
const char *label, uint16_t *data,
30 float input_width = 50.f,
bool no_step =
false);
31IMGUI_API
bool InputHexWord(
const char *label, int16_t *data,
32 float input_width = 50.f,
bool no_step =
false);
33IMGUI_API
bool InputHexByte(
const char *label, uint8_t *data,
34 float input_width = 50.f,
bool no_step =
false);
36IMGUI_API
bool InputHexByte(
const char *label, uint8_t *data, uint8_t max_value,
37 float input_width = 50.f,
bool no_step =
false);
39IMGUI_API
bool ListBox(
const char *label,
int *current_item,
40 const std::vector<std::string> &items,
41 int height_in_items = -1);
53IMGUI_API ImGuiID
GetID(
const std::string &
id);
55using GuiElement = std::variant<std::function<void()>, std::string>;
SNES 16-bit tile metadata container.
void ItemLabel(absl::string_view title, ItemLabelFlags flags)
bool InputHexWord(const char *label, uint16_t *data, float input_width, bool no_step)
bool ListBox(const char *label, int *current_item, const std::vector< std::string > &items, int height_in_items)
bool InputHexShort(const char *label, uint32_t *data)
void AddTableColumn(Table &table, const std::string &label, GuiElement element)
enum ItemLabelFlag { Left=1u<< 0u, Right=1u<< 1u, Default=Left, } ItemLabelFlags
void DrawTable(Table ¶ms)
bool InputHex(const char *label, uint64_t *data)
bool InputTileInfo(const char *label, gfx::TileInfo *tile_info)
std::variant< std::function< void()>, std::string > GuiElement
constexpr ImVec2 kZeroPos
constexpr ImVec2 kDefaultModalSize
ImGuiID GetID(const std::string &id)
bool InputHexByte(const char *label, uint8_t *data, float input_width, bool no_step)
Main namespace for the application.
std::vector< std::string > column_labels
std::vector< GuiElement > column_contents