Skip to content

Commit f62c95d

Browse files
committed
v1.3.5
- Hid the news tab temporarily, as Psyonix is now blocking automatic requests to their site. - Internal code improvements, as well as changed some naming standards.
1 parent c0e86cb commit f62c95d

30 files changed

+692
-692
lines changed

Controls/CRButton.cs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,71 +7,71 @@ namespace CodeRedLauncher.Controls
77
{
88
public partial class CRButton : UserControl
99
{
10-
private IconStore _icons = new IconStore();
11-
private bool _syncColor = false;
12-
private bool _enabled = true;
10+
private IconStore m_icons = new IconStore();
11+
private bool m_syncColor = false;
12+
private bool m_enabled = true;
1313

1414
public ControlTheme ControlType
1515
{
16-
get { return _icons.Control; }
17-
set { _icons.Control = value; UpdateTheme(); }
16+
get { return m_icons.Control; }
17+
set { m_icons.Control = value; UpdateTheme(); }
1818
}
1919

2020
public IconTheme IconType
2121
{
22-
get { return _icons.Theme; }
23-
set { _icons.Theme = value; UpdateTheme(); }
22+
get { return m_icons.Theme; }
23+
set { m_icons.Theme = value; UpdateTheme(); }
2424
}
2525

2626
public bool IconSync
2727
{
28-
get { return _syncColor; }
29-
set { _syncColor = value; UpdateTheme(); }
28+
get { return m_syncColor; }
29+
set { m_syncColor = value; UpdateTheme(); }
3030
}
3131

3232
public Image IconWhite
3333
{
34-
get { return _icons.GetIcon(IconTheme.White); }
35-
set { _icons.SetIcon(IconTheme.White, value); UpdateTheme(); }
34+
get { return m_icons.GetIcon(IconTheme.White); }
35+
set { m_icons.SetIcon(IconTheme.White, value); UpdateTheme(); }
3636
}
3737

3838
public Image IconBlack
3939
{
40-
get { return _icons.GetIcon(IconTheme.Black); }
41-
set { _icons.SetIcon(IconTheme.Black, value); UpdateTheme(); }
40+
get { return m_icons.GetIcon(IconTheme.Black); }
41+
set { m_icons.SetIcon(IconTheme.Black, value); UpdateTheme(); }
4242
}
4343

4444
public Image IconRed
4545
{
46-
get { return _icons.GetIcon(IconTheme.Red); }
47-
set { _icons.SetIcon(IconTheme.Red, value); UpdateTheme(); }
46+
get { return m_icons.GetIcon(IconTheme.Red); }
47+
set { m_icons.SetIcon(IconTheme.Red, value); UpdateTheme(); }
4848
}
4949

5050
public Image IconPurple
5151
{
52-
get { return _icons.GetIcon(IconTheme.Purple); }
53-
set { _icons.SetIcon(IconTheme.Purple, value); UpdateTheme(); }
52+
get { return m_icons.GetIcon(IconTheme.Purple); }
53+
set { m_icons.SetIcon(IconTheme.Purple, value); UpdateTheme(); }
5454
}
5555

5656
public Image IconBlue
5757
{
58-
get { return _icons.GetIcon(IconTheme.Blue); }
59-
set { _icons.SetIcon(IconTheme.Blue, value); UpdateTheme(); }
58+
get { return m_icons.GetIcon(IconTheme.Blue); }
59+
set { m_icons.SetIcon(IconTheme.Blue, value); UpdateTheme(); }
6060
}
6161

6262
public Image GetThemeIcon()
6363
{
64-
return _icons.GetThemeIcon();
64+
return m_icons.GetThemeIcon();
6565
}
6666

6767
public Image GetIcon(IconTheme type)
6868
{
69-
return _icons.GetIcon(type);
69+
return m_icons.GetIcon(type);
7070
}
7171

7272
public void SetIcon(IconTheme type, Image icon)
7373
{
74-
_icons.SetIcon(type, icon);
74+
m_icons.SetIcon(type, icon);
7575
}
7676

7777
public Font DisplayFont
@@ -88,8 +88,8 @@ public string DisplayText
8888

8989
public bool ButtonEnabled
9090
{
91-
get { return _enabled; }
92-
set { _enabled = value; UpdateTheme(); }
91+
get { return m_enabled; }
92+
set { m_enabled = value; UpdateTheme(); }
9393
}
9494

9595
public CRButton()
@@ -105,18 +105,18 @@ public void SetTheme(ControlTheme control, IconTheme icon)
105105

106106
private void UpdateTheme()
107107
{
108-
ButtonImg.BackgroundImage = _icons.GetThemeIcon();
108+
ButtonImg.BackgroundImage = m_icons.GetThemeIcon();
109109
ButtonImg.Visible = (ButtonImg.BackgroundImage != null);
110110

111111
if (ControlType == ControlTheme.Dark)
112112
{
113113
this.BackColor = GPalette.CodeRed;
114-
TextLbl.ForeColor = (IconSync ? _icons.GetColor() : GPalette.White);
114+
TextLbl.ForeColor = (IconSync ? m_icons.GetColor() : GPalette.White);
115115
}
116116
else if (ControlType == ControlTheme.Light)
117117
{
118118
this.BackColor = GPalette.CodePurple;
119-
TextLbl.ForeColor = (IconSync ? _icons.GetColor() : GPalette.White);
119+
TextLbl.ForeColor = (IconSync ? m_icons.GetColor() : GPalette.White);
120120
}
121121

122122
Invalidate();

Controls/CRChangelog.cs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,59 +13,59 @@ public enum ChangelogViews : byte
1313

1414
public partial class CRChangelog : UserControl
1515
{
16-
private IconStore _icons = new IconStore();
17-
private ChangelogViews _view = ChangelogViews.Module;
18-
private string _moduleTextRaw = "Loading...";
19-
private string _launcherTextRaw = "Loading...";
20-
private string _moduleText = "Loading...";
21-
private string _launcherText = "Loading...";
16+
private IconStore m_icons = new IconStore();
17+
private ChangelogViews m_view = ChangelogViews.Module;
18+
private string m_moduleTextRaw = "Loading...";
19+
private string m_launcherTextRaw = "Loading...";
20+
private string m_moduleText = "Loading...";
21+
private string m_launcherText = "Loading...";
2222

2323
public ControlTheme ControlType
2424
{
25-
get { return _icons.Control; }
26-
set { _icons.Control = value; UpdateTheme(); }
25+
get { return m_icons.Control; }
26+
set { m_icons.Control = value; UpdateTheme(); }
2727
}
2828

2929
public IconTheme IconType
3030
{
31-
get { return _icons.Theme; }
32-
set { _icons.Theme = value; UpdateTheme(); }
31+
get { return m_icons.Theme; }
32+
set { m_icons.Theme = value; UpdateTheme(); }
3333
}
3434

3535
public ChangelogViews DisplayType
3636
{
37-
get { return _view; }
38-
set { _view = value; UpdateTheme(); }
37+
get { return m_view; }
38+
set { m_view = value; UpdateTheme(); }
3939
}
4040

4141
public Image IconWhite
4242
{
43-
get { return _icons.GetIcon(IconTheme.White); }
44-
set { _icons.SetIcon(IconTheme.White, value); UpdateTheme(); }
43+
get { return m_icons.GetIcon(IconTheme.White); }
44+
set { m_icons.SetIcon(IconTheme.White, value); UpdateTheme(); }
4545
}
4646

4747
public Image IconBlack
4848
{
49-
get { return _icons.GetIcon(IconTheme.Black); }
50-
set { _icons.SetIcon(IconTheme.Black, value); UpdateTheme(); }
49+
get { return m_icons.GetIcon(IconTheme.Black); }
50+
set { m_icons.SetIcon(IconTheme.Black, value); UpdateTheme(); }
5151
}
5252

5353
public Image IconRed
5454
{
55-
get { return _icons.GetIcon(IconTheme.Red); }
56-
set { _icons.SetIcon(IconTheme.Red, value); UpdateTheme(); }
55+
get { return m_icons.GetIcon(IconTheme.Red); }
56+
set { m_icons.SetIcon(IconTheme.Red, value); UpdateTheme(); }
5757
}
5858

5959
public Image IconPurple
6060
{
61-
get { return _icons.GetIcon(IconTheme.Purple); }
62-
set { _icons.SetIcon(IconTheme.Purple, value); UpdateTheme(); }
61+
get { return m_icons.GetIcon(IconTheme.Purple); }
62+
set { m_icons.SetIcon(IconTheme.Purple, value); UpdateTheme(); }
6363
}
6464

6565
public Image IconBlue
6666
{
67-
get { return _icons.GetIcon(IconTheme.Blue); }
68-
set { _icons.SetIcon(IconTheme.Blue, value); UpdateTheme(); }
67+
get { return m_icons.GetIcon(IconTheme.Blue); }
68+
set { m_icons.SetIcon(IconTheme.Blue, value); UpdateTheme(); }
6969
}
7070

7171
public Font TitleFont
@@ -82,14 +82,14 @@ public Font DescriptionFont
8282

8383
public string ModuleText
8484
{
85-
get { return _moduleTextRaw; }
86-
set { _moduleText = Format(value); UpdateTheme(); }
85+
get { return m_moduleTextRaw; }
86+
set { m_moduleText = Format(value); UpdateTheme(); }
8787
}
8888

8989
public string LauncherText
9090
{
91-
get { return _launcherTextRaw; }
92-
set { _launcherText = Format(value); UpdateTheme(); }
91+
get { return m_launcherTextRaw; }
92+
set { m_launcherText = Format(value); UpdateTheme(); }
9393
}
9494

9595
public CRChangelog()
@@ -115,13 +115,13 @@ private void UpdateTheme()
115115
if (DisplayType == ChangelogViews.Module)
116116
{
117117
TitleLbl.Text = "Module Changelog";
118-
DescriptionLbl.Text = _moduleText;
118+
DescriptionLbl.Text = m_moduleText;
119119
DescriptionLbl.TextAlign = ContentAlignment.MiddleLeft;
120120
}
121121
else if (DisplayType == ChangelogViews.Launcher)
122122
{
123123
TitleLbl.Text = "Launcher Changelog";
124-
DescriptionLbl.Text = _launcherText;
124+
DescriptionLbl.Text = m_launcherText;
125125
DescriptionLbl.TextAlign = ContentAlignment.MiddleLeft;
126126
}
127127
else if (DisplayType == ChangelogViews.Offline)
@@ -144,7 +144,7 @@ private void UpdateTheme()
144144
DescriptionLbl.ForeColor = GPalette.Black;
145145
}
146146

147-
TitleImg.BackgroundImage = _icons.GetThemeIcon();
147+
TitleImg.BackgroundImage = m_icons.GetThemeIcon();
148148
Invalidate();
149149
}
150150

0 commit comments

Comments
 (0)