MCPcopy Create free account
hub / github.com/JRickey/BattleShip / CVarInputInt

Function CVarInputInt

port/gui/UIWidgets.cpp:873–884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

871}
872
873bool CVarInputInt(const char* label, const char* cvarName, const InputOptions& options) {
874 bool dirty = false;
875 int32_t defaultValue = std::stoi(options.defaultValue);
876 int32_t value = CVarGetInteger(cvarName, defaultValue);
877 if (InputInt(label, &value, options)) {
878 CVarSetInteger(cvarName, value);
879 Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
880 ShipInit::Init(cvarName);
881 dirty = true;
882 }
883 return dirty;
884}
885
886bool CVarColorPicker(const char* label, const char* cvarName, Color_RGBA8 defaultColor, bool hasAlpha,
887 uint8_t modifiers, UIWidgets::Colors themeColor) {

Callers

nothing calls this directly

Calls 1

InputIntFunction · 0.85

Tested by

no test coverage detected