aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-02-26 10:50:03 -0500
committerlempamo <[email protected]>2017-02-26 10:50:03 -0500
commit875698963306e73b9ebb13401b73934835b9e2f5 (patch)
tree964846453f47f777d51e99503a4a5f80377d0e09 /ShiftOS.WinForms
parentd1469e5f6b9ce90f30e25bf5b0032d8a92309855 (diff)
parente2284a7bc577aa78f1d22c8134b651fcb00147a0 (diff)
downloadshiftos_thereturn-875698963306e73b9ebb13401b73934835b9e2f5.tar.gz
shiftos_thereturn-875698963306e73b9ebb13401b73934835b9e2f5.tar.bz2
shiftos_thereturn-875698963306e73b9ebb13401b73934835b9e2f5.zip
Merge remote-tracking branch 'refs/remotes/shiftos-game/master'
Diffstat (limited to 'ShiftOS.WinForms')
-rw-r--r--ShiftOS.WinForms/Applications/ColorPicker.cs1
-rw-r--r--ShiftOS.WinForms/Applications/MUDControlCentre.cs3
-rw-r--r--ShiftOS.WinForms/Applications/ShiftLetters.Designer.cs2
-rw-r--r--ShiftOS.WinForms/Applications/ShiftLetters.cs131
-rw-r--r--ShiftOS.WinForms/Applications/Terminal.cs1
-rw-r--r--ShiftOS.WinForms/Oobe.cs8
-rw-r--r--ShiftOS.WinForms/Resources/Shiftorium.txt6
-rw-r--r--ShiftOS.WinForms/Tools/ControlManager.cs5
-rw-r--r--ShiftOS.WinForms/WinformsDesktop.cs5
9 files changed, 101 insertions, 61 deletions
diff --git a/ShiftOS.WinForms/Applications/ColorPicker.cs b/ShiftOS.WinForms/Applications/ColorPicker.cs
index a8c0b3f..bf35567 100644
--- a/ShiftOS.WinForms/Applications/ColorPicker.cs
+++ b/ShiftOS.WinForms/Applications/ColorPicker.cs
@@ -1049,7 +1049,6 @@ namespace ShiftOS.WinForms.Applications
case 1:
pnlpink1.BackColor = Color.HotPink;
pnlpink1.Show();
- break;
pnlpink1.BackColor = Color.DeepPink;
pnlpink1.Show();
pnlpink2.BackColor = Color.HotPink;
diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs
index 6426562..02fe868 100644
--- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs
+++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs
@@ -243,8 +243,7 @@ namespace ShiftOS.WinForms.Applications
}
private Shop editingShop = null;
- private string editingShopOldName = "";
-
+
public void ShowCreateShop()
{
this.Invoke(new Action(() =>
diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.Designer.cs b/ShiftOS.WinForms/Applications/ShiftLetters.Designer.cs
index 48e77bf..0692244 100644
--- a/ShiftOS.WinForms/Applications/ShiftLetters.Designer.cs
+++ b/ShiftOS.WinForms/Applications/ShiftLetters.Designer.cs
@@ -68,8 +68,10 @@ namespace ShiftOS.WinForms.Applications
this.lblword.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.lblword.Size = new System.Drawing.Size(302, 22);
this.lblword.TabIndex = 1;
+ this.lblword.Tag = "header3";
this.lblword.Text = "Choose a wordlist from the box below.";
this.lblword.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ this.lblword.TextChanged += new System.EventHandler(this.lblword_TextChanged);
//
// tbguess
//
diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.cs b/ShiftOS.WinForms/Applications/ShiftLetters.cs
index 7a3000a..32a1ed4 100644
--- a/ShiftOS.WinForms/Applications/ShiftLetters.cs
+++ b/ShiftOS.WinForms/Applications/ShiftLetters.cs
@@ -52,6 +52,47 @@ namespace ShiftOS.WinForms.Applications
List<String> contributorsWordlist = new List<string> { "philipadams", "carverh", "computelinux", "lempamo",
"wowmom", "michaeltheshifter", "arencclc", "therandommelon", "pfg", "craftxbox"};
+ List<string> osWordlist = new List<string>
+ {
+ "windows",
+ "longhorn",
+ "memphis",
+ "neptune",
+ "vista",
+ "visopsys",
+ "ubuntu",
+ "linux",
+ "arch",
+ "debian",
+ "redhat",
+ "fedora",
+ "opensuse",
+ "kubuntu",
+ "lubuntu",
+ "xubuntu",
+ "mythbuntu",
+ "ubuntumate",
+ "zorin",
+ "lindows",
+ "msdos",
+ "freedos",
+ "freebsd",
+ "netbsd",
+ "pcbsd",
+ "android",
+ "ios",
+ "macos",
+ "mint",
+ "mikeos",
+ "raspbian",
+ "cosmos",
+ "chicago",
+ "vienna",
+ "whistler",
+ "windowsxp",
+ "windowsforworkgroups"
+ };
+
public ShiftLetters()
{
InitializeComponent();
@@ -67,50 +108,52 @@ namespace ShiftOS.WinForms.Applications
lblword.Visible = true;
btnrestart.Visible = false;
- var wordlist = new List<string>
- {
- "shiftos",
- "devx",
- "artpad",
- "shifter",
- "pong",
- "shiftorium",
- "codepoints",
- "shiftletters",
- "shops",
- "mud",
- "notification",
- "namechanger",
- "skinning",
- "skinloader",
- "calculator",
- "fileskimmer",
- "lua",
- "shiftnet",
- "terminal",
- "textpad"
- };
- foreach(var w in shiftWordlist)
+ bool isShiftOS = comboBox1.SelectedItem.ToString().ToLower() == "shiftos";
+ bool isContributors = comboBox1.SelectedItem.ToString().ToLower() == "contributors";
+ bool isOSes = comboBox1.SelectedItem.ToString().ToLower() == "operating systems";
+
+
+ var wordlist = new List<string>();
+ if (isOSes)
{
- if (!wordlist.Contains(w.ToLower()))
+ foreach (var w in osWordlist)
{
- wordlist.Add(w.ToLower());
+ if (!wordlist.Contains(w.ToLower()))
+ {
+ wordlist.Add(w.ToLower());
+ }
}
}
- foreach(var w in contributorsWordlist)
+ if (isShiftOS)
{
- if (!wordlist.Contains(w.ToLower()))
+ foreach (var w in shiftWordlist)
{
- wordlist.Add(w.ToLower());
+ if (!wordlist.Contains(w.ToLower()))
+ {
+ wordlist.Add(w.ToLower());
+ }
}
}
- //This can diversify the amount of ShiftOS-related words in the game.
- foreach(var upg in Shiftorium.GetDefaults())
+ else if (isContributors)
{
- foreach(var w in upg.Name.Split(' '))
+ foreach (var w in contributorsWordlist)
{
if (!wordlist.Contains(w.ToLower()))
+ {
wordlist.Add(w.ToLower());
+ }
+ }
+ }
+ if (isShiftOS)
+ {
+ //This can diversify the amount of ShiftOS-related words in the game.
+ foreach (var upg in Shiftorium.GetDefaults())
+ {
+ foreach (var w in upg.Name.Split(' '))
+ {
+ if (!wordlist.Contains(w.ToLower()))
+ wordlist.Add(w.ToLower());
+ }
}
}
word = wordlist[rng.Next(wordlist.Count)];
@@ -132,7 +175,9 @@ namespace ShiftOS.WinForms.Applications
tbguess.Visible = false;
comboBox1.Items.Add("ShiftOS");
if (ShiftoriumFrontend.UpgradeInstalled("sl_contributors_wordlist")) comboBox1.Items.Add("Contributors");
+ if (Shiftorium.UpgradeInstalled("sl_operating_systems_wordlist")) comboBox1.Items.Add("Operating Systems");
btnrestart.Visible = true;
+ lblword.Left = (this.Width - lblword.Width) / 2;
}
public void OnUpgrade()
@@ -147,7 +192,7 @@ namespace ShiftOS.WinForms.Applications
public void OnSkinLoad()
{
-
+ lblword.Left = (this.Width - lblword.Width) / 2;
}
string lastword = "";
@@ -170,15 +215,9 @@ namespace ShiftOS.WinForms.Applications
if (!lblword.Text.Contains("_"))
{
int oldlives = lives;
- tbguess.Visible = false;
- lives = 0;
- lbllives.Visible = true;
- btnrestart.Visible = true;
- btnrestart.Text = "Restart";
- comboBox1.Visible = true;
int cp = word.Length * oldlives;
- lbllives.Text = "You earned: " + cp + " codepoints!";
SaveSystem.TransferCodepointsFrom("shiftletters", cp);
+ StartGame();
}
}
}
@@ -186,7 +225,12 @@ namespace ShiftOS.WinForms.Applications
{
guessedCharacters = guessedCharacters + charGuessed;
lives--;
- lbllives.Text = "You have: " + lives + " lives left!";
+ if (lives == 1)
+ {
+ lbllives.Text = "You have 1 life left! Be careful...";
+ } else {
+ lbllives.Text = "You have " + lives + " lives left!";
+ }
if (lives == 0)
{
tbguess.Visible = false;
@@ -211,5 +255,10 @@ namespace ShiftOS.WinForms.Applications
}
}
+
+ private void lblword_TextChanged(object sender, EventArgs e)
+ {
+ lblword.Left = (this.Width - lblword.Width) / 2;
+ }
}
}
diff --git a/ShiftOS.WinForms/Applications/Terminal.cs b/ShiftOS.WinForms/Applications/Terminal.cs
index ff3569b..7bab213 100644
--- a/ShiftOS.WinForms/Applications/Terminal.cs
+++ b/ShiftOS.WinForms/Applications/Terminal.cs
@@ -187,7 +187,6 @@ namespace ShiftOS.WinForms.Applications
public static event TextSentEventHandler TextSent;
- public event EventHandler OnComplete;
public void ResetAllKeywords()
{
diff --git a/ShiftOS.WinForms/Oobe.cs b/ShiftOS.WinForms/Oobe.cs
index aa37792..7370396 100644
--- a/ShiftOS.WinForms/Oobe.cs
+++ b/ShiftOS.WinForms/Oobe.cs
@@ -54,15 +54,10 @@ namespace ShiftOS.WinForms
string rtext;
string gtexttotype;
int charcount;
- int currentletter;
int slashcount;
- int conversationcount = 0;
Label textgeninput;
- bool needtoclose = false;
public bool upgraded = false;
- int hackeffect;
- int percentcount;
-
+
private bool typing = false;
public void TextType(string texttotype)
@@ -74,7 +69,6 @@ namespace ShiftOS.WinForms
charcount = texttotype.Length;
gtexttotype = texttotype;
- currentletter = 0;
slashcount = 1;
foreach (var c in gtexttotype)
{
diff --git a/ShiftOS.WinForms/Resources/Shiftorium.txt b/ShiftOS.WinForms/Resources/Shiftorium.txt
index 1945707..04cf6ac 100644
--- a/ShiftOS.WinForms/Resources/Shiftorium.txt
+++ b/ShiftOS.WinForms/Resources/Shiftorium.txt
@@ -7,6 +7,12 @@
Description: "Crazy math problems getting you down? Well, this calculator will take care of that!"
},
{
+ Name: "SL Operating Systems Wordlist",
+ Cost: 500,
+ Dependencies: "shiftletters",
+ Description: "Know a lot about computer operating systems? This upgrade adds a wordlist to ShiftLetters, full of various Linux distros, Windows codenames and other OS names. All for the low price of 500 Codepoints! It's an incredible value but it's true! Upgrade today... except out of ShiftOS!"
+ },
+ {
Name: "AL Calculator",
Cost: 350,
Dependencies: "calculator;app_launcher",
diff --git a/ShiftOS.WinForms/Tools/ControlManager.cs b/ShiftOS.WinForms/Tools/ControlManager.cs
index 32f0217..5cc4813 100644
--- a/ShiftOS.WinForms/Tools/ControlManager.cs
+++ b/ShiftOS.WinForms/Tools/ControlManager.cs
@@ -194,10 +194,7 @@ namespace ShiftOS.WinForms.Tools
}
}
- Image dithered = null;
-
-
- ctrl.ForeColor = SkinEngine.LoadedSkin.ControlTextColor;
+ ctrl.ForeColor = SkinEngine.LoadedSkin.ControlTextColor;
ctrl.Font = SkinEngine.LoadedSkin.MainFont;
diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs
index 45730c4..81079e4 100644
--- a/ShiftOS.WinForms/WinformsDesktop.cs
+++ b/ShiftOS.WinForms/WinformsDesktop.cs
@@ -49,11 +49,6 @@ namespace ShiftOS.WinForms
public partial class WinformsDesktop : Form, IDesktop
{
/// <summary>
- /// Occurs when window added.
- /// </summary>
- private static event Action<WindowBorder> windowAdded;
-
- /// <summary>
/// Initializes a new instance of the <see cref="ShiftOS.WinForms.WinformsDesktop"/> class.
/// </summary>
public WinformsDesktop()