forked from fluffy-mods/ColonyManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResources.cs
126 lines (111 loc) · 4.99 KB
/
Resources.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// Resources.cs
// Copyright Karel Kroeze, 2020-2020
using UnityEngine;
using Verse;
namespace FluffyManager
{
[StaticConstructorOnStartup]
public static class Resources
{
public static Texture2D
// sorting arrows
ArrowTop,
ArrowUp,
ArrowDown,
ArrowBottom,
// stamps
StampCompleted,
StampSuspended,
StampStart,
// tab icons
IconOverview,
IconHammer,
IconHunting,
IconImportExport,
IconForestry,
IconLivestock,
IconForaging,
IconPower,
IconTrading,
IconMining,
// misc
SlightlyDarkBackground,
DeleteX,
Cog,
BarBackgroundActiveTexture,
BarBackgroundInactiveTexture,
Search,
BarShader,
Refresh,
Stopwatch,
// livestock header icons
WoolIcon,
MilkIcon,
StageC,
StageB,
StageA,
FemaleIcon,
MaleIcon,
MeatIcon,
UnkownIcon;
public static readonly Color Orange, SlightlyDarkBackgroundColour;
//public static Texture2D[] LifeStages = {StageA, StageB, StageC};
static Resources()
{
Orange = new Color( 1f, 144 / 255f, 0f );
SlightlyDarkBackgroundColour = new Color( 0f, 0f, 0f, .2f );
ArrowTop = ContentFinder<Texture2D>.Get( "UI/Buttons/ArrowTop" );
ArrowUp = ContentFinder<Texture2D>.Get( "UI/Buttons/ArrowUp" );
ArrowDown = ContentFinder<Texture2D>.Get( "UI/Buttons/ArrowDown" );
ArrowBottom = ContentFinder<Texture2D>.Get( "UI/Buttons/ArrowBottom" );
// stamps
StampCompleted = ContentFinder<Texture2D>.Get( "UI/Stamps/Completed" );
StampSuspended = ContentFinder<Texture2D>.Get( "UI/Stamps/Suspended" );
StampStart = ContentFinder<Texture2D>.Get( "UI/Stamps/Start" );
// tab icons
IconOverview = ContentFinder<Texture2D>.Get( "UI/Icons/Overview" );
IconHammer = ContentFinder<Texture2D>.Get( "UI/Icons/Hammer" );
IconHunting = ContentFinder<Texture2D>.Get( "UI/Icons/Hunting" );
IconImportExport = ContentFinder<Texture2D>.Get( "UI/Icons/ImportExport" );
IconForestry = ContentFinder<Texture2D>.Get( "UI/Icons/Tree" );
IconLivestock = ContentFinder<Texture2D>.Get( "UI/Icons/Livestock" );
IconForaging = ContentFinder<Texture2D>.Get( "UI/Icons/Foraging" );
IconPower = ContentFinder<Texture2D>.Get( "UI/Icons/Power" );
IconTrading = ContentFinder<Texture2D>.Get( "UI/Icons/Power" );
IconMining = ContentFinder<Texture2D>.Get( "UI/Icons/mining" );
// misc
SlightlyDarkBackground = SolidColorMaterials.NewSolidColorTexture( SlightlyDarkBackgroundColour );
DeleteX = ContentFinder<Texture2D>.Get( "UI/Buttons/Delete" );
Cog = ContentFinder<Texture2D>.Get( "UI/Buttons/Cog" );
BarBackgroundActiveTexture = SolidColorMaterials.NewSolidColorTexture( new Color( 0.2f, 0.8f, 0.85f ) );
BarBackgroundInactiveTexture = SolidColorMaterials.NewSolidColorTexture( new Color( 0.7f, 0.7f, 0.7f ) );
Search = ContentFinder<Texture2D>.Get( "UI/Buttons/Search" );
BarShader = ContentFinder<Texture2D>.Get( "UI/Misc/BarShader" );
Refresh = ContentFinder<Texture2D>.Get( "UI/Icons/refresh" );
Stopwatch = ContentFinder<Texture2D>.Get( "UI/Icons/stopwatch" );
// livestock header icons
WoolIcon = ContentFinder<Texture2D>.Get( "UI/Icons/wool" );
MilkIcon = ContentFinder<Texture2D>.Get( "UI/Icons/milk" );
StageC = ContentFinder<Texture2D>.Get( "UI/Icons/stage-3" );
StageB = ContentFinder<Texture2D>.Get( "UI/Icons/stage-2" );
StageA = ContentFinder<Texture2D>.Get( "UI/Icons/stage-1" );
FemaleIcon = ContentFinder<Texture2D>.Get( "UI/Icons/female" );
MaleIcon = ContentFinder<Texture2D>.Get( "UI/Icons/male" );
MeatIcon = ContentFinder<Texture2D>.Get( "UI/Icons/meat" );
UnkownIcon = ContentFinder<Texture2D>.Get( "UI/Icons/unknown" );
}
public static Texture2D LifeStages( int lifeStageIndex )
{
switch ( lifeStageIndex )
{
case 0:
return StageA;
case 1:
return StageB;
case 2:
default:
return StageC; // animals with > 3 lifestages just get the adult icon.
}
}
}
}