From 2f0cc6c83dd8852ffcdcda900932857b88e31d13 Mon Sep 17 00:00:00 2001 From: Shawqeem <1004837646@qq.com> Date: Wed, 29 Mar 2023 00:25:53 +0800 Subject: [PATCH] style: :sparkles: fix the font of progress fix the font of progress --- logic/Client/MainWindow.xaml.cs | 33 ++++++++++++++++++++++----------- logic/cmd/gameServer.cmd | 8 ++++++++ 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/logic/Client/MainWindow.xaml.cs b/logic/Client/MainWindow.xaml.cs index d9fa7fc..e05a9ea 100644 --- a/logic/Client/MainWindow.xaml.cs +++ b/logic/Client/MainWindow.xaml.cs @@ -824,12 +824,13 @@ namespace Client } foreach (var data in listOfClassroom) { + int deg = (int)(100.0 * data.Progress / Preparation.Utility.GameData.degreeOfFixedGenerator); TextBox icon = new() { - FontSize = 8 * UpperLayerOfMap.ActualHeight / 650, + FontSize = 9 * UpperLayerOfMap.ActualHeight / 650, Width = unitWidth, Height = unitHeight, - Text = Convert.ToString((int)(100.0 * data.Progress / Preparation.Utility.GameData.degreeOfFixedGenerator)), + Text = Convert.ToString(deg), HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth / 2, data.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0), @@ -837,16 +838,21 @@ namespace Client BorderBrush = Brushes.Transparent, IsReadOnly = true }; - UpperLayerOfMap.Children.Add(icon); + if (deg == 100) + { + icon.Text = "🅰"; + } + UpperLayerOfMap.Children.Add(icon); } foreach (var data in listOfChest) { + int deg = (int)(100.0 * data.Progress / Preparation.Utility.GameData.degreeOfOpenedChest); TextBox icon = new() { - FontSize = 8 * UpperLayerOfMap.ActualHeight / 650, + FontSize = 9 * UpperLayerOfMap.ActualHeight / 650, Width = unitWidth, Height = unitHeight, - Text = Convert.ToString((int)(100.0 * data.Progress / Preparation.Utility.GameData.degreeOfOpenedChest)), + Text = Convert.ToString(deg), HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth / 2, data.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0), @@ -854,18 +860,18 @@ namespace Client BorderBrush = Brushes.Transparent, IsReadOnly = true }; + if(deg==100) + { + icon.Text = "😄"; + } UpperLayerOfMap.Children.Add(icon); } foreach (var data in listOfGate) { int deg = (int)(100.0 * data.Progress / Preparation.Utility.GameData.degreeOfOpenedDoorway); - if (deg == 100) - { - gateOpened = true; - } TextBox icon = new() { - FontSize = 8 * UpperLayerOfMap.ActualHeight / 650, + FontSize = 9 * UpperLayerOfMap.ActualHeight / 650, Width = unitWidth, Height = unitHeight, Text = Convert.ToString(deg), @@ -876,13 +882,18 @@ namespace Client BorderBrush = Brushes.Transparent, IsReadOnly = true }; + if (deg == 100) + { + gateOpened = true; + icon.Text = "😄"; + } UpperLayerOfMap.Children.Add(icon); } foreach (var data in listOfDoor) { TextBox icon = new() { - FontSize = 8 * UpperLayerOfMap.ActualHeight / 650, + FontSize = 9 * UpperLayerOfMap.ActualHeight / 650, Width = unitWidth, Height = unitHeight, HorizontalAlignment = HorizontalAlignment.Left, diff --git a/logic/cmd/gameServer.cmd b/logic/cmd/gameServer.cmd index 7a43074..23c8bb1 100644 --- a/logic/cmd/gameServer.cmd +++ b/logic/cmd/gameServer.cmd @@ -7,3 +7,11 @@ ping -n 2 127.0.0.1 > NUL start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 4 --type 2 --occupation 1 ping -n 2 127.0.0.1 > NUL + +start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 0 --type 1 --occupation 1 + +ping -n 2 127.0.0.1 > NUL + +start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 1 --type 1 --occupation 1 + +ping -n 2 127.0.0.1 > NUL \ No newline at end of file