Jump to content

some other way to make colored rectangles


karlis

Recommended Posts

hi, i have such problem:

i need get colored rectangles between 2gui windows, so posgui with dxDrawRectangle dont helps, are there some properties to set color of some gui element or other way to make ones?

heres what i mean, i need to make posgui to false to alow litle window to be in front of dx'es:

1489.png

1488.png

and btw how can i get hex from RGB(not RGB from hex)

Link to comment
and btw how can i get hex from RGB(not RGB from hex)
function getStringFromColor( R, G, B, A )
if R and G and B then
return ('#%02x%02x%02x'):format(R, G, B, A or 255)
else
return false
end
end

Found it in a pastebin archive.. Havent tryed this yet, but should works.

Link to comment
hi, i have such problem:

i need get colored rectangles between 2gui windows, so posgui with dxDrawRectangle dont helps, are there some properties to set color of some gui element or other way to make ones?

heres what i mean, i need to make posgui to false to alow litle window to be in front of dx'es:

...

and btw how can i get hex from RGB(not RGB from hex)

There is no way to change button's background. You can only change label colour. You could create 126, 1x1 images with specific colours and stretch them all over button's background (button being parent of the colour image) but I wouldn't recommend it since that's a lot of images and its creation may drop down FPS or freeze PC for the loading time. It may not be that bad since they are just 1x1 images, give it a try.

Link to comment
but anyway i need 126 diffrent images:/, theres no way to do it with some label abusing and streching?

maybe put the color grid in a single image, set it as "background", and put come corresponding radios (or small buttons) on top of every color? *)

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...