GIGA REFACTOR

This commit is contained in:
2022-03-02 18:51:42 +01:00
parent 553b2f6aad
commit 6df59b1487
92 changed files with 1807 additions and 1785 deletions

View File

@@ -9,7 +9,7 @@ SummonMenu::SummonMenu(client::Client* client) : GuiWidget(client), m_MenuOpened
m_Values.fill(0);
}
void SummonMenu::render() {
void SummonMenu::Render() {
if (m_MenuOpened) {
ImGui::Begin("Summon", &m_MenuOpened);
ImTextureID my_tex_id = ImGui::GetIO().Fonts->TexID;
@@ -25,7 +25,7 @@ void SummonMenu::render() {
ImGui::SameLine();
ImGui::PushID(i);
if (ImGui::InputInt("", m_Values.data() + i, 1, 10)) {
setSummonMax(i);
SetSummonMax(i);
}
ImGui::PopID();
}
@@ -43,7 +43,7 @@ void SummonMenu::render() {
ImGui::SameLine();
ImGui::PushID(i);
if (ImGui::InputInt("", m_Values.data() + i, 1, m_MobTypeCount)) {
setSummonMax(i);
SetSummonMax(i);
}
ImGui::PopID();
}
@@ -59,14 +59,14 @@ void SummonMenu::render() {
mobSent.push_back(mobSend);
}
}
m_Client->sendMobs(mobSent);
m_Client->SendMobs(mobSent);
m_Values.fill(0);
}
ImGui::End();
}
}
void SummonMenu::setSummonMax(int valueIndex) {
void SummonMenu::SetSummonMax(int valueIndex) {
int& value = m_Values[valueIndex];
value = std::max(0, value);
value = std::min(12, value);