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

Function CVarInputString

port/gui/UIWidgets.cpp:822–832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820}
821
822bool CVarInputString(const char* label, const char* cvarName, const InputOptions& options) {
823 bool dirty = false;
824 std::string value = CVarGetString(cvarName, options.defaultValue.c_str());
825 if (InputString(label, &value, options)) {
826 CVarSetString(cvarName, value.c_str());
827 Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
828 ShipInit::Init(cvarName);
829 dirty = true;
830 }
831 return dirty;
832}
833
834bool InputInt(const char* label, int32_t* value, const InputOptions& options) {
835 bool dirty = false;

Callers

nothing calls this directly

Calls 1

InputStringFunction · 0.85

Tested by

no test coverage detected