diff options
| author | MichaelTheShifter <[email protected]> | 2016-07-19 21:53:26 -0400 |
|---|---|---|
| committer | MichaelTheShifter <[email protected]> | 2016-07-19 21:53:26 -0400 |
| commit | 6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9 (patch) | |
| tree | d7bc4b46c45a552add946666151d44490f3b3caf /source/WindowsFormsApplication1/Gameplay/HackUI.cs | |
| parent | 9322701aa1eae9596a8586ef19a0fe1d1b3ab66b (diff) | |
| download | shiftos-c--6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.tar.gz shiftos-c--6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.tar.bz2 shiftos-c--6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.zip | |
Full ShiftUI conversion
The only bugs are that windows don't show in the center of the screen,
and Gecko webbrowsers are not serializing properly to be converted to
ShiftUI widgets (you can use the ToWidget() extension method to convert
a WinForms control to a ShiftUI widget)
Also multiple desktop panels are removed due to some odd bug I can't
diagnose. Will add them back in the future. Promise. I loved creating
GNOME2 skins.
Diffstat (limited to 'source/WindowsFormsApplication1/Gameplay/HackUI.cs')
| -rw-r--r-- | source/WindowsFormsApplication1/Gameplay/HackUI.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/WindowsFormsApplication1/Gameplay/HackUI.cs b/source/WindowsFormsApplication1/Gameplay/HackUI.cs index a1c1555..9767c7c 100644 --- a/source/WindowsFormsApplication1/Gameplay/HackUI.cs +++ b/source/WindowsFormsApplication1/Gameplay/HackUI.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Windows.Forms; +using ShiftUI; namespace ShiftOS { @@ -288,7 +288,7 @@ namespace ShiftOS newModule.Transmitter = transmitter; transmitter?.send_message(Online.Hacking.NetTransmitter.Messages.PlaceModule, new Online.Hacking.Module { Grade = newModule.Grade, Hostname = newModule.Hostname, HP = newModule.HP, Type = (int)newModule.Type, X = newModule.Left, Y = newModule.Top }); } - pnlyou.Controls.Add(newModule); + pnlyou.Widgets.Add(newModule); int hp = newModule.HP; WriteLine($"[Network] Welcome to the network, {newModule.Hostname}!"); TotalPlayerHP += newModule.HP; @@ -939,7 +939,7 @@ namespace ShiftOS private void btnpoweroff_Click(object sender, EventArgs e) { //Remove the computer from the game. - pnlyou.Controls.Remove(SelectedPlayerComputer); + pnlyou.Widgets.Remove(SelectedPlayerComputer); AllPlayerComputers.Remove(SelectedPlayerComputer); btnpoweroff.Hide(); } @@ -1219,7 +1219,7 @@ namespace ShiftOS newModule.Top = (pnlenemy.Height - newModule.Height) / 2; } var rnd = new Random(); - pnlenemy.Controls.Add(newModule); + pnlenemy.Widgets.Add(newModule); foreach (var pc in AllEnemyComputers) { while (newModule.Bounds.IntersectsWith(pc.Bounds)) @@ -1827,7 +1827,7 @@ namespace ShiftOS } } - private void pongMain_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) + private void pongMain_MouseMove(object sender, ShiftUI.MouseEventArgs e) { paddleHuman.Location = new Point(paddleHuman.Location.X, (MousePosition.Y - pgpong.Location.Y) - (paddleHuman.Height / 2)); } @@ -1938,7 +1938,7 @@ namespace ShiftOS if(module_to_steal.Parent != pnlyou) { - module_to_steal.Parent.Controls.Remove(module_to_steal); + module_to_steal.Parent.Widgets.Remove(module_to_steal); module_to_steal.Dispose(); } tmrcountdown.Stop(); @@ -1981,7 +1981,7 @@ namespace ShiftOS if (module_to_steal.Parent != pnlenemy) { - module_to_steal.Parent.Controls.Remove(module_to_steal); + module_to_steal.Parent.Widgets.Remove(module_to_steal); module_to_steal.Dispose(); } tmrcountdown.Stop(); |
