change tint of image on hud
I think I've gotten the HUD pointer correctly using:
Now, I'm wanting to change the color of the crosshairs I made using 4 white images. I want to change the tint appearance property to green but I don't know how to get the Image on the HUD.
I've looked here:
But I didn't see anything about images. What step am I missing?
asked May 15 '19 at 02:04 PM in C++ Programming
You can use AHUD::DrawLine() to draw crosshair with 2 lines by providing function with Start and end points and color. Same thing you can archive using AHUD::DrawRect() which also takes color as input along other variables. With this one you can make your crosshair thicker or thinner if you like. And there is also AHUD::DrawTexture() which also takes color to tint the image among other parameters. For this one you would need to provide reference to texture you want to draw. Feel free to explore and experiment. There are usually more ways to accomplish single thing in game development. Use the one that works best for you. All of above functions take color as parameter so you would need to provide them with color you want.
If you want more complete example from production you can look on Helium Rain Github repository. Whole game is made using Slate and I personally using it as great learning resource!
Follow this question
Once you sign in you will be able to subscribe for any updates here