MCPcopy Create free account
hub / github.com/chrxh/alien / processIntern

Method processIntern

source/Gui/DeleteUserDialog.cpp:16–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14{}
15
16void DeleteUserDialog::processIntern()
17{
18 AlienImGui::Text(
19 "Warning: All the data of the user '" + *NetworkService::get().getLoggedInUserName()
20 + "' will be deleted on the server side.\nThese include the likes, the simulations and the account data.");
21 AlienImGui::Separator();
22
23 AlienImGui::InputText(AlienImGui::InputTextParameters().hint("Re-enter password").password(true).textWidth(0), _reenteredPassword);
24 AlienImGui::Separator();
25
26 ImGui::BeginDisabled(_reenteredPassword.empty());
27 if (AlienImGui::Button("Delete")) {
28 close();
29 if (_reenteredPassword == *NetworkService::get().getPassword()) {
30 onDelete();
31 } else {
32 GenericMessageDialog::get().information("Error", "The password does not match.");
33 }
34 _reenteredPassword.clear();
35 }
36 ImGui::EndDisabled();
37 ImGui::SetItemDefaultFocus();
38
39 ImGui::SameLine();
40 if (AlienImGui::Button("Cancel")) {
41 close();
42 _reenteredPassword.clear();
43 }
44}
45
46void DeleteUserDialog::onDelete()
47{

Callers

nothing calls this directly

Calls 5

InputTextParametersClass · 0.85
getLoggedInUserNameMethod · 0.80
getPasswordMethod · 0.80
informationMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected