#How to highlight buttons on hover/press?

1 messages · Page 1 of 1 (latest)

steady helm
#

How could I make it so UI buttons behave similar to game buttons? (On hover, they get highlighted and on press, the button gets lighter but with a stronger white outline).

steady helm
#

Got it working, but now noticed the outlines get kinda lost

#

which pixel density should be used?

#

also in case someone needs the answer, It was here I think:

celest tinsel
#

and had the texture setting for the highlighted sprite set to bilinear

#

because it seems too pixelated now.

steady helm
#

went ingame because it did still look wrong, then used UI multiplier on 2.0 and noticed the UI was actually quite blurry

#

what I'm wondering now is how to make they have these clicky sounds

celest tinsel
#

Well, I'm proud to see yet another UI following standards.

steady helm
#

I love that you are like the unturned standards police, + the otto police profile picture 😭

celest tinsel
#

Someone got to upkeep the standards.

#

Even if it is modding and not official.

#

also

#

buttons are 10 units apart.

#

This, this is just annoying.

steady helm
#

Thats what I struggled a bit at, is there a way to measure other than by eye?

#

Also as for pixel density I noticed the edges get kinda too much radius at 100 when compared to my unturned screen (1920x1080 using UI scale at 1.0).

I need to set it to somewhere by 150 or 200 so the radius matches that of my game somewhat

celest tinsel
#

do math.

celest tinsel
steady helm
#

😭

#

Imma go with that everyone is using either 1920 or 720

celest tinsel
steady helm
#

silly me

#

the box was scaled lmao

celest tinsel
#

That doesn't preserve resolution/quality.

steady helm
celest tinsel
#

Probably

#

did you stop using scale?

#

always have that at 1, 1, 1

steady helm
#

yeah, didn't know it was modified

#

still wondering how to do the clicky hover sounds

celest tinsel
#

and activate it on button press

steady helm
#

What do you think of that X symbol, it was on the icons you sent on imperial xD

celest tinsel
#

it is part of Unity's original UI toolkit

#

therefore built into the base game assets

#

just use a regular square button with an X made in the traditional font.

celest tinsel
#

because the text parts of the UI seem quite pixelated.