Egor_Varaksa Posted April 30, 2022 Share Posted April 30, 2022 How can I round off dgsCreateButton and dgsCreateEdit? Link to comment
Mkl Posted April 30, 2022 Share Posted April 30, 2022 Could be possible with properties, not sure. https://wiki.multitheftauto.com/wiki/Dgs-dxedit https://wiki.multitheftauto.com/wiki/Dgs-dxbutton Link to comment
Scripting Moderators thisdp Posted April 30, 2022 Scripting Moderators Share Posted April 30, 2022 combine with rounded rectangle https://wiki.multitheftauto.com/wiki/DgsCreateRoundRect Link to comment
Egor_Varaksa Posted April 30, 2022 Author Share Posted April 30, 2022 I don't understand how to round off certain elements with this. Can you explain? Link to comment
Scripting Moderators xLive Posted April 30, 2022 Scripting Moderators Share Posted April 30, 2022 (edited) 3 hours ago, Egor_Varaksa said: I don't understand how to round off certain elements with this. Can you explain? Hi! The first step is to use dgsCreateRoundRect function to create a round-rectangle. This function returns a shader that can be used to change the background of any DGS element to a rounded rectangle using dgsSetProperty. I will give you an example: local button = dgsCreateButton(0.45, 0.45, 0.1, 0.07, "Test Button", true) local roundRect = dgsCreateRoundRect(30, false, nil, nil, false) dgsSetProperty (button, "image", roundRect) -- for more info https://wiki.multitheftauto.com/wiki/Dgs-dxbutton#image The same thing applies to any DGS element. All you need to do is find the background property of the element you wish to change. Each DGS element may have a different name for its background. Here's a list of all DGS properties you can change. Edited April 30, 2022 by xLive Link to comment
Egor_Varaksa Posted April 30, 2022 Author Share Posted April 30, 2022 42 minutes ago, xLive said: Hi! The first step is to use dgsCreateRoundRect function to create a round-rectangle. This function returns a shader that can be used to change the background of any DGS element to a rounded rectangle using dgsSetProperty. I will give you an example: local button = dgsCreateButton(0.45, 0.45, 0.1, 0.07, "Test Button", true) local roundRect = dgsCreateRoundRect(30, false, nil, nil, false) dgsSetProperty (button, "image", roundRect) -- for more info https://wiki.multitheftauto.com/wiki/Dgs-dxbutton#image The same thing applies to any DGS element. All you need to do is find the background property of the element you wish to change. Each DGS element may have a different name for its background. Here's a list of all DGS properties you can change. Thanks! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now