coNolel Posted December 13, 2016 Share Posted December 13, 2016 hey guys , unforttunetly , i did a function " round rectangle " like xiti's one, but i used 2 semi circles , it looks good but bettween each semi sircle and the rectangle there is an empty space i think it's 1 px can some one fix it for me ? function dxDrawRoundedRectangle( x, y, width, height, color, postGUI ) local circlewidth = 12 local color = color or tocolor( 0, 0, 0, 150) dxGetTextWidth ( text, 1, font, true ) dxDrawImage(x, y, circlewidth, height, "img/semi2.png", 0, 0, 0, color, false) dxDrawRectangle(x+circlewidth, y, width, height, color, postGUI) dxDrawImage(x+circlewidth+width, y, circlewidth, height, "img/semi.png", 0, 0, 0, color, false) end Link to comment
Overkillz Posted December 13, 2016 Share Posted December 13, 2016 (edited) Your function is a bit weard, I'm not sure if semi1 is the left or right one, anyways I left u a comment respecting it. Also, there are some unnecessary things like Circle Width and dxGetTextWidth is not defined as a varaible, so, u can use it like that function dxDrawRoundedRectangle( x, y, width, height, color, postGUI ) local color = color or tocolor( 0, 0, 0, 150) dxDrawRectangle(x, y, width, height, color, postGUI) --Semi 1 Circle must be the LEFT one and Semi 2 Circle must be the RIGHT one dxDrawImage(x-height, y, height/2, height, "img/semi.png", 0, 0, 0, color, false) dxDrawImage(x+width, y, height/2, height, "img/semi2.png", 0, 0, 0, color, false) end NOT TESTED. PS: I would use dxDrawImageSection using just a circle Edited December 13, 2016 by Overkillz 1 Link to comment
coNolel Posted December 14, 2016 Author Share Posted December 14, 2016 Thank you .. i will test it once i get back to home . I tried to use dxdrawimagesection but i didn't knew how to handle the images .. i would be thankful if u learnt me how Peace 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