FowardElement Posted August 28, 2015 Share Posted August 28, 2015 I want to load an image (located in the scripts folder) and I'm having an issue with it loading. Here is the code I'm using. if (e.KeyCode == Keys.NumPad1) { UI.DrawTexture ("./scripts/Passed.png", 0, 0, 5000, new Point (300, 200), new Size (600, 200)); } My problem is, the first time I press the button, the image doesnt show. Every time after that it does. Am I missing something? Link to comment Share on other sites More sharing options...
pillow Posted August 28, 2015 Share Posted August 28, 2015 you should put it in a loop.. Link to comment Share on other sites More sharing options...
FowardElement Posted August 28, 2015 Author Share Posted August 28, 2015 Does the Wait(1000); code not work anymore? Link to comment Share on other sites More sharing options...
GeorgeZhang Posted August 28, 2015 Share Posted August 28, 2015 string filename = "scripts\\mypic.png" Filename should be something like this. And like @pillow said, loop it or put in tick event. Since it "draw" for only 1 time, that's why you have to loop it. Hope it helps Link to comment Share on other sites More sharing options...
FowardElement Posted August 29, 2015 Author Share Posted August 29, 2015 Thanks. I got it working. Link to comment Share on other sites More sharing options...
pillow Posted August 29, 2015 Share Posted August 29, 2015 Anytime bro #ForwardElement Link to comment Share on other sites More sharing options...
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