-
Notifications
You must be signed in to change notification settings - Fork 0
/
GUISkins.cs
51 lines (44 loc) · 2.07 KB
/
GUISkins.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace CareerManager
{
public class _GUISkins
{
/// create 2 GUI style objects to be defined in intiate styles method
public static GUIStyle _windowStyle, _headingStyle, _labelStyle, _missionnameStyle, _linebreakStyle;
public static void InitStyles()
{
/// set window style GUI value and a fixed width(keeps minmum window width at 250 pixels
_windowStyle = new GUIStyle(HighLogic.Skin.window);
_windowStyle.fixedWidth = 350f;
/// set label style GUI value and a stretch width to stretch out to fit whatever text
_labelStyle = new GUIStyle(HighLogic.Skin.window);
_labelStyle.alignment = TextAnchor.MiddleCenter; ;
_labelStyle.stretchWidth = true;
_labelStyle.fontStyle = FontStyle.Bold;
/// set label style GUI value and a stretch width to stretch out to fit whatever text
_headingStyle = new GUIStyle();
_headingStyle.alignment = TextAnchor.MiddleCenter; ;
_headingStyle.stretchWidth = true;
_headingStyle.fontStyle = FontStyle.Bold;
_headingStyle.fontSize = 20;
_headingStyle.fixedHeight = 15f;
/// set label style GUI value and a stretch width to stretch out to fit whatever text
_missionnameStyle = new GUIStyle();
_missionnameStyle.alignment = TextAnchor.UpperLeft;
_missionnameStyle.stretchWidth = true;
_missionnameStyle.fontStyle = FontStyle.Bold;
_missionnameStyle.fontSize = 20;
_missionnameStyle.fixedHeight = 15f;
/// set label style GUI value and a stretch width to stretch out to fit whatever text
_linebreakStyle = new GUIStyle();
_linebreakStyle.stretchWidth = true;
_linebreakStyle.fixedHeight = 3f;
/// set intiate styles check to true so only runs once
_CareerManager._hasInitStyles = true;
}
}
}