本文整理汇总了C#中Renderer.DrawStringRight方法的典型用法代码示例。如果您正苦于以下问题:C# Renderer.DrawStringRight方法的具体用法?C# Renderer.DrawStringRight怎么用?C# Renderer.DrawStringRight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Renderer
的用法示例。
在下文中一共展示了Renderer.DrawStringRight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawToFBO
public void DrawToFBO(Renderer renderer)
{
RenderHelper.SmartDrawRectangle(bg, 3, 0, 0, (int)size.X, (int)size.Y, Color.White, renderer);
RenderHelper.SmartDrawRectangle(bg, 3, 0, 0, 80, (int)size.Y, Color.White, renderer);
RenderHelper.SmartDrawRectangle(bg, 3, 0, 0, 80, 96, Color.White, renderer);
RenderHelper.SmartDrawRectangle(bg, 3, 0, 0, 80, 80, Color.White, renderer);
renderer.DrawStringRight(hintFont, "Click this message to continue...", new Rectangle(0, (int)size.Y - 18, (int)size.X - 8, 12), Color.Gray);
renderer.DrawStringCentered(characterFont, character.Name, new Rectangle(0, 78, 80, 16), Color.White);
renderer.DrawStringCentered(dialogFont, text, new Rectangle(80, (int)(size.Y - textSize.Y) / 2 - 2, (int)size.X - 80, (int)textSize.Y), Color.White);
if (character.Image != null)
renderer.Draw(character.Image, new Rectangle(2, 2, 76, 76), Color.White);
}
示例2: Draw
public override void Draw(Renderer renderer)
{
if (warningFadeState < 100)
{
gradStart += 20 * Main.WindowWidth / 1920;
if (gradStart >= (439 + 1003) * Main.WindowWidth / 1920)
gradStart = (439 - 1003) * Main.WindowWidth / 1920;
renderer.Draw(fbo, new Vector2(), Color.White);
renderer.Draw(pixel, new Rectangle(0, 0, Main.windowWidth, Main.windowHeight), Color.Black * ((float)warningFadeState / 100f));
}
else
{
renderer.Draw(pixel, new Rectangle(0, 0, Main.windowWidth, Main.windowHeight), Color.Black);
renderer.DrawStringLeft(font, warningText, new Vector2(), Color.White);
renderer.DrawStringRight(fontSmall, "[Press any key to skip]", new Rectangle(0, Main.windowHeight - 23, Main.windowWidth, 23), Color.Gray);
if (warningFadeState < 200)
renderer.Draw(pixel, new Rectangle(0, 0, Main.windowWidth, Main.windowHeight), Color.Black * ((float)(200 - warningFadeState) / 100f));
else
renderer.Draw(pixel, new Rectangle(0, 0, Main.windowWidth, Main.windowHeight), Color.Black * ((float)(warningFadeState - 200) / 100f));
}
}