MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / String_Input_Print

Method String_Input_Print

Source/Fodder.cpp:9521–9555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9519}
9520
9521void cFodder::String_Input_Print(int16 pPosY) {
9522 GUI_Input_CheckKey();
9523
9524 GUI_Render_Text_Centred(mInput.c_str(), pPosY);
9525
9526 if (mKeyCodeAscii == 0x0D && mInput.size())
9527 mGUI_SaveLoadAction = 2;
9528
9529 if (mKeyCodeAscii == 8)
9530 goto loc_2E675;
9531
9532 // Is Number
9533 if (mKeyCodeAscii >= 0x30 && mKeyCodeAscii <= 0x39)
9534 goto loc_2E636;
9535
9536 if (mKeyCodeAscii < 0x41 || mKeyCodeAscii > 0x5A)
9537 goto loc_2E6A4;
9538
9539loc_2E636:;
9540 if (mInput.size() >= 12)
9541 goto loc_2E6A4;
9542
9543 mInput.push_back((char)mKeyCodeAscii);
9544
9545 goto loc_2E6A4;
9546
9547loc_2E675:;
9548
9549 if (mInput.size()) {
9550 mInput.pop_back();
9551 }
9552
9553loc_2E6A4:;
9554 String_Input_Check();
9555}
9556
9557void cFodder::String_Input_Check() {
9558

Callers

nothing calls this directly

Calls 3

pop_backMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected