Override a button style [SOLVED]

Post Reply
User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Override a button style [SOLVED]

by runs » Post

An example to override a button in a formspec. I cannot get it, because the hovered state and the background color remains. I try to set a not squared bg img.

Can I set the color of a button trasnsparent?
Last edited by runs on Fri Dec 02, 2022 16:14, edited 1 time in total.

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: Override a button style

by Nathan.S » Post

You should be able to use an image_button with a transparent image, might need to do some styling as well to make it show show a background.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: Override a button style

by runs » Post

Nathan.S wrote:
Thu Dec 01, 2022 13:34
You should be able to use an image_button with a transparent image, might need to do some styling as well to make it show show a background.
I know that with image_button is OK.

But with a normal button? The normal button has a gradient, I guess is a backadround9 image hardcoded. It can be changed to an image. But why normal button does not respect transparency?

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: Override a button style

by AiTechEye » Post

i tried to add "style_type[button,button;bgcolor=#ffffff55;bgimg=default_cross.png]" and when i sets the bgcolor transparency it sets the texture transparency instead

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: Override a button style

by runs » Post

thanx

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: Override a button style

by runs » Post

/solved

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest