work on #993 -- removed OnMouseUp from IngameChromeLogic.cs

This commit is contained in:
Chris Forbes
2011-07-08 20:58:09 +12:00
committed by Paul Chote
parent dfd73ce209
commit bd018484e1

View File

@@ -28,10 +28,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
gameRoot = r.GetWidget("INGAME_ROOT"); gameRoot = r.GetWidget("INGAME_ROOT");
var optionsBG = gameRoot.GetWidget("INGAME_OPTIONS_BG"); var optionsBG = gameRoot.GetWidget("INGAME_OPTIONS_BG");
r.GetWidget<ButtonWidget>("INGAME_OPTIONS_BUTTON").OnMouseUp = mi => r.GetWidget<ButtonWidget>("INGAME_OPTIONS_BUTTON").OnClick = () =>
optionsBG.Visible = !optionsBG.Visible; optionsBG.Visible = !optionsBG.Visible;
optionsBG.GetWidget<ButtonWidget>("DISCONNECT").OnMouseUp = mi => optionsBG.GetWidget<ButtonWidget>("DISCONNECT").OnClick = () =>
{ {
optionsBG.Visible = false; optionsBG.Visible = false;
Game.Disconnect(); Game.Disconnect();
@@ -40,14 +40,14 @@ namespace OpenRA.Mods.RA.Widgets.Logic
Widget.OpenWindow("MAINMENU_BG"); Widget.OpenWindow("MAINMENU_BG");
}; };
optionsBG.GetWidget<ButtonWidget>("SETTINGS").OnMouseUp = mi => Widget.OpenWindow("SETTINGS_MENU"); optionsBG.GetWidget<ButtonWidget>("SETTINGS").OnClick = () => Widget.OpenWindow("SETTINGS_MENU");
optionsBG.GetWidget<ButtonWidget>("MUSIC").OnMouseUp = mi => Widget.OpenWindow("MUSIC_MENU"); optionsBG.GetWidget<ButtonWidget>("MUSIC").OnClick = () => Widget.OpenWindow("MUSIC_MENU");
optionsBG.GetWidget<ButtonWidget>("RESUME").OnMouseUp = mi => optionsBG.Visible = false; optionsBG.GetWidget<ButtonWidget>("RESUME").OnClick = () => optionsBG.Visible = false;
optionsBG.GetWidget<ButtonWidget>("SURRENDER").OnMouseUp = mi => optionsBG.GetWidget<ButtonWidget>("SURRENDER").OnClick = () =>
world.IssueOrder(new Order("Surrender", world.LocalPlayer.PlayerActor, false)); world.IssueOrder(new Order("Surrender", world.LocalPlayer.PlayerActor, false));
optionsBG.GetWidget("SURRENDER").IsVisible = () => (world.LocalPlayer != null && world.LocalPlayer.WinState == WinState.Undefined); optionsBG.GetWidget("SURRENDER").IsVisible = () => (world.LocalPlayer != null && world.LocalPlayer.WinState == WinState.Undefined);
optionsBG.GetWidget<ButtonWidget>("QUIT").OnMouseUp = mi => Game.Exit(); optionsBG.GetWidget<ButtonWidget>("QUIT").OnClick = () => Game.Exit();
var postgameBG = gameRoot.GetWidget("POSTGAME_BG"); var postgameBG = gameRoot.GetWidget("POSTGAME_BG");
var postgameText = postgameBG.GetWidget<LabelWidget>("TEXT"); var postgameText = postgameBG.GetWidget<LabelWidget>("TEXT");