C# 클래스 TimeRulerLibrary.Layout

Layout class that supports title safe area.
You have to support various resolution when you develop multi-platform games. Also, you have to support title safe area for Xbox 360 games. This structure places given rectangle with specified alignment and margin based on layout area (client area) with safe area. Margin is parcentage of client area size. Exmpale: Place( region, 0.1f, 0.2f, Aligment.TopLeft ); Place region at 10% from left side of the client area, 20% from top of the client area. Place( region, 0.3f, 0.4f, Aligment.BottomRight ); Place region at 30% from right side of client, 40% from the bottom of the client area. You can individually specify client area and safe area. So, it is useful when you have split screen game which layout happends based on client and it takes carea of the safe at same time.
파일 보기 프로젝트 열기: jaquadro/MonoGdx 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ClientArea Microsoft.Xna.Framework.Rectangle
SafeArea Microsoft.Xna.Framework.Rectangle

공개 메소드들

메소드 설명
Layout ( Rectangle clientArea ) : System

Construct layout object by specify client area. Safe area becomes same size as client area.

Layout ( Rectangle clientArea, Rectangle safeArea ) : System

Construct layout object by specify both client area and safe area.

Layout ( Viewport viewport ) : System

Construct layout object by specify viewport. Safe area becomes same as Viewpoert.TItleSafeArea.

Place ( Rectangle region, float horizontalMargin, float verticalMargine, Alignment alignment ) : Rectangle

Layouting specified region

Place ( Vector2 size, float horizontalMargin, float verticalMargine, Alignment alignment ) : Vector2

Layouting specified region

메소드 상세

Layout() 공개 메소드

Construct layout object by specify client area. Safe area becomes same size as client area.
public Layout ( Rectangle clientArea ) : System
clientArea Microsoft.Xna.Framework.Rectangle
리턴 System

Layout() 공개 메소드

Construct layout object by specify both client area and safe area.
public Layout ( Rectangle clientArea, Rectangle safeArea ) : System
clientArea Microsoft.Xna.Framework.Rectangle
safeArea Microsoft.Xna.Framework.Rectangle safe area
리턴 System

Layout() 공개 메소드

Construct layout object by specify viewport. Safe area becomes same as Viewpoert.TItleSafeArea.
public Layout ( Viewport viewport ) : System
viewport Microsoft.Xna.Framework.Graphics.Viewport
리턴 System

Place() 공개 메소드

Layouting specified region
public Place ( Rectangle region, float horizontalMargin, float verticalMargine, Alignment alignment ) : Rectangle
region Microsoft.Xna.Framework.Rectangle placing rectangle
horizontalMargin float
verticalMargine float
alignment Alignment
리턴 Microsoft.Xna.Framework.Rectangle

Place() 공개 메소드

Layouting specified region
public Place ( Vector2 size, float horizontalMargin, float verticalMargine, Alignment alignment ) : Vector2
size Vector2
horizontalMargin float
verticalMargine float
alignment Alignment
리턴 Vector2

프로퍼티 상세

ClientArea 공개적으로 프로퍼티

Gets/Sets client area.
public Rectangle,Microsoft.Xna.Framework ClientArea
리턴 Microsoft.Xna.Framework.Rectangle

SafeArea 공개적으로 프로퍼티

Gets/Sets safearea.
public Rectangle,Microsoft.Xna.Framework SafeArea
리턴 Microsoft.Xna.Framework.Rectangle