How do I create a transparent rectangle

Monkey Forums/Monkey Beginners/How do I create a transparent rectangle

En929(Posted 2015) [#1]
How do I create a white rectangle box that's transparent in the middle?


ImmutableOctet(SKNG)(Posted 2015) [#2]
Do you mean the entire thing, or just the outline (Wireframe quad). For a transparent rectangle, use 'DrawRect' and 'SetAlpha' (As well as 'SetBlend', depending on what you're doing). For a wire-frame look, you could either use custom OpenGL code, or render it using lines yourself. To manually draw the rectangle's lines, you can use the 'DrawLine' command.

Here's an example using standard Mojo:


Press space to cycle through the modes.


En929(Posted 2015) [#3]
Thanks ImmutableOctet(SKNG). That worked!