Normalize ButtonWidgets

This commit is contained in:
Paul Chote
2011-05-16 21:57:41 +12:00
parent 3eb3ae76f0
commit eb8aafced0
33 changed files with 224 additions and 198 deletions

View File

@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Cnc.Widgets
}
var panel = widget.GetWidget("CONNECTING_PANEL");
panel.GetWidget<CncMenuButtonWidget>("ABORT_BUTTON").OnClick = () => { Widget.CloseWindow(); onAbort(); };
panel.GetWidget<ButtonWidget>("ABORT_BUTTON").OnClick = () => { Widget.CloseWindow(); onAbort(); };
widget.GetWidget<LabelWidget>("CONNECTING_DESC").GetText = () =>
"Connecting to {0}:{1}...".F(host, port);
@@ -106,8 +106,8 @@ namespace OpenRA.Mods.Cnc.Widgets
[ObjectCreator.Param] Action onAbort)
{
var panel = widget.GetWidget("CONNECTIONFAILED_PANEL");
panel.GetWidget<CncMenuButtonWidget>("ABORT_BUTTON").OnClick = () => { Widget.CloseWindow(); onAbort(); };
panel.GetWidget<CncMenuButtonWidget>("RETRY_BUTTON").OnClick = () => { Widget.CloseWindow(); onRetry(); };
panel.GetWidget<ButtonWidget>("ABORT_BUTTON").OnClick = () => { Widget.CloseWindow(); onAbort(); };
panel.GetWidget<ButtonWidget>("RETRY_BUTTON").OnClick = () => { Widget.CloseWindow(); onRetry(); };
widget.GetWidget<LabelWidget>("CONNECTING_DESC").GetText = () =>
"Could not connect to {0}:{1}".F(host, port);