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

Title container #196

Merged
merged 17 commits into from
Jul 9, 2023
Merged

Conversation

Futuremappermydud
Copy link
Contributor

@Futuremappermydud Futuremappermydud commented Jul 5, 2023

Adds two things

  • Title Container (Stackable titles, currently unmovable)
  • Mania Indicator for vampire slayer, the text is green if standing on green terracotta and red if standing on any other block

Implement TitleContainer for stacking titles.
Implement Mania Indicator to show the player when they are standing on green terracotta during mania.
@kevinthegreat1
Copy link
Collaborator

I’m a bit confused with the implementation. The titles seem to only turn off once the player leaves slayer? Also I feel like the new system is difficult to use. I imagine a more of a drop in replacement for the title would work better and be more maintainable.

@Futuremappermydud
Copy link
Contributor Author

Title turn off when the titles active field is set to false. I’m not sure what you mean by it not being a drop in replacement how would you change it?

@kevinthegreat1
Copy link
Collaborator

I meant a system more similar to the current system, where I just have to call displayTitle with the parameters and a set time. I will take a closer look at this later.

@Futuremappermydud
Copy link
Contributor Author

I can implement a method that can emulate that with the scheduler if you like. The reason it isn’t built in is so I can keep them for a unknown amount of time and update their text and color dynamically like I do with the mania indicator.

Futuremappermydud and others added 5 commits July 7, 2023 18:00
Added a WIP configuration screen under /Skyblocker hud titleContainer that allows you to move, change alignment, and reorient the titles inside.
Added methods(TitleContainer.addTitleWithDismiss, and RenderHelper.displayInTitleContainerWDismissAndPlaySound) that will display the given title and after a set amount of ticks will disable that title.
@kevinthegreat1
Copy link
Collaborator

kevinthegreat1 commented Jul 8, 2023

I refactored the code, but I noticed some things.

  • Title positions are updated every frame, but tickDelta interpolates between positions. The interpolations slow down toward the end. I don't think there's a good solution for this though.
  • The title container position is a bit weird when dragging in the config screen, maybe have the mouse in the middle of the container when dragging.
  • The rendering code is uh... difficult to understand. Would be great if you can add some explanations or docs.

Sorry for being picky lol.

Futuremappermydud and others added 5 commits July 8, 2023 09:33
Add +/- to change scale
Mouse now properly goes to center for text box
Added comments to rendering code
kevinthegreat1
kevinthegreat1 previously approved these changes Jul 9, 2023
@AzureAaron AzureAaron merged commit 00983f7 into SkyblockerMod:master Jul 9, 2023
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.

3 participants