Toggable monster HP bar#420
Conversation
DESCRIPTION: Pressing F8 toggles health bars above all alive monsters on the screen. The health bar uses the same segmented style as the hover-over bar shown at the top of the screen when mousing over a monster. Pressing F8 again hides the bars. HOW IT WORKS: - F8 - toggles monster HP bars on/off - Each bar consists of 20 red segments - The bar appears above the monster's head (~60 units above BoundingBox) - Bars are only drawn when the monster is on screen (visibility check using CameraProjection::WorldToScreen) - F8 - toggles monster HP bars on/off - Each bar consists of 20 red segments - The bar appears above the monster's head (~60 units above BoundingBox) - Bars are only drawn when the monster is on screen (visibility check using CameraProjection::WorldToScreen)
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the user interface by introducing dynamic, toggleable health bars for monsters. This feature aims to improve player awareness during combat by providing clear visual indicators of enemy health, which can aid in strategic targeting and engagement. The implementation is robust, covering key event handling, rendering logic, and multi-language support, ensuring a seamless and accessible experience for all players. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a feature to toggle monster HP bars using the F8 key, including localization updates across multiple languages and help menu entries. The feedback highlights two main issues: first, calling BeginOpengl() and EndOpengl() inside the loop for each monster is highly inefficient and should be moved outside the loop to reduce CPU overhead; second, using GetAsyncKeyState directly in Update() can capture input when the window is out of focus or during chat, so it should be handled via the event-driven input system or with focus checks.
New Feature: Monster Health Bars
Files: NewUINameWindow.h / NewUINameWindow.cpp
Author: (MU Online client modification)
DESCRIPTION:
Pressing F8 toggles health bars above all alive monsters on the screen.
The health bar uses the same segmented style as the hover-over bar shown
at the top of the screen when mousing over a monster. Pressing F8 again
hides the bars.
HOW IT WORKS:
using CameraProjection::WorldToScreen)
CHANGED FILES:
src/source/UI/NewUI/Character/NewUINameWindow.h
src/source/UI/NewUI/Character/NewUINameWindow.cpp
DEPENDENCIES: