private bool updateWidgetInput(Player player) { bool flag = false; IAttributeWidget selectedAttribute = SelectedAttribute; if (uiDelay == 0) { if (parentUI.IsDownButtonDown() && selectedAttribute.SelectDown()) { flag = true; } if (parentUI.IsUpButtonDown() && selectedAttribute.SelectUp()) { flag = true; } if (parentUI.IsLeftButtonDown() && selectedAttribute.SelectLeft()) { flag = true; } if (parentUI.IsRightButtonDown() && selectedAttribute.SelectRight()) { flag = true; } } if (flag) { selectedAttribute.Apply(player); } return(flag); }
public void ApplyDefaultAttributes(Player player) { Randomize(player); IAttributeWidget attributeWidget = attributes[9]; attributeWidget.Reset(); attributeWidget.Apply(player); categoryWidget.SelectedIndex = 0; UpdateHeaderAndFooter(); }
public void Randomize(Player player) { Vector2i[] array = RandomCharacter.create(rnd); for (int i = 0; i < attributes.Length; i++) { if (i != 9) { IAttributeWidget attributeWidget = attributes[i]; attributeWidget.SetCursor(array[i]); attributeWidget.Apply(player); } } }