Created
June 5, 2013 16:04
-
-
Save adarapata/5715085 to your computer and use it in GitHub Desktop.
カーソル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// コンテンツを選択するカーソルインタフェース | |
/// </summary> | |
public interface ICursol | |
{ | |
/// <summary> | |
/// 現在選択中のコンテンツ | |
/// </summary> | |
ICursolContent content { set; get; } | |
/// <summary> | |
/// 他のコンテンツを選択する | |
/// </summary> | |
/// <param name="direction"></param> | |
void Select(CursolDirection direction); | |
/// <summary> | |
/// 現在選択しているコンテンツの決定処理を行う | |
/// </summary> | |
void Decision(); | |
} | |
/// <summary> | |
/// カーソルで選択できるコンテンツのインタフェース | |
/// </summary> | |
public interface ICursolContent{ | |
/// <summary> | |
/// このコンテンツ選択した時のアクション | |
/// </summary> | |
void SelectedAction(); | |
/// <summary> | |
/// このコンテンツを離れた時のアクション | |
/// </summary> | |
ICursolContent LeavedAction(CursolDirection direction); | |
/// <summary> | |
/// このコンテンツを選択したときのアクション | |
/// </summary> | |
void DecisionAction(); | |
} | |
/// <summary> | |
/// カーソルの動く方向 | |
/// </summary> | |
public enum CursolDirection | |
{ | |
UP, | |
Down, | |
Right, | |
Left | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment