Yue Posted September 17, 2021 Posted September 17, 2021 How can I put transparency to a widget, I'm searching but I don't know. Quote Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Ttiki Posted September 19, 2021 Posted September 19, 2021 Hello. That's pretty easy to do, you just have to change the background color and pass a Vec4 for each channel (red, green, blue and alpha) Here is a little example in Lua : --A little example of panel creation with a transparent background local panel=Widget:Panel(0,0,64,64,gui:GetBase()) panel:SetBool("border",true) panel:SetObject("backgroundcolor",Vec4(0.15,0.15,0.15,0.75)) --Vec4(r,g,b,a) And here is the result : 2 1 Quote Just making games for fun. Currently working on T3-L4
Yue Posted September 19, 2021 Author Posted September 19, 2021 6 hours ago, Ttiki said: Hello. That's pretty easy to do, you just have to change the background color and pass a Vec4 for each channel (red, green, blue and alpha) Here is a little example in Lua : --A little example of panel creation with a transparent background local panel=Widget:Panel(0,0,64,64,gui:GetBase()) panel:SetBool("border",true) panel:SetObject("backgroundcolor",Vec4(0.15,0.15,0.15,0.75)) --Vec4(r,g,b,a) And here is the result : Thank you very much, always something new to learn in this community. One question, the color of the text can still be changed that way, because what I have done is to modify directly the Button.lua, panel.lua etc.. Quote Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.