Skip to content

Commit

Permalink
limited CourseRail parameter visiblity
Browse files Browse the repository at this point in the history
  • Loading branch information
shibbo committed Nov 11, 2023
1 parent 4b859d7 commit d6d3fcc
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Fushigi/course/CourseRail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ public CourseRailPoint this[ulong hash]
}
}

uint mAreaHash;
public uint mAreaHash;
string mGyml;
ulong mHash;
public ulong mHash;
public bool mIsClosed;
public List<CourseRailPoint> mPoints = new();
Dictionary<string, object> mParameters = new();
Expand Down Expand Up @@ -321,7 +321,7 @@ public BymlHashTable BuildNode()
return tbl;
}

ulong mHash;
public ulong mHash;
Dictionary<string, object> mParameters = new();
public System.Numerics.Vector3 mTranslate;
public System.Numerics.Vector3? mControl = null;
Expand Down
32 changes: 32 additions & 0 deletions Fushigi/ui/widgets/CourseScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class CourseScene
CourseUnit? mSelectedUnit = null;
BGUnitRail? mSelectedUnitRail = null;
CourseLink? mSelectedGlobalLink = null;
CourseRail? mSelectedRail = null;
CourseRail.CourseRailPoint? mSelectedRailPoint = null;

string mAddActorSearchQuery = "";

Expand Down Expand Up @@ -697,6 +699,32 @@ private void SelectionParameterPanel()
ImGui.Columns(1);
}
}
else if (mSelectedRail != null)
{
ImGui.AlignTextToFramePadding();
ImGui.Text($"Selected Rail");
ImGui.NewLine();
ImGui.Separator();

if (ImGui.CollapsingHeader("Properties", ImGuiTreeNodeFlags.DefaultOpen))
{
ImGui.Columns(2);
ImGui.Text("Hash"); ImGui.NextColumn();
string hash = mSelectedRail.mHash.ToString();
if (ImGui.InputText("##Hash", ref hash, 256, ImGuiInputTextFlags.CharsDecimal | ImGuiInputTextFlags.EnterReturnsTrue))
{

}

ImGui.NextColumn();
ImGui.Text("IsClosed");
ImGui.NextColumn();
ImGui.Checkbox("##IsClosed", ref mSelectedRail.mIsClosed);

ImGui.Columns(1);
}

}
else
{
ImGui.AlignTextToFramePadding();
Expand Down Expand Up @@ -969,12 +997,16 @@ private void CourseRailsView(CourseRailHolder railHolder)
{
if (ImGui.TreeNode($"Rail {railHolder.mRails.IndexOf(rail)}"))
{
mSelectedRail = rail;
mSelectedRailPoint = null;
//ImGui.Checkbox("IsClosed", ref rail.mIsClosed);

foreach (CourseRail.CourseRailPoint pnt in rail.mPoints)
{
if (ImGui.TreeNode($"Point {rail.mPoints.IndexOf(pnt)}"))
{
mSelectedRail = null;
mSelectedRailPoint = pnt;
ImGui.TreePop();
}
}
Expand Down

0 comments on commit d6d3fcc

Please sign in to comment.