public void ShowFor(ArgumentReturnType type, Bindable <Argument> argument, Vector2 position) { current.UnbindAll(); current.BindTo(argument); list.Clear(); foreach (var arg in possibilities) { if (arg.Type == type) { list.Add(new ArgumentTypeButton(arg)); } } content.MoveTo(position); Show(); }
private void argumentWithOneArgument(OnlineRoom receivedRoom, ArgumentReturnType argumentType) { if (receivedRoom.Players[receivedRoom.UserActionArgument.Arguments[0].Result[0]].BackingUser.ID != localPlayer.BackingUser.ID) { sendOverlay.Hide(); EnableCardSelection.Value = false; EnablePlayerSelection.Value = false; EnableTileSelection.Value = false; return; } if ((argumentType & ArgumentReturnType.Tile) != 0) { EnableTileSelection.Value = true; sendOverlay.Show(); } if ((argumentType & ArgumentReturnType.Card) != 0) { EnableCardSelection.Value = true; sendOverlay.Show(); } if ((argumentType & ArgumentReturnType.Player) != 0) { EnablePlayerSelection.Value = true; sendOverlay.Show(); playersArray = receivedRoom.Players; } if ((argumentType & ArgumentReturnType.CardType) != 0) { EnableCardSelection.Value = true; List <OnlineCard> cardsType = new List <OnlineCard>(); foreach (var card in game.GameCards) { OnlineCard oc = new OnlineCard() { TypeID = card.TypeID }; cardsType.Add(oc); } selectOverlay.PopulateCards(cardsType); sendOverlay.Show(); } }
public ReturnTypeAttribute(ArgumentReturnType returnType) { ReturnType = returnType; }
public ArgumentChanger(ArgumentReturnType expectedType, Bindable <Argument> model) { this.expectedType = expectedType; this.model = model; }
public ChangeArgumentButton(ArgumentReturnType argumentType, Bindable <Argument> bindable) { type = argumentType; model = bindable; }