I know that this probably isn't very interesting to most people out there. But for modders, this is important! For stars in my game, they are colored using shaders. While others may just create different sprites that already have colored stars, I use a greyscale star, and replace each shade of grey with the correct color using a shader. Same for ships (replacing certain red shades with empire colors for example). You can see in my last post that the stars drawn are grey.
So I went ahead and added support for shaders in the new UI's images. I also added camera control to the "CameraView" UI Type that allows you to zoom in/out, and move around, and define the thickness of borders in where it start moving around. So for now, that part of the galaxy setup screen is done!
Just one more step, that is loading in another script's UI... Anyway, here's a screenshot of shaders and camera view in action (well, not animated, but you get the idea, it's zoomed out and I moved camera to left and down. Note the colored stars, which proves that shaders are working correctly):
Since I'm just getting the new UI system to work, the UIType class is one huge class. I plan on breaking it down to smaller classes after I'm done with the whole thing. So for programmers out there, pardon my klunky code.
Oh, the "code" for this screen?
Yeah, 21 lines of goodness to generate the above screen! Starting to see why I'm excited about this? See how the galaxy preview part is just 5 lines, defining how each star is drawn?