Browse Source

style: fix the font of progress

fix the font of progress
tags/0.1.0
Shawqeem 3 years ago
parent
commit
2f0cc6c83d
2 changed files with 30 additions and 11 deletions
  1. +22
    -11
      logic/Client/MainWindow.xaml.cs
  2. +8
    -0
      logic/cmd/gameServer.cmd

+ 22
- 11
logic/Client/MainWindow.xaml.cs View File

@@ -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,


+ 8
- 0
logic/cmd/gameServer.cmd View File

@@ -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

Loading…
Cancel
Save