Skip to content

Commit 9d7c2dc

Browse files
committed
[WIP] Adjustments
1 parent 2d1fc76 commit 9d7c2dc

17 files changed

+149
-155
lines changed

NuGet.Config

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/CodeGenerator/ImguiDefinitions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ private string SanitizeMemberName(string memberName)
268268
if (memberName.StartsWith(Name))
269269
{
270270
ret = memberName.Substring(Name.Length);
271+
if (ret.StartsWith("_"))
272+
{
273+
ret = ret.Substring(1);
274+
}
271275
}
272276

273277
if (ret.EndsWith('_'))

src/CodeGenerator/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ static void Main(string[] args)
3939
{
4040
"cimgui" => "ImGuiNET",
4141
"cimplot" => "ImPlotNET",
42-
"cimnodes" => "ImNodesNET",
42+
"cimnodes" => "imnodesNET",
4343
"cimguizmo" => "ImGuizmoNET",
44-
_ => throw new NotImplementedException()
44+
_ => throw new NotImplementedException($"Library \"{libraryName}\" is not supported.")
4545
};
4646

4747
bool referencesImGui = libraryName switch
@@ -50,16 +50,16 @@ static void Main(string[] args)
5050
"cimplot" => true,
5151
"cimnodes" => true,
5252
"cimguizmo" => true,
53-
_ => throw new NotImplementedException()
53+
_ => throw new NotImplementedException($"Library \"{libraryName}\" is not supported.")
5454
};
5555

5656
string classPrefix = libraryName switch
5757
{
5858
"cimgui" => "ImGui",
5959
"cimplot" => "ImPlot",
60-
"cimnodes" => "ImNodes",
60+
"cimnodes" => "imnodes",
6161
"cimguizmo" => "ImGuizmo",
62-
_ => throw new NotImplementedException()
62+
_ => throw new NotImplementedException($"Library \"{libraryName}\" is not supported.")
6363
};
6464

6565
string dllName = libraryName switch

src/ImGui.NET.SampleProgram/ImGuiController.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Numerics;
44
using System.Reflection;
55
using System.IO;
6-
using ImPlotNET;
76
using Veldrid;
87
using System.Runtime.CompilerServices;
98

@@ -62,9 +61,6 @@ public ImGuiController(GraphicsDevice gd, OutputDescription outputDescription, i
6261

6362
IntPtr context = ImGui.CreateContext();
6463
ImGui.SetCurrentContext(context);
65-
IntPtr implotContext = ImPlot.CreateContext();
66-
ImPlot.SetCurrentContext(implotContext);
67-
ImPlot.SetImGuiContext(context);
6864
var fonts = ImGui.GetIO().Fonts;
6965
ImGui.GetIO().Fonts.AddFontDefault();
7066

src/ImGui.NET.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeGenerator", "CodeGenera
1212
EndProject
1313
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImPlot.NET", "ImPlot.NET\ImPlot.NET.csproj", "{817A9820-E750-43AB-B89E-FD51E58ACBF4}"
1414
EndProject
15-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImNodes.NET", "ImNodes.NET\ImNodes.NET.csproj", "{2786BF48-AE57-44EE-9E28-401AE88E972D}"
15+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "imnodes.NET", "imnodes.NET\imnodes.NET.csproj", "{2786BF48-AE57-44EE-9E28-401AE88E972D}"
1616
EndProject
1717
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImGuizmo.NET", "ImGuizmo.NET\ImGuizmo.NET.csproj", "{760568AB-DCC9-443E-ADFA-2B06B2E2B421}"
1818
EndProject
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
namespace ImNodesNET
1+
namespace imnodesNET
22
{
33
[System.Flags]
44
public enum AttributeFlags
55
{
6-
_None = 0,
7-
_EnableLinkDetachWithDragClick = 1,
8-
_EnableLinkCreationOnSnap = 2,
6+
None = 0,
7+
EnableLinkDetachWithDragClick = 1,
8+
EnableLinkCreationOnSnap = 2,
99
}
1010
}
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
namespace ImNodesNET
1+
namespace imnodesNET
22
{
33
public enum ColorStyle
44
{
5-
_NodeBackground = 0,
6-
_NodeBackgroundHovered = 1,
7-
_NodeBackgroundSelected = 2,
8-
_NodeOutline = 3,
9-
_TitleBar = 4,
10-
_TitleBarHovered = 5,
11-
_TitleBarSelected = 6,
12-
_Link = 7,
13-
_LinkHovered = 8,
14-
_LinkSelected = 9,
15-
_Pin = 10,
16-
_PinHovered = 11,
17-
_BoxSelector = 12,
18-
_BoxSelectorOutline = 13,
19-
_GridBackground = 14,
20-
_GridLine = 15,
21-
_Count = 16,
5+
NodeBackground = 0,
6+
NodeBackgroundHovered = 1,
7+
NodeBackgroundSelected = 2,
8+
NodeOutline = 3,
9+
TitleBar = 4,
10+
TitleBarHovered = 5,
11+
TitleBarSelected = 6,
12+
Link = 7,
13+
LinkHovered = 8,
14+
LinkSelected = 9,
15+
Pin = 10,
16+
PinHovered = 11,
17+
BoxSelector = 12,
18+
BoxSelectorOutline = 13,
19+
GridBackground = 14,
20+
GridLine = 15,
21+
Count = 16,
2222
}
2323
}

src/ImNodes.NET/Generated/EmulateThreeButtonMouse.gen.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Text;
55
using ImGuiNET;
66

7-
namespace ImNodesNET
7+
namespace imnodesNET
88
{
99
public unsafe partial struct EmulateThreeButtonMouse
1010
{
@@ -23,7 +23,7 @@ public unsafe partial struct EmulateThreeButtonMousePtr
2323
public IntPtr modifier { get => (IntPtr)NativePtr->modifier; set => NativePtr->modifier = (byte*)value; }
2424
public void Destroy()
2525
{
26-
ImNodesNative.EmulateThreeButtonMouse_destroy((EmulateThreeButtonMouse*)(NativePtr));
26+
imnodesNative.EmulateThreeButtonMouse_destroy((EmulateThreeButtonMouse*)(NativePtr));
2727
}
2828
}
2929
}

src/ImNodes.NET/Generated/IO.gen.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Text;
55
using ImGuiNET;
66

7-
namespace ImNodesNET
7+
namespace imnodesNET
88
{
99
public unsafe partial struct IO
1010
{
@@ -23,7 +23,7 @@ public unsafe partial struct IOPtr
2323
public ref LinkDetachWithModifierClick link_detach_with_modifier_click => ref Unsafe.AsRef<LinkDetachWithModifierClick>(&NativePtr->link_detach_with_modifier_click);
2424
public void Destroy()
2525
{
26-
ImNodesNative.IO_destroy((IO*)(NativePtr));
26+
imnodesNative.IO_destroy((IO*)(NativePtr));
2727
}
2828
}
2929
}

0 commit comments

Comments
 (0)