Skip to content

feat: add size and box alpha for held buttons#631

Merged
Samillion merged 4 commits intoSamillion:mainfrom
Keith94:button_held_effects
Apr 4, 2026
Merged

feat: add size and box alpha for held buttons#631
Samillion merged 4 commits intoSamillion:mainfrom
Keith94:button_held_effects

Conversation

@Keith94
Copy link
Copy Markdown
Contributor

@Keith94 Keith94 commented Apr 3, 2026

Added:

  • button_held_size - sets the scale of a button when held/pressed, independent of button_hover_size. Previously, holding a button always reset the scale back to 100%.

  • button_held_box_alpha - sets the transparency of the hover background box when a button is held down. Defaults to 0xCC (~80% transparent), brighter than the standard hover box at 0xE6 (~90% transparent).

@Samillion
Copy link
Copy Markdown
Owner

Thank you very much.

My only note is the way alpha will be set by users, at least 90% of users will not know what that value means or what it should be.

Would my opacity convert function from pause indicator help you here? so that it would be a 0-100 value instead.

-- convert percentage opacity (0-100) to ASS alpha values
local function convert_opacity(value)
value = math.max(0, math.min(100, value))
return string.format("%02X", (255 - (value * 2.55)))
end

@Keith94
Copy link
Copy Markdown
Contributor Author

Keith94 commented Apr 4, 2026

That's a great idea. I've added it to the PR now.

Comment thread modernz.lua Outdated
Co-authored-by: Sam <17427046+Samillion@users.noreply.github.com>
@Samillion
Copy link
Copy Markdown
Owner

Awesome, thank you very much. Let me know when it's merge ready, please.

Side note:
This PR and the gap chapter PR made me realize there is a whole bunch of dead code, wrong code and redundant code still left.

Specifically in osc_styles, layouts and osc_init.

image

@Keith94
Copy link
Copy Markdown
Contributor Author

Keith94 commented Apr 4, 2026

It's good to go.

Still it's an accomplishment how much code you got cleaned up. I'll try to help anyways.

@Samillion Samillion merged commit 9ed2db9 into Samillion:main Apr 4, 2026
@Keith94 Keith94 deleted the button_held_effects branch April 4, 2026 10:06
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.

2 participants