|
|
|
|
|
|
[MenuItem("ChopChop/QuestEditorWindow")] |
|
|
|
public static void ShowWindow() |
|
|
|
{ |
|
|
|
Debug.Log("Show Window"); |
|
|
|
QuestEditorWindow wnd = GetWindow<QuestEditorWindow>(); |
|
|
|
wnd.titleContent = new GUIContent("QuestEditorWindow"); |
|
|
|
|
|
|
|
|
|
|
QuestEditorWindow window = GetWindow<QuestEditorWindow>(); |
|
|
|
// Adds a title to the window.
|
|
|
|
|
|
|
|
Debug.Log("Show Window"); |
|
|
|
|
|
|
|
window.titleContent = new GUIContent("QuestEditorWindow"); |
|
|
|
|
|
|
|
// Sets a minimum size to the window.
|
|
|
|
|
|
|
} |
|
|
|
public void CreateGUI() |
|
|
|
{ |
|
|
|
VisualElement root = rootVisualElement; |
|
|
|
Debug.Log("Create GUI"); |
|
|
|
VisualElement root = rootVisualElement; |
|
|
|
|
|
|
|
// Import UXML
|
|
|
|
var visualTree = Resources.Load<VisualTreeAsset>("QuestEditorWindow"); |
|
|
|
root.Add(visualTree.CloneTree()); |
|
|
|
|
|
|
|
|
|
|
private void LoadAllQuestsData() |
|
|
|
{ |
|
|
|
Debug.Log("LoadAllQuestsData"); |
|
|
|
//Load all questlines
|
|
|
|
FindAllSOByType(out QuestlineSO[] questLineSOs); |
|
|
|
RefreshListView(out ListView allQuestlinesListView, "questlines-list", questLineSOs); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
Debug.Log("AllDialogueList" + AllDialogueList.ToArray()); |
|
|
|
|
|
|
|
if (AllDialogueList != null) |
|
|
|
AllDialogue = AllDialogueList.ToArray(); |
|
|
|
|
|
|
|