I'm testing things before I make a mod and I have strange problem.
I'm trying to simply display text in upper-right corner of the screen. Code looks like that:
...and it works, text displays but have very inconsistent size (or style?), and this behaviour is somehow connected to position of a camera.
When camera is near center of the map, text displays in small font (similar to debug console text style), but when I move camera to any edge of the map, text changes style to bigger font (similar to temperature, time, weather style text).
I attached picture how this looks.
So what am I doing wrong in those two lines of code?
I'm trying to simply display text in upper-right corner of the screen. Code looks like that:
Code Select
Rect labelRect = new Rect(UI.screenWidth - 200f, 20f, 190f, 30f);
Widgets.Label(labelRect, "Test text");
...and it works, text displays but have very inconsistent size (or style?), and this behaviour is somehow connected to position of a camera.
When camera is near center of the map, text displays in small font (similar to debug console text style), but when I move camera to any edge of the map, text changes style to bigger font (similar to temperature, time, weather style text).
I attached picture how this looks.
So what am I doing wrong in those two lines of code?