fix(Search) Fixed search auto focus, plus some WIP code
This commit is contained in:
@@ -14,21 +14,41 @@
|
||||
<FormInfoComponent>Add a input delay to constructing buildings for simulating worker movement and player micro.</FormInfoComponent>
|
||||
</FormNumberComponent>
|
||||
|
||||
<FormNumberComponent Max="600"
|
||||
Min="0"
|
||||
Value="@WaitTime"
|
||||
OnChange="@OnWaitTimeChanged">
|
||||
<FormLabelComponent>Wait Time</FormLabelComponent>
|
||||
<FormInfoComponent>Not implemented</FormInfoComponent>
|
||||
</FormNumberComponent>
|
||||
|
||||
|
||||
<ButtonComponent OnClick="OnWaitClicked">Add Wait</ButtonComponent>
|
||||
<div class="optionRow">
|
||||
<FormLayoutComponent>
|
||||
<FormNumberComponent Max="600"
|
||||
Min="0"
|
||||
Value="@WaitTime"
|
||||
OnChange="@OnWaitTimeChanged">
|
||||
<FormLabelComponent>Wait Time</FormLabelComponent>
|
||||
</FormNumberComponent>
|
||||
<ButtonComponent OnClick="OnWaitClicked">Add Wait</ButtonComponent>
|
||||
</FormLayoutComponent>
|
||||
<FormLayoutComponent>
|
||||
<FormNumberComponent Max="600"
|
||||
Min="0"
|
||||
Value="@WaitTime"
|
||||
OnChange="@OnWaitTimeChanged">
|
||||
<FormLabelComponent>Wait To</FormLabelComponent>
|
||||
</FormNumberComponent>
|
||||
<ButtonComponent OnClick="OnWaitClicked">Add Wait</ButtonComponent>
|
||||
</FormLayoutComponent>
|
||||
|
||||
</div>
|
||||
</FormLayoutComponent>
|
||||
|
||||
@code {
|
||||
<style>
|
||||
.optionRow {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@code {
|
||||
public int WaitTime { get; set; } = 30;
|
||||
public int WaitTo { get; set; } = 30;
|
||||
|
||||
|
||||
void OnBuildingInputDelayChanged(ChangeEventArgs changeEventArgs)
|
||||
{
|
||||
buildOrderService.BuildingInputDelay = int.Parse(changeEventArgs.Value!.ToString()!);
|
||||
@@ -46,6 +66,14 @@
|
||||
economyService.Calculate(buildOrderService, timingService, buildOrderService.GetLastRequestInterval());
|
||||
}
|
||||
}
|
||||
|
||||
public void OnWaitToClicked()
|
||||
{
|
||||
if (buildOrderService.AddWait(WaitTime))
|
||||
{
|
||||
economyService.Calculate(buildOrderService, timingService, buildOrderService.GetLastRequestInterval());
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool ShouldRender()
|
||||
{
|
||||
@@ -63,6 +91,5 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
public int WaitTime { get; set; } = 30;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user