本文整理汇总了C#中Note.GetTitle方法的典型用法代码示例。如果您正苦于以下问题:C# Note.GetTitle方法的具体用法?C# Note.GetTitle怎么用?C# Note.GetTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Note
的用法示例。
在下文中一共展示了Note.GetTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Awake
void Awake()
{
this.arialFont = (Font)Resources.GetBuiltinResource (typeof(Font), "Arial.ttf");
//load the JSON
var dict = JSON.Parse(notesJsonAsset.text);
JSONArray notesJson = dict["notes"].AsArray;
// the notepad
gameObject.SetActive(false);
//make the note deatil GO
this.noteDetailGO = new GameObject("noteDetailGO");
this.noteDetailGO.transform.SetParent(gameObject.transform, false);
this.noteDetailGO.SetActive(false);
RectTransform ndrect = noteDetailGO.AddComponent<RectTransform>();
RectTransformExtensions.SetSize(ndrect,new Vector2(730,330));
GameObject btnBack = UIExtensions.MakeTextColorButton(
"buttonback",
new Vector2(160,30),
new Vector2(210, 200),
"Go Back",
arialFont, 18, Color.white,
Color.gray,
TextAnchor.MiddleCenter,
BackCallback);
btnBack.transform.SetParent(this.noteDetailGO.transform, false);
// note text
this.noteDetailText = this.noteDetailGO.AddComponent<Text>();
this.noteDetailText.font = arialFont;
this.noteDetailText.color = Color.white;
this.noteDetailText.fontSize = 18;
this.noteDetailText.horizontalOverflow = HorizontalWrapMode.Wrap;
//make the notes list GO
this.notesListGO = new GameObject("notesListGO");
this.notesListGO.transform.SetParent(gameObject.transform, false);
foreach (JSONNode noteNode in notesJson) {
Debug.Log(noteNode.ToString());
Note n = new Note(
(string)noteNode["id"],
(string)noteNode["title"],
(string)noteNode["text"]);
notes.Add(n);
int ox = -376;
int oy = 210;
GameObject btnNote = UIExtensions.MakeTextOnlyButton(
n.GetId(),
new Vector2(730,30),
new Vector2((float)ox,-(float)(notes.Count*30)+oy),
n.GetTitle(),
arialFont, 18, Color.white, TextAnchor.MiddleLeft,
ButtonEvent);
btnNote.transform.SetParent(this.notesListGO.transform, false);
}
}