public AddonConfirmationGump(MovableAddonKey key, Mobile owner) : base(100, 100) { _Owner = owner; _Key = key; if (_Owner == null || _Key == null) { return; } _Owner.CloseGump(typeof(AddonConfirmationGump)); AddPage(0); AddBackground(0, 0, _Width, _Height, 9270); AddImageTiled(11, 10, _Width - 23, _Height - 20, 2624); AddAlphaRegion(11, 10, _Width - 22, _Height - 20); AddLabel(_X + 20, _Y, 88, _Message); AddButton(_X, _Y += 30, 0xF9, 0xF8, 1, GumpButtonType.Reply, 0); AddButton(_X + 70, _Y, 0xF3, 0xF1, 0, GumpButtonType.Reply, 0); //have timer force response if the user doesn't respond within the required time _ForceResponseTimer = Timer.DelayCall(TimeSpan.FromSeconds(20), TimeSpan.FromSeconds(20.0), new TimerCallback(OnTimer)); }
public MovableAddonConfigGump(MovableAddonKey key, Mobile owner) : base(100, 100) { _Owner = owner; _Key = key; if (_Owner == null || _Key == null) { return; } _Owner.CloseGump(typeof(MovableAddonConfigGump)); AddPage(0); AddBackground(0, 0, _Width, _Height, 9270); AddImageTiled(11, 10, _Width - 23, _Height - 20, 2624); AddAlphaRegion(11, 10, _Width - 22, _Height - 20); }
public SelectCarpetDesignGump(MovableAddonKey key, Mobile owner, int cost) : base(key, owner) { _Cost = cost; if (_Owner == null || _Key == null) { return; } _Owner.CloseGump(typeof(SelectCarpetDesignGump)); foreach (int carpettype in Enum.GetValues(typeof(FlyingCarpetType))) { AddItem(_X, _Y, FlyingCarpetComponent.CarpetIDs[carpettype][0][0], _Key.AddonHue); AddButton(_X + 50, _Y + 25, 0x15E1, 0x15E5, carpettype + 1, GumpButtonType.Reply, 0); _Y += 50; } }
public override void Deserialize(GenericReader reader) { _Components = new List <MovableAddonComponent>(); base.Deserialize(reader); int version = reader.ReadInt(); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { _Components.Add((MovableAddonComponent)reader.ReadItem()); } _Direction = (MovableAddonDirection)reader.ReadInt(); _Controller = (MovableAddonControlComponent)reader.ReadItem(); _Key = (MovableAddonKey)reader.ReadItem(); #if ( RunUORC1 ) _Extrema = new Rectangle3D(new Point3D(reader.ReadInt(), reader.ReadInt(), reader.ReadInt()), new Point3D(reader.ReadInt(), reader.ReadInt(), reader.ReadInt())); #else /*To RunUO 2.0 RC1 users: if you're getting an error here, then uncomment line 2 of this file to read: * #define RunUORC1 * */ _Extrema = reader.ReadRect3D(); #endif _Delay = TimeSpan.FromSeconds(reader.ReadDouble()); ExhaustPowerTimeSpan = reader.ReadTimeSpan(); _Speed = MovableAddonSpeed.Regular; }
public ConfirmAddonRemovalGump(MovableAddonKey key, Mobile owner) : base(key, owner) { }
//3002132 = "configuration" public MovableAddonConfigEntry(Mobile from, MovableAddonKey key, int index) : base(2132, index) { _From = from; _Key = key; }
public ConfirmAddonPlaceGump(MovableAddonKey key, Mobile owner) : base(key, owner) { }
public FlyingCarpetConfigGump(MovableAddonKey key, Mobile owner) : base(key, owner) { if (_Owner == null || _Key == null) { return; } _Lamp = (FlyingCarpetMagicLamp)key; AddLabel(_X, _Y, 88, "Flying Carpet Configuration"); AddLabel(_X, _Y += 50, 1152, "Current Carpet Layout"); AddLabel(_X, _Y += 50, 1152, "Length: " + _Lamp.CarpetLength.ToString()); AddLabel(_X + 150, _Y, 1152, "Width: " + _Lamp.CarpetWidth.ToString()); AddLabel(_X, _Y += 40, 1152, "Design: "); AddItem(_X + 100, _Y, FlyingCarpetComponent.CarpetIDs[(int)_Lamp.CarpetType][0][0], _Key.AddonHue); AddLabel(_X, _Y += 50, 1152, "Available Modifications/Upgrades:"); AddLabel(_X + 10, _Y += 20, 1152, String.Format("(cost requirement: {0})", CliLoc.GetName(_Lamp.ModifyResourceType))); AddLabel(_X, _Y += 50, 1152, "Modification"); AddLabel(_X + 200, _Y, 1152, "Cost"); AddLabel(_X, _Y += 30, 1152, "Change carpet design"); AddLabel(_X + 200, _Y, 1152, DesignCost.ToString()); if (_Lamp.Addon == null) { AddButton(_X + 250, _Y, 0x15E1, 0x15E5, 1, GumpButtonType.Reply, 0); } if (_Lamp.CarpetLength < FlyingCarpet.MAX_LENGTH) { AddLabel(_X, _Y += 20, 1152, "Increase length"); AddLabel(_X + 200, _Y, 1152, LengthUpgradeCost.ToString()); if (_Lamp.Addon == null) { AddButton(_X + 250, _Y, 0x15E1, 0x15E5, 2, GumpButtonType.Reply, 0); } } if (_Lamp.CarpetWidth < FlyingCarpet.MAX_WIDTH) { AddLabel(_X, _Y += 20, 1152, "Increase width"); AddLabel(_X + 200, _Y, 1152, WidthUpgradeCost.ToString()); if (_Lamp.Addon == null) { AddButton(_X + 250, _Y, 0x15E1, 0x15E5, 3, GumpButtonType.Reply, 0); } } if (_Lamp.CarpetLength > 3) { AddLabel(_X, _Y += 20, 1152, "Decrease length"); AddLabel(_X + 200, _Y, 1152, LengthDowngradeCost.ToString()); if (_Lamp.Addon == null) { AddButton(_X + 250, _Y, 0x15E1, 0x15E5, 4, GumpButtonType.Reply, 0); } } if (_Lamp.CarpetWidth > 3) { AddLabel(_X, _Y += 20, 1152, "Decrease width"); AddLabel(_X + 200, _Y, 1152, WidthDowngradeCost.ToString()); if (_Lamp.Addon == null) { AddButton(_X + 250, _Y, 0x15E1, 0x15E5, 5, GumpButtonType.Reply, 0); } } if (_Lamp.Addon != null) { AddLabel(_X, _Y += 30, 88, "To make upgrades, store your carpet"); } }