MCPcopy Create free account
hub / github.com/crossuo/crossuo / Load

Method Load

src/ScreenStages/MainScreen.cpp:194–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194void CMainScreen::Load()
195{
196 m_AutoLogin->Checked = g_Config.AutoLogin;
197
198 m_Account->SetTextA(g_Config.Login);
199 m_Account->SetPos(checked_cast<int>(g_Config.Login.length()));
200
201 m_MainGump.m_PasswordFake->SetTextA("");
202 m_MainGump.m_PasswordFake->SetPos(0);
203
204 const size_t len = g_Config.Password.length();
205 if (len != 0)
206 {
207 m_Password->SetTextA(g_Config.Password);
208 for (size_t zv = 0; zv < len; zv++)
209 {
210 m_MainGump.m_PasswordFake->Insert(L'*');
211 }
212 m_Password->SetPos(checked_cast<int>(len));
213 }
214 else
215 {
216 m_Password->SetTextA("");
217 m_Password->SetPos(0);
218 }
219
220 m_SavePassword->Checked = g_Config.SavePassword;
221 if (!m_SavePassword->Checked)
222 {
223 m_Password->SetTextW({});
224 m_MainGump.m_PasswordFake->SetTextW({});
225 }
226}
227
228void CMainScreen::Save()
229{

Callers

nothing calls this directly

Calls 5

SetPosMethod · 0.80
lengthMethod · 0.80
SetTextAMethod · 0.45
InsertMethod · 0.45
SetTextWMethod · 0.45

Tested by

no test coverage detected