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

Proposal to Change Creative Buttons Texture #4221

Open
wants to merge 2 commits into
base: 1.21.3
Choose a base branch
from

Conversation

matthewperiut
Copy link

@matthewperiut matthewperiut commented Nov 10, 2024

Screenshots of updated texture and position

image

2024-11-11_17 20 15
2024-11-11_17 20 18
2024-11-11_17 20 21
2024-11-11_17 20 25

BELOW IS OUTDATED!

tl;dr

video.mp4

Proposal to Change Creative Buttons Texture

The creative buttons texture has haunted me for years in fabric-api. Why?
They're blue. The entire interface for buttons hasn't been blue in over 6 years.
Additionally they have too much contrast, sticking out like a sore thumb in the user interface.

How do we fix it?

We have a great example of something interactable in the creative menu already, the scroll bar.
It has an inactive state and an active state:
active:
scroll_enabled
inactive:
scroll_disabled

Extrapolating the Features

Notice that the creative scroll bar is in an indented section where it can move freely.
This creates a contrast strong enough to differentiate it from the rest of the menu.
The "grip" lines horizontal on the bar also changes color depending on if you can or cannot scroll.

Using the Features

Including the indent to seperate it from the rest of the UI helps the contrast to make it visible, without making it stand out visually from the slots and the scroll bar.
Using the pallette of the scroll bar in its active and inactive state for the pallette in the buttons being active and inactive makes it more flush with the design and not stick out.

Result:

Default appearance:
default_appearance
Hovering on right:
hover_right
Hovering on left:
hover_left
Disabled left:
disabled_left
Disabled right:
disabled_right

Full screenshot view of change

2024-11-10_02 40 15

Previous appearance for reference:

2024-11-10_02 50 22

Small Feats

Reduced color pallete allows for greater compression
5,512 bytes -> 382 bytes
14x decrease in size

Jar size improvement:
1,992,580 -> 1,989,946
0.13% total jar size improvement
(small things matter LOL)
detail: compiled on arch linux with Temurin-21.0.5+11-LTS

Footnote additional details

The arrow is made white instead of the button outline because it becomes too noisy in a small area.
Minecraft 1.15 removed blue backgrounds from buttons in Minecraft, and it came out in 2019, 6 years ago.
Previous attempts, which the textures were worse rip- #2740, #2746

@Laxystem
Copy link

Laxystem commented Nov 11, 2024

I believe it makes a lot more sense to have secondary buttons there instead of primary ones.

In-game UI mostly doesn't have primary buttons (except for the p menu - but that one uses them as tabs, which means it's outdated anyway).

@matthewperiut
Copy link
Author

Another reference, back in 1.14, where hovered buttons were still blue this texture was awesome!
Screenshot 2024-11-11 at 1 45 55 PM
but nowadays it really doesn't make much sense with the colors chosen to be inside the existing gui as-is

@embeddedt
Copy link
Contributor

embeddedt commented Nov 11, 2024

I like the new look, but the right edge of the buttons doesn't align with the right edge of the scrollbar. To be fair this was also an issue with the previous implementation, but it seems more obvious now.

@matthewperiut
Copy link
Author

Does this look better?
image
Alternatively, this?
image

@embeddedt
Copy link
Contributor

I like the first revision, yes.

@matthewperiut
Copy link
Author

image
I further modified it to have the disabled button be a bit nicer

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