LiteLoaderBrandingProvider.java
4.18 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/*
* This file is part of LiteLoader.
* Copyright (C) 2012-16 Adam Mummery-Smith
* All Rights Reserved.
*/
package com.mumfrey.liteloader.client.api;
import java.net.URI;
import com.mumfrey.liteloader.api.BrandingProvider;
import com.mumfrey.liteloader.client.util.render.IconAbsolute;
import com.mumfrey.liteloader.core.LiteLoader;
import com.mumfrey.liteloader.util.render.Icon;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;
/**
* LiteLoader's branding provider
*
* @author Adam Mummery-Smith
*/
public class LiteLoaderBrandingProvider implements BrandingProvider
{
public static final int BRANDING_COLOUR = 0xFF4785D1;
public static final ResourceLocation ABOUT_TEXTURE = new ResourceLocation("liteloader", "textures/gui/about.png");
public static final IconAbsolute LOGO_COORDS = new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE,
"logo", 128, 40, 0, 0, 256, 80);
public static final IconAbsolute ICON_COORDS = new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE,
"chicken", 32, 45, 0, 80, 64, 170);
public static final IconAbsolute TWITTER_AVATAR_COORDS = new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE,
"twitter_avatar",32, 32, 192, 80, 256, 144);
public static final URI LITELOADER_URI = URI.create("http://www.liteloader.com/");
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider#getPriority()
*/
@Override
public int getPriority()
{
return -1000;
}
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider#getDisplayName()
*/
@Override
public String getDisplayName()
{
return "LiteLoader " + I18n.format("gui.about.versiontext", LiteLoader.getVersion());
}
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider#getCopyrightText()
*/
@Override
public String getCopyrightText()
{
return "Copyright (c) 2012-2017 Adam Mummery-Smith";
}
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider#getHomepage()
*/
@Override
public URI getHomepage()
{
return LiteLoaderBrandingProvider.LITELOADER_URI;
}
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider#getBrandingColour()
*/
@Override
public int getBrandingColour()
{
return LiteLoaderBrandingProvider.BRANDING_COLOUR;
}
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider#getLogoResource()
*/
@Override
public ResourceLocation getLogoResource()
{
return LiteLoaderBrandingProvider.ABOUT_TEXTURE;
}
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider#getLogoCoords()
*/
@Override
public Icon getLogoCoords()
{
return LiteLoaderBrandingProvider.LOGO_COORDS;
}
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider#getIconResource()
*/
@Override
public ResourceLocation getIconResource()
{
return LiteLoaderBrandingProvider.ABOUT_TEXTURE;
}
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider#getIconCoords()
*/
@Override
public Icon getIconCoords()
{
return LiteLoaderBrandingProvider.ICON_COORDS;
}
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider#getTwitterUserName()
*/
@Override
public String getTwitterUserName()
{
return "therealeq2";
}
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider
* #getTwitterAvatarResource()
*/
@Override
public ResourceLocation getTwitterAvatarResource()
{
return LiteLoaderBrandingProvider.ABOUT_TEXTURE;
}
/* (non-Javadoc)
* @see com.mumfrey.liteloader.api.BrandingProvider#getTwitterAvatarCoords()
*/
@Override
public Icon getTwitterAvatarCoords()
{
return LiteLoaderBrandingProvider.TWITTER_AVATAR_COORDS;
}
}