MAB Posted September 30, 2015 Posted September 30, 2015 lets take a look at the circles of this resource : https://community.multitheftauto.com/index.php?p=resources&s=details&id=11880 now. does anyone know how was the circles made? You can find me here.
Dealman Posted September 30, 2015 Posted September 30, 2015 Most likely they are 2 different images, one being the outline and the other being the fill. You can achieve the "fill" effect by using dxDrawImageSection. If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
MAB Posted September 30, 2015 Author Posted September 30, 2015 Most likely they are 2 different images, one being the outline and the other being the fill. You can achieve the "fill" effect by using dxDrawImageSection. can you please show me an example? because i don't understand it well... it would be good if you uploaded the example images... thanks You can find me here.
Dealman Posted September 30, 2015 Posted September 30, 2015 I usually don't provide examples, but here you go; Meta.xml Client.lua local screenW, screenH = guiGetScreenSize() local guiFillScroller = guiCreateScrollBar(832, 371, 256, 20, true, false) guiScrollBarSetScrollPosition(guiFillScroller, 100) local dx_UVWidth = 256 local dx_UVHeight = 256 showCursor(true) function StartDrawing() dxDrawImageSection(0.4333333333333333*screenW, 0.3074074074074074*screenH, 256, dx_UVHeight*-1, 0, 0, 256, dx_UVHeight*-1, "CircleFill.png", 0, 0, 0, tocolor(187, 0, 0, 220), false) dxDrawImage(0.4333333333333333*screenW, 0.0703703703703704*screenH, 256, 256, "CircleOutline.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Fill Value: "..tostring(dx_UVHeight), 0.4338541666666667*screenW, 0.3203703703703704*screenH, 0.5666666666666667*screenW, 0.3388888888888889*screenH, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end addEventHandler("onClientRender", root, StartDrawing) function DetectGUIScrolled(theScroller) local theValue = (guiScrollBarGetScrollPosition(theScroller)*2.56) -- Since the texture is 256x256, we want 100% to be 256. dx_UVHeight = theValue end addEventHandler("onClientGUIScroll", root, DetectGUIScrolled) Images CircleFill.png (256x256) CircleOutline.png (256x256) If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
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