本文整理汇总了C#中Area.MarkForDraw方法的典型用法代码示例。如果您正苦于以下问题:C# Area.MarkForDraw方法的具体用法?C# Area.MarkForDraw怎么用?C# Area.MarkForDraw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area.MarkForDraw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoAreaSelector
// RimWorld.AreaAllowedGUI
private static void DoAreaSelector(Rect rect, ManagerJob job, Area area)
{
rect = rect.ContractedBy(1f);
GUI.DrawTexture(rect, (area == null) ? BaseContent.GreyTex : area.ColorTexture);
Text.Anchor = TextAnchor.MiddleLeft;
string text = AreaUtility.AreaAllowedLabel_Area(area);
Rect rect2 = rect;
rect2.xMin += 3f;
rect2.yMin += 2f;
Widgets.Label(rect2, text);
if (job.AreaRestriction == area)
{
Widgets.DrawBox(rect, 2);
}
if (Mouse.IsOver(rect))
{
if (area != null)
{
area.MarkForDraw();
}
if (Input.GetMouseButton(0) && job.AreaRestriction != area)
{
job.AreaRestriction = area;
SoundDefOf.DesignateDragStandardChanged.PlayOneShotOnCamera();
}
}
TooltipHandler.TipRegion(rect, text);
}
示例2: DoAreaSelector
private static bool DoAreaSelector( Rect rect, Area area, bool status )
{
rect = rect.ContractedBy( 1f );
GUI.DrawTexture( rect, area == null ? BaseContent.GreyTex : area.ColorTexture );
Text.Anchor = TextAnchor.MiddleLeft;
string text = AreaUtility.AreaAllowedLabel_Area( area );
Rect rect2 = rect;
rect2.xMin += 3f;
rect2.yMin += 2f;
Widgets.Label( rect2, text );
if ( status )
Widgets.DrawBox( rect, 2 );
if ( Mouse.IsOver( rect ) )
{
if ( area != null )
area.MarkForDraw();
if ( Widgets.ButtonInvisible( rect ) )
{
SoundDefOf.DesignateDragStandardChanged.PlayOneShotOnCamera();
return !status;
}
}
TooltipHandler.TipRegion( rect, text );
return status;
}