MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / InitGameOptionsMenu

Function InitGameOptionsMenu

neo/framework/Dhewm3SettingsMenu.cpp:2356–2368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2354static idCVar* ui_nameVar = nullptr;
2355
2356void InitGameOptionsMenu()
2357{
2358 ui_nameVar = cvarSystem->Find( "ui_name" );
2359
2360 // Note: ImGui uses UTF-8 for strings, Doom3 uses ISO8859-1, so we need to translate
2361 if ( D3_ISO8859_1toUTF8( ui_nameVar->GetString(), playerNameBuf, sizeof(playerNameBuf) ) == nullptr ) {
2362 // returning NULL means playerNameBuf wasn't big enough - that shouldn't happen,
2363 // at least the player name input in the original menu only allowed 40 chars
2364 playerNameBuf[sizeof(playerNameBuf)-1] = '\0';
2365 }
2366
2367 InitOptions( gameOptions, IM_ARRAYSIZE(gameOptions) );
2368}
2369
2370static int PlayerNameInputTextCallback(ImGuiInputTextCallbackData* data)
2371{

Callers 1

InitDhewm3SettingsMenuFunction · 0.85

Calls 4

D3_ISO8859_1toUTF8Function · 0.85
InitOptionsFunction · 0.85
FindMethod · 0.45
GetStringMethod · 0.45

Tested by

no test coverage detected