MCPcopy Create free account
hub / github.com/EasyRPG/Player / SetNumber

Method SetNumber

src/window_numberinput.cpp:81–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void Window_NumberInput::SetNumber(int inumber) {
82 int64_t num = 1;
83 for (int i = 0; i < digits_max; ++i) {
84 num *= 10;
85 }
86 number = Utils::Clamp<int64_t>(std::llabs(inumber), 0, num - 1);
87 ResetIndex();
88
89 plus = inumber >= 0;
90
91 UpdateCursorRect();
92 Refresh();
93}
94
95int Window_NumberInput::GetMaxDigits() const {
96 return digits_max;

Callers 4

InputNumberMethod · 0.80
PushUiNumberInputMethod · 0.80
PopMethod · 0.80
UpdateOptionsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected