public void DrawLinesCurrentSelection(List <ButtonTile> list) { foreach (ButtonTile tile in list) { SpriteLines.Draw(sb, ManagerSelectTile.bearingChar, tile.Pos, Utility.SCALE_TILES, Color.LightGreen); } }
public void HighlightTile() { foreach (ButtonTile button in ListTileHighlight) { SpriteLetters.Draw(sb, char.Parse(button.NameDraw), button.Pos, Utility.SCALE_TILES, Color.Green); } }
public void DrawGrid(SpriteTile spriteLetters) { int numCols = grid.GridGame.GetLength(0); int numRows = grid.GridGame.GetLength(1); int counterNewLine = 0; int counterRow = 0; int counterCol = 0; // Position details Vector2 position = new Vector2(0f, 0f); float gridStartX = (sizeScreen.X * 0.5f) - (numCols * spriteLetters.WidthSprite * 0.5f); float gridStartY = (sizeScreen.Y * 0.5f) - (numRows * spriteLetters.HeightSprite * 0.5f); for (int counter = 0; counter < ListLettersGrid.Count; counter++) { //Fix counterRow for moving to next rown once enumerated enough columns if (counter == 0) { counterRow = 1; } // Convert letter NameDraw to char char.TryParse(ListLettersGrid[counter].NameDraw, out char toDraw); // Get position to place letter position = new Vector2(gridStartX + counterCol * spriteLetters.WidthSprite, gridStartY + (counterRow - 1) * spriteLetters.HeightSprite); // Draw sprite spriteLetters.Draw(sb, toDraw, position, Utility.SCALE_TILES, Color.White); // Update letter posSprite ListLettersGrid[counter].Pos = position; counterCol++; counterNewLine++; // Move to next row once enumerated enough columns if (counterNewLine % numCols == 0) { counterCol = 0; counterRow++; } } }
public void DrawMouse(SpriteTile textureCursor, float scale) { // Draw textureCursor.Draw(sb, '0', ManagerInput.PosMouse, scale, Color.White); }