mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
refactor: Move custom ImGui functions to ImGuiExt namespace (#1427)
Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ namespace hex::plugin::builtin {
|
||||
// Determine achievement border color based on unlock state
|
||||
const auto borderColor = [&] {
|
||||
if (achievement.isUnlocked())
|
||||
return ImGui::GetCustomColorU32(ImGuiCustomCol_AchievementUnlocked, 1.0F);
|
||||
return ImGuiExt::GetCustomColorU32(ImGuiCustomCol_AchievementUnlocked, 1.0F);
|
||||
else if (node->isUnlockable())
|
||||
return ImGui::GetColorU32(ImGuiCol_Button, 1.0F);
|
||||
else
|
||||
@@ -127,7 +127,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::Separator();
|
||||
separator = true;
|
||||
|
||||
ImGui::TextFormattedColored(ImGui::GetCustomColorVec4(ImGuiCustomCol_AchievementUnlocked), "[ {} ]", LangEntry("hex.builtin.view.achievements.click"));
|
||||
ImGuiExt::TextFormattedColored(ImGuiExt::GetCustomColorVec4(ImGuiCustomCol_AchievementUnlocked), "[ {} ]", LangEntry("hex.builtin.view.achievements.click"));
|
||||
}
|
||||
|
||||
// Draw achievement description if available
|
||||
@@ -137,7 +137,7 @@ namespace hex::plugin::builtin {
|
||||
else
|
||||
ImGui::NewLine();
|
||||
|
||||
ImGui::TextFormattedWrapped("{}", LangEntry(desc));
|
||||
ImGuiExt::TextFormattedWrapped("{}", LangEntry(desc));
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
@@ -424,7 +424,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::BringWindowToDisplayFront(ImGui::GetCurrentWindow());
|
||||
|
||||
// Draw unlock text
|
||||
ImGui::TextFormattedColored(ImGui::GetCustomColorVec4(ImGuiCustomCol_AchievementUnlocked), "{}", "hex.builtin.view.achievements.unlocked"_lang);
|
||||
ImGuiExt::TextFormattedColored(ImGuiExt::GetCustomColorVec4(ImGuiCustomCol_AchievementUnlocked), "{}", "hex.builtin.view.achievements.unlocked"_lang);
|
||||
|
||||
// Draw achievement icon
|
||||
ImGui::Image(this->m_currAchievement->getIcon(), scaled({ 20, 20 }));
|
||||
@@ -434,7 +434,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::SameLine();
|
||||
|
||||
// Draw name of achievement
|
||||
ImGui::TextFormattedWrapped("{}", LangEntry(this->m_currAchievement->getUnlocalizedName()));
|
||||
ImGuiExt::TextFormattedWrapped("{}", LangEntry(this->m_currAchievement->getUnlocalizedName()));
|
||||
|
||||
// Handle clicking on the popup
|
||||
if (ImGui::IsWindowHovered() && ImGui::IsMouseReleased(ImGuiMouseButton_Left)) {
|
||||
|
||||
Reference in New Issue
Block a user