Fixed: #281 for regular (read: right-click) commands (Modified by pchote)
This commit is contained in:
@@ -18,6 +18,8 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
{
|
||||
public class RadarBinWidget : Widget
|
||||
{
|
||||
public string WorldInteractionController = null;
|
||||
|
||||
static float2 radarOpenOrigin = new float2(Game.viewport.Width - 215, 29);
|
||||
static float2 radarClosedOrigin = new float2(Game.viewport.Width - 215, -166);
|
||||
public static float2 radarOrigin = radarClosedOrigin;
|
||||
@@ -105,10 +107,13 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
Location = (loc * Game.CellSize - Game.viewport.Location).ToInt2()
|
||||
};
|
||||
|
||||
Widget.HandleInput(fakemi);
|
||||
|
||||
fakemi.Event = MouseInputEvent.Up;
|
||||
Widget.HandleInput(fakemi);
|
||||
if (WorldInteractionController != null)
|
||||
{
|
||||
var controller = Widget.RootWidget.GetWidget<WorldInteractionControllerWidget>(WorldInteractionController);
|
||||
controller.HandleInputInner(fakemi);
|
||||
fakemi.Event = MouseInputEvent.Up;
|
||||
controller.HandleInputInner(fakemi);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -3,6 +3,7 @@ Container@INGAME_ROOT:
|
||||
Delegate:IngameChromeDelegate
|
||||
Children:
|
||||
WorldInteractionController:
|
||||
Id:INTERACTION_CONTROLLER
|
||||
X:0
|
||||
Y:0
|
||||
Width:WINDOW_RIGHT
|
||||
@@ -12,10 +13,10 @@ Container@INGAME_ROOT:
|
||||
Y:0
|
||||
Width:WINDOW_RIGHT
|
||||
Height:WINDOW_BOTTOM
|
||||
WorldCommand:
|
||||
X:0
|
||||
Y:0
|
||||
Width:WINDOW_RIGHT
|
||||
WorldCommand:
|
||||
X:0
|
||||
Y:0
|
||||
Width:WINDOW_RIGHT
|
||||
Height:WINDOW_BOTTOM
|
||||
Timer@GAME_TIMER:
|
||||
Id:GAME_TIMER
|
||||
@@ -82,6 +83,7 @@ Container@INGAME_ROOT:
|
||||
Bold:True
|
||||
RadarBin@INGAME_RADAR_BIN:
|
||||
Id:INGAME_RADAR_BIN
|
||||
WorldInteractionController:INTERACTION_CONTROLLER
|
||||
PowerBin@INGAME_POWER_BIN:
|
||||
Id:INGAME_POWER_BIN
|
||||
MoneyBin@INGAME_MONEY_BIN:
|
||||
@@ -278,12 +280,12 @@ Container@INGAME_ROOT:
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Build Everything
|
||||
Checkbox@UNLIMITED_POWER
|
||||
Id:UNLIMITED_POWER
|
||||
X:30
|
||||
Y:260
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Checkbox@UNLIMITED_POWER
|
||||
Id:UNLIMITED_POWER
|
||||
X:30
|
||||
Y:260
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Unlimited Power
|
||||
Button@GIVE_EXPLORATION
|
||||
Id:GIVE_EXPLORATION
|
||||
|
||||
@@ -4,6 +4,7 @@ Container@INGAME_ROOT:
|
||||
Visible:true
|
||||
Children:
|
||||
WorldInteractionController:
|
||||
Id:INTERACTION_CONTROLLER
|
||||
X:0
|
||||
Y:0
|
||||
Width:WINDOW_RIGHT
|
||||
@@ -80,6 +81,7 @@ Container@INGAME_ROOT:
|
||||
Bold:True
|
||||
RadarBin@INGAME_RADAR_BIN:
|
||||
Id:INGAME_RADAR_BIN
|
||||
WorldInteractionController:INTERACTION_CONTROLLER
|
||||
PowerBin@INGAME_POWER_BIN:
|
||||
Id:INGAME_POWER_BIN
|
||||
MoneyBin@INGAME_MONEY_BIN:
|
||||
|
||||
Reference in New Issue
Block a user