![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Sopsit |
Hey. I’m newbie. Is there any way to change the color of a texture button’s texture via code?
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Sopsit |
Hey. I’m newbie. Is there any way to change the color of a texture button’s texture via code?
![]() |
Reply From: | Moreus |
you can change texture im button
you can edit texture in run time
https://forum.godotengine.org/53368/modifying-a-texture-at-run-time
or make shaders
![]() |
Reply From: | jgodfrey |
Another option, if you’re just trying to change between solid-color textures…
You can probably get away with assigning a simple, white base-texture to the button. Then, you can assign new colors to the modulate
property of the underlying canvas item to adjust the button’s color.