public override void Callback(ActionMenu menu) { var @out = new Packet(53); @out.WriteShort(onWidgetSlot); @out.WriteShortA(usedWidgetSlot); @out.WriteLEShortA(onItemIndex); @out.WriteShort(usedWidgetId); @out.WriteLEShort(usedItemIndex); @out.WriteShort(onWidgetId); GameContext.NetworkHandler.Write(@out); }
public void HandleMenu(ActionMenu menu) { if (InputUtils.MouseWithin(Bounds)) { for (var i = 0; i < optionDisplays.Length; i++) { var factory = factories[i]; if (factory != null) { menu.Add(factory()); } } menu.Add(new SwitchChatTabAction(this)); } }
public override void Callback(ActionMenu menu) { var player = GameContext.Players[playerIndex]; GameContext.WalkTo(2, 1, 1, GameContext.Self.PathX[0], GameContext.Self.PathY[0], player.PathX[0], player.PathY[0], 0, 0, 0, false); switch (optionIndex) { case 0: { var @out = new Packet(128); @out.WriteShort(playerIndex); GameContext.NetworkHandler.Write(@out); break; } case 1: { var @out = new Packet(153); @out.WriteLEShort(playerIndex); GameContext.NetworkHandler.Write(@out); break; } case 2: { var @out = new Packet(73); @out.WriteLEShort(playerIndex); GameContext.NetworkHandler.Write(@out); break; } case 3: { var @out = new Packet(139); @out.WriteLEShort(playerIndex); GameContext.NetworkHandler.Write(@out); break; } case 4: { var @out = new Packet(39); @out.WriteLEShort(playerIndex); GameContext.NetworkHandler.Write(@out); break; } } }
public override void Callback(ActionMenu menu) { tab.DisplayType = index; }
public override void Callback(ActionMenu menu) { }
public abstract void Callback(ActionMenu menu);