private void SetValuesOfSelection(CellSelectionType cellSelectionType, bool value) { (int?startFrame, int?endFrame) = GetFrameBounds(); List <M64InputCell> cells = M64Utilities.GetSelectedInputCells( _gui.DataGridViewInputs, cellSelectionType, startFrame, endFrame, _gui.TextBoxSelectionInputs.Text); int?intOnValue = ParsingUtilities.ParseIntNullable(_gui.TextBoxOnValue.Text); cells.ForEach(cell => cell.SetValue(value, intOnValue)); _gui.DataGridViewInputs.Refresh(); }
public void RemoveCellColorEffect(CellArea area, Vector2I centerCellPosition, CellSelectionType type) { foreach (Vector2I cellPosition in area.GetAreaCellPositions(centerCellPosition)) { if (CellSet.GetCell(cellPosition) == null || CellSet.GetCell(cellPosition).GetColorEffect(type) == null) continue; Map.RemoveObjectToDraw(DrawOrder.MapCell, GetCell(cellPosition).GetColorEffect(type)); } }
public void ClearCellColorEffect(CellSelectionType type) { for (int y = 0; y < Map.Height; ++y) for (int x = 0; x < Map.Width; ++x) RemoveCellColorEffect(new CellArea(), new Vector2I(x, y), type); }
public void AddCellColorEffect(CellArea area, Vector2I centerCellPosition, CellSelectionType type) { foreach (Vector2I cellPosition in area.GetAreaCellPositions(centerCellPosition)) { if (CellSet.GetCell(cellPosition) == null) continue; CellShape colorEffect = GetCell(cellPosition).AddColorEffect(type); if (colorEffect != null) Map.AddObjectToDraw(DrawOrder.MapCell, colorEffect); } }
public CellShape(CellSelectionType type, uint size) : base(new Vector2f(size, size), CellSelectionTypeColor[type], false, Color.Black) { }
public CellShape AddColorEffect(CellSelectionType type) { if (!IsUsable()) return null; ColorEffects[type] = new CellShape(type, CombatMap.CELL_SIZE); ColorEffects[type].Position = Position.ToVector2() * CombatMap.CELL_SIZE; return ColorEffects[type]; }
public CellShape GetColorEffect(CellSelectionType type) { return ColorEffects[type]; }