Updating Mudblazor Version
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
@inject IEconomyService EconomyService
|
||||
@inject ITimingService TimingService
|
||||
@inject IToastService ToastService
|
||||
@inject IDataCollectionService DataCollectionService
|
||||
@inject IDataCollectionService DataCollectionService
|
||||
|
||||
|
||||
<InputPanelComponent>
|
||||
@@ -22,7 +22,8 @@
|
||||
|
||||
|
||||
var color = (hotkey.KeyText.Equals("SPACE") && KeyService.IsHoldingSpace()) || KeyService.GetAllPressedKeys().Contains(hotkey.KeyText)
|
||||
? "#0a0f12" : hotkey.GetColor();
|
||||
? "#0a0f12"
|
||||
: hotkey.GetColor();
|
||||
|
||||
var x = hotkey.PositionX * Size;
|
||||
var y = hotkey.PositionY * Size + (hotkey.PositionY == 0 ? 5 : -50);
|
||||
@@ -37,6 +38,7 @@
|
||||
{
|
||||
border = "5px solid black";
|
||||
}
|
||||
|
||||
if (hotkey.KeyText.Equals(controlGroup))
|
||||
{
|
||||
color = "#257525";
|
||||
@@ -49,9 +51,9 @@
|
||||
|
||||
var keyText = hotkey.KeyText.Equals("CAPSLOCK") ? "Caps"
|
||||
: hotkey.KeyText.Equals("CONTROL") ? "Ctrl"
|
||||
: hotkey.KeyText.Equals("SHIFT") ? "Shift"
|
||||
: hotkey.KeyText.Equals("TAB") ? "Tab"
|
||||
: hotkey.KeyText.Equals("SPACE") ? "Space" : hotkey.KeyText;
|
||||
: hotkey.KeyText.Equals("SHIFT") ? "Shift"
|
||||
: hotkey.KeyText.Equals("TAB") ? "Tab"
|
||||
: hotkey.KeyText.Equals("SPACE") ? "Space" : hotkey.KeyText;
|
||||
|
||||
|
||||
var controlStyle = $"background-color:{color}; " +
|
||||
@@ -74,11 +76,11 @@
|
||||
var usedStyle = hotkey.PositionY == 0 ? controlStyle : keyStyle;
|
||||
|
||||
<div style="position:relative;
|
||||
cursor:pointer;
|
||||
top:@y.ToString()px;
|
||||
left:@x.ToString()px;
|
||||
width: 0px;
|
||||
height: 0px;">
|
||||
cursor:pointer;
|
||||
top:@y.ToString()px;
|
||||
left:@x.ToString()px;
|
||||
width: 0px;
|
||||
height: 0px;">
|
||||
|
||||
<div @onclick="e => ButtonClicked(e, hotkey)" style="@usedStyle">
|
||||
@keyText
|
||||
@@ -138,8 +140,7 @@
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public int Size { get; set; } = 100;
|
||||
[Parameter] public int Size { get; set; } = 100;
|
||||
|
||||
readonly Dictionary<string, EntityModel> data = EntityModel.GetDictionary();
|
||||
readonly List<HotkeyModel> hotkeys = HotkeyModel.GetAll();
|
||||
@@ -163,7 +164,7 @@
|
||||
BuildOrderService.Unsubscribe(OnBuilderOrderChanged);
|
||||
}
|
||||
|
||||
int completedTimeCount = 0;
|
||||
int completedTimeCount;
|
||||
|
||||
void OnBuilderOrderChanged()
|
||||
{
|
||||
@@ -237,6 +238,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -256,6 +258,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -265,6 +268,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -274,6 +278,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -286,26 +291,32 @@
|
||||
{
|
||||
controlGroup = "Z";
|
||||
}
|
||||
|
||||
if (KeyService.GetAllPressedKeys().Contains("TAB"))
|
||||
{
|
||||
controlGroup = "TAB";
|
||||
}
|
||||
|
||||
if (KeyService.GetAllPressedKeys().Contains("C"))
|
||||
{
|
||||
controlGroup = "C";
|
||||
}
|
||||
|
||||
if (KeyService.GetAllPressedKeys().Contains("D"))
|
||||
{
|
||||
controlGroup = "D";
|
||||
}
|
||||
|
||||
if (KeyService.GetAllPressedKeys().Contains("V"))
|
||||
{
|
||||
controlGroup = "V";
|
||||
}
|
||||
|
||||
if (KeyService.GetAllPressedKeys().Contains("ALT"))
|
||||
{
|
||||
controlGroup = "ALT";
|
||||
}
|
||||
|
||||
if (KeyService.GetAllPressedKeys().Contains("SHIFT"))
|
||||
{
|
||||
controlGroup = "SHIFT";
|
||||
@@ -367,7 +378,7 @@
|
||||
DataCollectionService.SendEvent(
|
||||
DataCollectionKeys.BuildCalcInput,
|
||||
new Dictionary<string, string> { { "key", hotkey.KeyText.ToLower() }, { "input-source", "mouse" } }
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
if (hotkey.KeyText.Equals(HotKeyType.SPACE.ToString()))
|
||||
|
||||
Reference in New Issue
Block a user