private void DrawAdjustedTexture(Texture texture, Vector2 topLeftCorner, Vector2 bottomRightCorner) { topLeftCorner = GetTransformedVector(topLeftCorner); bottomRightCorner = GetTransformedVector(bottomRightCorner); BasicGraphics.DrawTextureWithUse(texture, topLeftCorner, bottomRightCorner); }
public void DrawMainMenu(int[] menuItemXPaddings) { float aspectRatio = VisualValues.GetAspectRatio(); Vector2 titleTopLeftCorner = new Vector2(-aspectRatio, 1); Vector2 titleBottomRightCorner = new Vector2(aspectRatio, -1); BasicGraphics.DrawTextureWithUse(titleTexture, titleTopLeftCorner, titleBottomRightCorner); for (int i = 0; i < 6; i++) { DrawMenuItem(i, menuItemXPaddings[i]); } }
public void DrawMenuItem(int index, int menuItemXPadding) { Texture texture; if (index == 0) { texture = playTutorialTexture; } else if (index == 1) { texture = playSong1Texture; } else if (index == 2) { texture = playSong2Texture; } else if (index == 3) { texture = playSong3Texture; } else if (index == 4) { texture = importSongTexture; } else { texture = exitGameTexture; } float xOffset = menuItemXPadding * menuItemXPaddingFactor; float yOffset = index * (menuItemHeight + menuItemYMargin); Vector2 topLeftCorner = menuTopLeftCorner + new Vector2(xOffset, -yOffset); Vector2 bottomRightCorner = topLeftCorner + new Vector2(menuItemHeight * 7, -menuItemHeight); BasicGraphics.DrawTextureWithUse(texture, topLeftCorner, bottomRightCorner); }
private void DrawTexture(Texture texture, Vector2 topLeftCorner, Vector2 bottomRightCorner) { BasicGraphics.DrawTextureWithUse(texture, topLeftCorner, bottomRightCorner); }