-
-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
113 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System; | ||
using CUE4Parse.UE4.Objects.Core.Misc; | ||
|
||
namespace FModel.Views.Snooper; | ||
|
||
public class Options | ||
{ | ||
public FGuid SelectedModel { get; private set; } | ||
public int SelectedModelInstance; | ||
|
||
public int SelectedSection { get; private set; } | ||
public int SelectedMorph { get; private set; } | ||
|
||
public Options() | ||
{ | ||
Reset(); | ||
} | ||
|
||
public void Reset() | ||
{ | ||
SelectedModel = Guid.Empty; | ||
SelectedModelInstance = 0; | ||
SelectedSection = 0; | ||
SelectedMorph = 0; | ||
} | ||
|
||
public void SelectModel(FGuid guid) | ||
{ | ||
SelectedModel = guid; | ||
SelectedModelInstance = 0; | ||
SelectedSection = 0; | ||
SelectedMorph = 0; | ||
} | ||
|
||
public void SelectSection(int index) | ||
{ | ||
SelectedSection = index; | ||
} | ||
|
||
public void SelectMorph(int index, Model model) | ||
{ | ||
SelectedMorph = index; | ||
model.UpdateMorph(SelectedMorph); | ||
} | ||
|
||
public bool TryGetSection(Model model, out Section section) | ||
{ | ||
if (SelectedSection >= 0 && SelectedSection < model.Sections.Length) | ||
section = model.Sections[SelectedSection]; else section = null; | ||
return section != null; | ||
} | ||
} |
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
Oops, something went wrong.