darkraziel Posted August 5, 2015 Share Posted August 5, 2015 Let's say I have a 1x1 pixel black image that I want to cover the entire screen with. How could I do this without modifying its scale property? I want to use this 1 black pixel to create a black transparent overlay for popups in my game. Any help is appreciated. Link to comment Share on other sites More sharing options...
Tilde Posted August 5, 2015 Share Posted August 5, 2015 Without modifying its scale? That seems like an unnecessary block. I guess you can also circumvent using the pixel image entirely by drawing a rectangle over the screen using Graphics. Link to comment Share on other sites More sharing options...
darkraziel Posted August 5, 2015 Author Share Posted August 5, 2015 I wanted to avoid drawing a rectangle using graphics since it slowed performance on an specific device. But I already found another way to do it. Thanks. Tilde 1 Link to comment Share on other sites More sharing options...
Skeptron Posted August 7, 2015 Share Posted August 7, 2015 Can you share it? Link to comment Share on other sites More sharing options...
darkraziel Posted August 10, 2015 Author Share Posted August 10, 2015 I ended up using scale and re-sizing in case the world size changed. Tilde 1 Link to comment Share on other sites More sharing options...
georgejfrick Posted August 10, 2015 Share Posted August 10, 2015 You might create a tile sprite to do it? Have the 1 black pixel be your texture and the tilesprite will tile it to the width/height. Tilde 1 Link to comment Share on other sites More sharing options...
darkraziel Posted August 12, 2015 Author Share Posted August 12, 2015 You might create a tile sprite to do it? Have the 1 black pixel be your texture and the tilesprite will tile it to the width/height. Thanks for this answer. I ended up using this method and then adding the tile sprite to a group that scales itself if the window is resized. Works perfectly. Link to comment Share on other sites More sharing options...
Recommended Posts