-
Notifications
You must be signed in to change notification settings - Fork 29
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
GUI (1.21) #121
base: 1.21.1
Are you sure you want to change the base?
GUI (1.21) #121
Conversation
Revert to `9505d81` (last 1.21 commit) Bump Java Change Initializaiton message to remove Minecraft version Add SGui dependency Add `Icons` Add `AdminGui` and use it in `AdminCommand` Add `PagedGui` Add `ListGui` and use it in `ListCommand` Split `HomeCommand#go` into `HomeCommand#go` and `HomeCommand#execGo` for use in `ListGui`
- Reformatted my code to comply with Project settings - Finalized command changes - Finalized GUI - All GUI "buttons" now play click sound - Finalized Icon names - Removed unused Icons - `InfoGui` now allows Owners to open `ModifyGui` directly - Added `MemberGui` - `ModifyGui` now allows to change MOTD, change color, change type and has a "Go back" button. - `PagedGui` doesn't use translation keys any more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly couldn't stop smiling while playing around with this. The attention to detail is honestly incredible. I thought about creating something like this myself, but I never ended up doing it, so I'm super happy someone else is. I just have a few smaller issues with some things.
Not fixed is only this conversation: ickerio#121 (comment)
I have made changes to implement these requested changes. Only unresolved request is InfoGui.java#L29-L32 because there was no answer when I committed. |
Thanks for the awesome PR and thanks for reviewing Blue. Blue feel free to merge whenever you thinks its ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if these are used as base64, I would represent them in a readable format in the code. Having raw base64 in source code can be seen as suspicious, even though I've checked over these and they're fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no way that I'm aware of to store these as a more readable format. If you decode the string, it's not even a texture itself - just a link to a PNG file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can store it as that json string and encode it to base64 at runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a point in doing this. It will just use server resources and take up lines of code.
Every Patbox (Patbox is the developer of SGui) mod with a GUI uses base64 strings for player head icons, Fabric Tailor stores skins as base64 strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll wait to see the opinion of the other developers then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I it's not ideal but it seems like the best solution to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Encoding to base64 at runtime takes essentially no time in return for far better code readability.
Have you made it possible for someone to still use the original commands without using the GUI? I personally like having the option of both, maybe with an additional setting under the settings command. |
I tried to change commands as little as possible. Members, info and list commands are now GUI-only since having both text message and a GUI show up would just look strange and it was out of scope for me to add GUI toggles. I have no idea how settings are stored and I can't really work on this PR at the moment. I set it so that maintainers can edit, someone more familiar with the system can make a change. |
This uses SGui to make GUIs. Someone should probably remake
safe
command to also use SGui.The GUI:
info
,list
andmembers
commandsadmin
andmodify
commands (opened if no sub-command is specified).home
(tp only),rank promote
,rank demote
andkick
commands in list GUIs.I'm not sure if I made a good job with UI. I don't really like some icons (primarily in
ModifyGui
).I have compiled a node view of the GUI (click to view)
For viewing / editing in Obsidian (unzip contents to the root of vault): factions gui node view.zip