示例#1
0
 public BeaconOrderButtonLogic(Widget widget, World world)
 {
     if (widget is ButtonWidget beacon)
     {
         OrderButtonsChromeUtils.BindOrderButton <BeaconOrderGenerator>(world, beacon, "beacon");
     }
 }
示例#2
0
 public PowerdownOrderButtonLogic(Widget widget, World world)
 {
     if (widget is ButtonWidget power)
     {
         OrderButtonsChromeUtils.BindOrderButton <PowerDownOrderGenerator>(world, power, "power");
     }
 }
示例#3
0
 public SellOrderButtonLogic(Widget widget, World world)
 {
     if (widget is ButtonWidget sell)
     {
         OrderButtonsChromeUtils.BindOrderButton <SellOrderGenerator>(world, sell, "sell");
     }
 }
示例#4
0
 public RepairOrderButtonLogic(Widget widget, World world)
 {
     if (widget is ButtonWidget repair)
     {
         OrderButtonsChromeUtils.BindOrderButton <RepairOrderGenerator>(world, repair, "repair");
     }
 }
        public BeaconOrderButtonLogic(Widget widget, World world)
        {
            var beacon = widget as ButtonWidget;

            if (beacon != null)
            {
                OrderButtonsChromeUtils.BindOrderButton <BeaconOrderGenerator>(world, beacon, "beacon");
            }
        }
        public PowerdownOrderButtonLogic(Widget widget, World world)
        {
            var power = widget as ButtonWidget;

            if (power != null)
            {
                OrderButtonsChromeUtils.BindOrderButton <PowerDownOrderGenerator>(world, power, "power");
            }
        }
        public RepairOrderButtonLogic(Widget widget, World world)
        {
            var repair = widget as ButtonWidget;

            if (repair != null)
            {
                OrderButtonsChromeUtils.BindOrderButton <RepairOrderGenerator>(world, repair, "repair");
            }
        }
        public SellOrderButtonLogic(Widget widget, World world)
        {
            var sell = widget as ButtonWidget;

            if (sell != null)
            {
                OrderButtonsChromeUtils.BindOrderButton <SellOrderGenerator>(world, sell, "sell");
            }
        }
        public BeaconOrderButtonLogic(Widget widget, World world)
        {
            var beacon = widget as ButtonWidget;

            if (beacon != null)
            {
                beacon.GetKey = _ => Game.Settings.Keys.PlaceBeaconKey;
                OrderButtonsChromeUtils.BindOrderButton <BeaconOrderGenerator>(world, beacon, "beacon");
            }
        }
示例#10
0
        public PowerdownOrderButtonLogic(Widget widget, World world)
        {
            var power = widget as ButtonWidget;

            if (power != null)
            {
                power.GetKey = _ => Game.Settings.Keys.PowerDownKey;
                OrderButtonsChromeUtils.BindOrderButton <PowerDownOrderGenerator>(world, power, "power");
            }
        }
示例#11
0
        public RepairOrderButtonLogic(Widget widget, World world)
        {
            var repair = widget as ButtonWidget;

            if (repair != null)
            {
                repair.GetKey = _ => Game.Settings.Keys.RepairKey;
                OrderButtonsChromeUtils.BindOrderButton <RepairOrderGenerator>(world, repair, "repair");
            }
        }
示例#12
0
        public SellOrderButtonLogic(Widget widget, World world)
        {
            var sell = widget as ButtonWidget;

            if (sell != null)
            {
                sell.GetKey = _ => Game.Settings.Keys.SellKey;
                OrderButtonsChromeUtils.BindOrderButton <SellOrderGenerator>(world, sell, "sell");
            }
        }
示例#13
0
        public PowerdownOrderButtonLogic(Widget widget, World world)
        {
            var power          = widget as ButtonWidget;
            var isAdvancedMode = world.LobbyInfo.GlobalSettings.OptionOrDefault("globalorder", false);

            if (power != null)
            {
                if (isAdvancedMode)
                {
                    OrderButtonsChromeUtils.BindOrderButton <AdvancedPowerDownOrderGenerator>(world, power, "power");
                }
                else
                {
                    OrderButtonsChromeUtils.BindOrderButton <PowerDownOrderGenerator>(world, power, "power");
                }
            }
        }
示例#14
0
        public RepairOrderButtonLogic(Widget widget, World world)
        {
            var repair         = widget as ButtonWidget;
            var isAdvancedMode = world.LobbyInfo.GlobalSettings.OptionOrDefault("globalorder", false);

            if (repair != null)
            {
                if (isAdvancedMode)
                {
                    OrderButtonsChromeUtils.BindOrderButton <AdvancedRepairOrderGenerator>(world, repair, "repair");
                }
                else
                {
                    OrderButtonsChromeUtils.BindOrderButton <RepairOrderGenerator>(world, repair, "repair");
                }
            }
        }