MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / ReloadItems

Method ReloadItems

Goldleaf/source/ui/ui_AccountLayout.cpp:50–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 }
49
50 void AccountLayout::ReloadItems() {
51 this->options_menu->ClearItems();
52 auto rename_itm = pu::ui::elm::MenuItem::New(cfg::Strings.GetString(208));
53 rename_itm->SetColor(g_Settings.GetColorScheme().text);
54 rename_itm->AddOnKey(std::bind(&AccountLayout::optsRename_DefaultKey, this));
55 this->options_menu->AddItem(rename_itm);
56
57 auto icon_itm = pu::ui::elm::MenuItem::New(cfg::Strings.GetString(209));
58 icon_itm->SetColor(g_Settings.GetColorScheme().text);
59 icon_itm->AddOnKey(std::bind(&AccountLayout::optsIcon_DefaultKey, this));
60 this->options_menu->AddItem(icon_itm);
61
62 auto delete_itm = pu::ui::elm::MenuItem::New(cfg::Strings.GetString(210));
63 delete_itm->SetColor(g_Settings.GetColorScheme().text);
64 delete_itm->AddOnKey(std::bind(&AccountLayout::optsDelete_DefaultKey, this));
65 this->options_menu->AddItem(delete_itm);
66
67 if(acc::IsLinked()) {
68 auto services_itm = pu::ui::elm::MenuItem::New(cfg::Strings.GetString(336));
69 services_itm->SetColor(g_Settings.GetColorScheme().text);
70 services_itm->AddOnKey(std::bind(&AccountLayout::optsServicesInfo_DefaultKey, this));
71 this->options_menu->AddItem(services_itm);
72 }
73 }
74
75 void AccountLayout::optsRename_DefaultKey() {
76 const auto name = ShowKeyboard(cfg::Strings.GetString(213), this->cur_prof_base.nickname, 10, sizeof(this->cur_prof_base.nickname) - 1);

Callers 2

AccountLayoutMethod · 0.95
LoadMethod · 0.95

Calls 1

IsLinkedFunction · 0.85

Tested by

no test coverage detected