Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/tooltip autoscroll #468

Merged
merged 7 commits into from
Jul 30, 2024
Merged

Feature/tooltip autoscroll #468

merged 7 commits into from
Jul 30, 2024

Conversation

tonihele
Copy link
Owner

@tonihele tonihele commented Jul 28, 2024

Little bit quirky. Implements the tooltip autoscroll if it doesn't entirely fit to the allocated space.

  • Somehow I could not get the style applied properly, so the component now has a fixed style set. Not a problem for us but annoying design
  • The effect length is 70s, hmm, yeah, the effects time calculation is a bit difficult for this kind of task. I would have wanted infinite time but then we just get 1s always as normalized time. So now everything is normalized to this 70s, the delays and speed. Pretty annoying. The effect length should perhaps be take account in the math so that this length variable could be adjusted freely without the effect speed changing....

Edit: I fixed the math so that there are far less variables and more constants

@tonihele tonihele merged commit e2ecdd5 into master Jul 30, 2024
3 checks passed
@tonihele tonihele deleted the feature/tooltip-autoscroll branch July 30, 2024 17:53
@Trass3r Trass3r requested a review from Copilot November 23, 2024 11:35
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 suggestion.

Files not reviewed (2)
  • assets/Interface/GameHUD.xml: Language not supported
  • assets/Interface/MyControls.xml: Language not supported
Comments skipped due to low confidence (2)

src/toniarts/openkeeper/gui/nifty/autoscrolltext/AutoScrollTextControl.java:43

  • The logger should be named 'LOGGER' to follow Java naming conventions for constants.
private static final Logger logger = System.getLogger(AutoScrollTextControl.class.getName());

src/toniarts/openkeeper/view/SystemMessageState.java:128

  • The indentation of the closing brace is incorrect. It should be aligned with the opening brace of the method.
    }

reverse = start < end;
timeWhenChangedDirection = 0;
currentXOffset = 0;
speedFactor = Integer.parseInt(parameter.getProperty("length", "1000"));
Copy link
Preview

Copilot AI Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The speedFactor property should be parsed as a float instead of an integer for more precise control over the speed.

Suggested change
speedFactor = Integer.parseInt(parameter.getProperty("length", "1000"));
speedFactor = Float.parseFloat(parameter.getProperty("length", "1000"));

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant