Revert "Improves filter text field in asset browser."
This reverts commit 4fcf73921f.
This commit is contained in:
@@ -108,29 +108,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
panel.Get<ColorBlockWidget>("COLORBLOCK").GetColor = () => Game.Settings.Player.Color.RGB;
|
panel.Get<ColorBlockWidget>("COLORBLOCK").GetColor = () => Game.Settings.Player.Color.RGB;
|
||||||
}
|
}
|
||||||
|
|
||||||
Action closeAssetBrowser = () =>
|
|
||||||
{
|
|
||||||
if (isVideoLoaded)
|
|
||||||
player.Stop();
|
|
||||||
Ui.CloseWindow();
|
|
||||||
onExit();
|
|
||||||
};
|
|
||||||
|
|
||||||
filenameInput = panel.Get<TextFieldWidget>("FILENAME_INPUT");
|
filenameInput = panel.Get<TextFieldWidget>("FILENAME_INPUT");
|
||||||
filenameInput.TakeKeyboardFocus();
|
|
||||||
filenameInput.OnTextEdited = () => ApplyFilter(filenameInput.Text);
|
filenameInput.OnTextEdited = () => ApplyFilter(filenameInput.Text);
|
||||||
filenameInput.OnEscKey = () =>
|
filenameInput.OnEscKey = filenameInput.YieldKeyboardFocus;
|
||||||
{
|
|
||||||
if (filenameInput.Text.Length == 0)
|
|
||||||
closeAssetBrowser();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
filenameInput.Text = "";
|
|
||||||
filenameInput.OnTextEdited();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
var frameContainer = panel.GetOrNull("FRAME_SELECTOR");
|
var frameContainer = panel.GetOrNull("FRAME_SELECTOR");
|
||||||
if (frameContainer != null)
|
if (frameContainer != null)
|
||||||
@@ -238,7 +218,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
|
|
||||||
var closeButton = panel.GetOrNull<ButtonWidget>("CLOSE_BUTTON");
|
var closeButton = panel.GetOrNull<ButtonWidget>("CLOSE_BUTTON");
|
||||||
if (closeButton != null)
|
if (closeButton != null)
|
||||||
closeButton.OnClick = closeAssetBrowser;
|
closeButton.OnClick = () =>
|
||||||
|
{
|
||||||
|
if (isVideoLoaded)
|
||||||
|
player.Stop();
|
||||||
|
Ui.CloseWindow();
|
||||||
|
onExit();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectNextFrame()
|
void SelectNextFrame()
|
||||||
|
|||||||
Reference in New Issue
Block a user