-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust chibi editor, add orphan item dialog, add bgm names to Display…
…Name, add child item counts in tree (#41)
- Loading branch information
1 parent
27797a3
commit 6e8950f
Showing
11 changed files
with
122 additions
and
114 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
using Eto.Drawing; | ||
using Eto.Forms; | ||
using HaruhiChokuretsuLib.Util; | ||
using SerialLoops.Controls; | ||
using SerialLoops.Lib; | ||
using SerialLoops.Lib.Items; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace SerialLoops | ||
{ | ||
public class ReferencesDialog : FindItemsDialog | ||
{ | ||
public ItemDescription Item; | ||
|
||
public ReferencesDialog(ItemDescription item, Project project, ItemExplorerPanel explorer, EditorTabsPanel tabs, ILogger log) | ||
{ | ||
Item = item; | ||
Project = project; | ||
Explorer = explorer; | ||
Tabs = tabs; | ||
Log = log; | ||
InitializeComponent(); | ||
} | ||
|
||
private void InitializeComponent() | ||
{ | ||
Title = $"References to {Item.DisplayName}"; | ||
MinimumSize = new Size(400, 275); | ||
Padding = 10; | ||
|
||
List<ItemDescription> results = Item.GetReferencesTo(Project); | ||
Content = new StackLayout | ||
{ | ||
Orientation = Orientation.Vertical, | ||
HorizontalContentAlignment = HorizontalAlignment.Center, | ||
Spacing = 10, | ||
Padding = 10, | ||
Items = | ||
{ | ||
$"{results.Count} items that reference {Item.Name}:", | ||
new ItemResultsPanel(results, Log) { Dialog = this } | ||
} | ||
}; | ||
} | ||
|
||
} | ||
|
||
public class OrphanedItemsDialog : FindItemsDialog | ||
{ | ||
private static readonly ItemDescription.ItemType[] IGNORED_ORPHAN_TYPES = { | ||
ItemDescription.ItemType.Scenario, | ||
ItemDescription.ItemType.Dialogue_Config | ||
}; | ||
|
||
public OrphanedItemsDialog(Project project, ItemExplorerPanel explorer, EditorTabsPanel tabs, ILogger log) | ||
{ | ||
Project = project; | ||
Explorer = explorer; | ||
Tabs = tabs; | ||
Log = log; | ||
InitializeComponent(); | ||
} | ||
|
||
private void InitializeComponent() | ||
{ | ||
Title = "Orphaned Items"; | ||
MinimumSize = new Size(400, 275); | ||
Padding = 10; | ||
|
||
List<ItemDescription> results = Project.Items.FindAll(i => !IGNORED_ORPHAN_TYPES.Contains(i.Type) && i.GetReferencesTo(Project).Count == 0); | ||
Content = new StackLayout | ||
{ | ||
Orientation = Orientation.Vertical, | ||
HorizontalContentAlignment = HorizontalAlignment.Center, | ||
Spacing = 10, | ||
Padding = 10, | ||
Items = | ||
{ | ||
$"{results.Count} items found that are not referenced by other items:", | ||
new ItemResultsPanel(results, Log, false) { Dialog = this } | ||
} | ||
}; | ||
} | ||
} | ||
|
||
} |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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