8#include "imgui/imgui.h"
9#include "imgui/imgui_stdlib.h"
14 inline bool InputFixed(
const char *str,
fixed *
val,
double step = 0.01,
double step_fast = 0.1,
const char *format =
"%.4f", ImGuiInputTextFlags flags = 0)
16 double val_d =
val->ToDouble();
17 bool changed = ImGui::InputDouble(str, &val_d, step, step_fast, format, flags | ImGuiInputTextFlags_EnterReturnsTrue);
24 inline bool InputInt(
const char* label,
int* v,
int step,
int step_fast,
const char *format, ImGuiInputTextFlags flags = 0)
26 return InputScalar(label, ImGuiDataType_S32, (
void*)v, (
void*)(step > 0 ? &step : NULL), (
void*)(step_fast > 0 ? &step_fast : NULL), format, flags);
37 ImGuiStyle &style = ImGui::GetStyle();
40 ImGui::SameLine(0.f, style.ItemInnerSpacing.x);
46 bool InputFixedSlider(
const char *str,
fixed *
val,
double val_min = 0.0,
double val_max = 1.0,
const char *format =
"%.4f", ImGuiSliderFlags flags = ImGuiSliderFlags_AlwaysClamp);
47 bool InputFixedDegrees(
const char *str,
fixed *
val,
double val_min = -360.0,
double val_max = 360.0, ImGuiInputTextFlags flags = 0);
#define EICON_RANDOM
Definition: EditorIcons.h:31
double val
Definition: PrecalcPath.cpp:40
static fixedf FromDouble(const double val)
Definition: fixed.h:194
Definition: EditorDraw.h:19
void SubtractItemWidth()
Definition: SystemEditorHelpers.cpp:110
bool InputFixedMass(const char *str, fixed *val, bool is_solar, ImGuiInputTextFlags flags=0)
Definition: SystemEditorHelpers.cpp:188
bool RandomButton()
Definition: SystemEditorHelpers.h:35
bool InputFixedDistance(const char *str, fixed *val, ImGuiInputTextFlags flags=0)
Definition: SystemEditorHelpers.cpp:142
bool InputFixedDegrees(const char *str, fixed *val, double val_min=-360.0, double val_max=360.0, ImGuiInputTextFlags flags=0)
Definition: SystemEditorHelpers.cpp:129
bool InputFixedRadius(const char *str, fixed *val, bool is_solar, ImGuiInputTextFlags flags=0)
Definition: SystemEditorHelpers.cpp:244
bool InputFixedSlider(const char *str, fixed *val, double val_min=0.0, double val_max=1.0, const char *format="%.4f", ImGuiSliderFlags flags=ImGuiSliderFlags_AlwaysClamp)
Definition: SystemEditorHelpers.cpp:117
Definition: SystemEditorHelpers.cpp:84
bool InputFixed(const char *str, fixed *val, double step=0.01, double step_fast=0.1, const char *format="%.4f", ImGuiInputTextFlags flags=0)
Definition: SystemEditorHelpers.h:14
bool InputInt(const char *label, int *v, int step, int step_fast, const char *format, ImGuiInputTextFlags flags=0)
Definition: SystemEditorHelpers.h:24