8000 Added menu icon in tellraw messages for click actions by UnlucksMcGee · Pull Request #122 · NeunEinser/bingo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added menu icon in tellraw messages for click actions #122

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

Merged
merged 21 commits into from
May 31, 2022

Conversation

UnlucksMcGee
Copy link
Contributor
@UnlucksMcGee UnlucksMcGee commented May 20, 2022

Addresses Issue #71

Changes

  • Adjusted a few names of translations to be more generic e.g. bingo.game.go_to_lobby.hint was changed to bingo.game.menu.options.hint as the text described both going to lobby and switching spectator mode.
  • Added more translations for the menu itself: bingo.game.menu.text, bingo.game.menu.icon, bingo.game.menu.title, bingo.game.menu.hover_text, bingo.game.menu.hint
  • Added a print_bingo_menu function that prints out the bingo menu in chat Added a couple of print functions to display the menu, the menu options and their respective hint messages.
  • Added the bingo icon [≡] (hamburger menu) in various places. It has hover text as well as a click event to print the bingo menu. I chose this unicode symbol over the other one, as this one displays larger within minecraft.

Where it displays (outdated)

  1. On "GO!", as well as hinting to the player about clicking the icon
    image
  2. On each item get (note the hover text when the mouse is over it)
    image
  3. When the menu icon is clicked, it displays the bingo menu
    image
  4. When you complete a goal, it just prints out the current menu options
    image
  5. When you leave the game and then re-join
    image

Notes

  • German and Polish translations are needed for the new additions.
  • If you want to compile it, first temporarily remove the comments in de_de.json and pl_pl.json, otherwise the script will fail.

Any thoughts or changes to be made? Feel free to make your own changes if you wish.

@UnlucksMcGee
Copy link
Contributor Author
UnlucksMcGee commented May 21, 2022

Regarding changes to how it displays:

  • I think number 1 should be changed, to remove the [≡] icon in front of "GO!", as it makes the text look offset compared to the 321 countdown. And the bingo menu options are anyway displayed right below it.

  • For number 3, I think the bingo menu should be stripped to the bare minimum. So removing the title heading and the hint below it (the hint shouldn't be necessary as the player would've just clicked on it and therefore they are aware of it). Done

  • For number 5, the hint should be moved below so that it is consistent with number 1. Done

  • Perhaps adding hover text for the "Click here" text, so that it is more intuitive to the player that something will happen when they click?

Do you agree with those changes?

@UnlucksMcGee
Copy link
Contributor Author

Made some of the suggested changes.

Where it displays

  1. On "GO!", as well as hinting to the play 8000 er about clicking the icon
    image
  2. On each item get (note the hover text when the mouse is over it)
    image
  3. When the menu icon is clicked, it displays the bingo menu
    image
  4. When you complete a goal, it just prints out the current menu options
    image
  5. When you leave the game and then re-join
    image

@NeunEinser NeunEinser linked an issue May 24, 2022 that may be closed by this pull request
@NeunEinser
Copy link
Owner

Nice work :)

@NeunEinser
Copy link
Owner

Perhaps it'd still be nice to print the menu for when another team completes a goal, as well as when you die & respawn, from the original #71.

@UnlucksMcGee
Copy link
Contributor Author
UnlucksMcGee commented May 27, 2022

Should only the hamburger menu icon be clickable, or should the surrounding square brackets be included to have a wider hitbox?
image

Currently, only the red section is clickable, but should it rather be the entire green section?

@NeunEinser
Copy link
Owner

I usually only do the part inside the brackets, not sure if I am entirely consistent here tho, and I don't really care 😁

@UnlucksMcGee
Copy link
Contributor Author

Perhaps it'd still be nice to print the menu for when another team completes a goal, as well as when you die & respawn, from the original #71.

I'm unsure how to go about printing the menu for all teams, considering that the functions are run as "@s". But perhaps there is some other global detection that could be used?

For death detection, we would need a scoreboard objective for counting deaths. I'm unsure what would be a suitable name for that scoreboard objective according to your naming scheme, nor where that should be set up. Perhaps that could be done in a follow-up pull request?

@NeunEinser
Copy link
Owner
NeunEinser commented May 29, 2022

I'm unsure how to go about printing the menu for all teams, considering that the functions are run as "@s". But perhaps there is some other global detection that could be used?

Quick&dirty would be to simply add the same tellraw in all announce functions. Other possibility is to add a new function with the tellraw and execute.

For death detection, we would need a scoreboard objective for counting deaths. I'm unsure what would be a suitable name for that scoreboard objective according to your naming scheme, nor where that should be set up.

Well, the scoreboard should go in init with everything else and sth like bingo.on_death (player_killed would be too long already). And I'd probably call a function tag in the general tick function, as is done with player_reconnect and new_player. And then have a general util function where potential other stuff after a death can be handled as well.

Perhaps that could be done in a follow-up pull request?

Would be happy to merge without these changes, if you prefer that,

@NeunEinser
Copy link
Owner

I'm unsure how to go about printing the menu for all teams, considering that the functions are run as "@s". But perhaps there is some other global detection that could be used?

Quick&dirty would be to simply add the same tellraw in all announce functions. Other possibility is to add a new function with the tellraw and execute.

Actually, it's probably best if I do both changes with #55 at once.

@UnlucksMcGee
Copy link
Contributor Author

Current status

Where it displays

  1. On "Loading Terrain...", as well as hinting to the player about clicking the icon.
    image
  2. On each item get (note the hover text when the mouse is over it)
    image
  3. When the menu icon is clicked, it displays the bingo menu
    image
  4. When you complete a goal, it just prints out the current menu options
    image
  5. When you leave the game and then re-join
    image

I believe all the suggestions have been resolved.

@NeunEinser
Copy link
Owner

Otherwise should be good to merge, thank you very much :)

Copy link
Owner
@NeunEinser NeunEinser left a comment

Choose a reason for hiding this comment

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

Tested and looks good. Changed the menu button to print without hint, so the hint should only appear on game start or when rejoining

@NeunEinser NeunEinser merged commit 993ba16 into NeunEinser:master May 31, 2022
@UnlucksMcGee UnlucksMcGee deleted the click_action_menu branch July 30, 2022 12:17
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.

The click action for returning to the lobby should appear more often
2 participants
0