mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-16 09:13:50 +00:00
fix: toLowerInPlace infinite recursion + remove redundant callback guards
Fix toLowerInPlace() which was accidentally self-recursive (would stack overflow on any Lua string lowering). Remove 30 redundant if(addonEventCallback_) wrappers around pure fireAddonEvent blocks. Extract color constants in performance_hud.cpp (24 inline literals).
This commit is contained in:
parent
b892dca0e5
commit
b66033c6d8
3 changed files with 32 additions and 86 deletions
|
|
@ -23,6 +23,12 @@
|
|||
namespace wowee {
|
||||
namespace rendering {
|
||||
|
||||
namespace {
|
||||
constexpr ImVec4 kHelpText = {0.6f, 0.6f, 0.6f, 1.0f};
|
||||
constexpr ImVec4 kSectionHeader = {0.8f, 0.8f, 0.5f, 1.0f};
|
||||
constexpr ImVec4 kTitle = {0.7f, 0.7f, 0.7f, 1.0f};
|
||||
} // namespace
|
||||
|
||||
PerformanceHUD::PerformanceHUD() {
|
||||
}
|
||||
|
||||
|
|
@ -456,39 +462,39 @@ void PerformanceHUD::render(const Renderer* renderer, const Camera* camera) {
|
|||
|
||||
// Controls help
|
||||
if (showControls) {
|
||||
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "CONTROLS");
|
||||
ImGui::TextColored(kTitle, "CONTROLS");
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.5f, 1.0f), "Movement");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "WASD: Move/Strafe");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "Q/E: Strafe left/right");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "Space: Jump");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "X: Sit/Stand");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "~: Auto-run");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "Z: Sheathe weapons");
|
||||
ImGui::TextColored(kSectionHeader, "Movement");
|
||||
ImGui::TextColored(kHelpText, "WASD: Move/Strafe");
|
||||
ImGui::TextColored(kHelpText, "Q/E: Strafe left/right");
|
||||
ImGui::TextColored(kHelpText, "Space: Jump");
|
||||
ImGui::TextColored(kHelpText, "X: Sit/Stand");
|
||||
ImGui::TextColored(kHelpText, "~: Auto-run");
|
||||
ImGui::TextColored(kHelpText, "Z: Sheathe weapons");
|
||||
|
||||
ImGui::Spacing();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.5f, 1.0f), "UI Panels");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "B: Bags/Inventory");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "C: Character sheet");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "L: Quest log");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "N: Talents");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "P: Spellbook");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "M: World map");
|
||||
ImGui::TextColored(kSectionHeader, "UI Panels");
|
||||
ImGui::TextColored(kHelpText, "B: Bags/Inventory");
|
||||
ImGui::TextColored(kHelpText, "C: Character sheet");
|
||||
ImGui::TextColored(kHelpText, "L: Quest log");
|
||||
ImGui::TextColored(kHelpText, "N: Talents");
|
||||
ImGui::TextColored(kHelpText, "P: Spellbook");
|
||||
ImGui::TextColored(kHelpText, "M: World map");
|
||||
|
||||
ImGui::Spacing();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.5f, 1.0f), "Combat & Chat");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "1-0,-,=: Action bar");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "Tab: Target cycle");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "Enter: Chat");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "/: Chat command");
|
||||
ImGui::TextColored(kSectionHeader, "Combat & Chat");
|
||||
ImGui::TextColored(kHelpText, "1-0,-,=: Action bar");
|
||||
ImGui::TextColored(kHelpText, "Tab: Target cycle");
|
||||
ImGui::TextColored(kHelpText, "Enter: Chat");
|
||||
ImGui::TextColored(kHelpText, "/: Chat command");
|
||||
|
||||
ImGui::Spacing();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.5f, 1.0f), "Debug");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "F1: Toggle this HUD");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "F4: Toggle shadows");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "F7: Level-up FX");
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "Esc: Settings/Close");
|
||||
ImGui::TextColored(kSectionHeader, "Debug");
|
||||
ImGui::TextColored(kHelpText, "F1: Toggle this HUD");
|
||||
ImGui::TextColored(kHelpText, "F4: Toggle shadows");
|
||||
ImGui::TextColored(kHelpText, "F7: Level-up FX");
|
||||
ImGui::TextColored(kHelpText, "Esc: Settings/Close");
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue