Well, I’m not sure why this isn’t more obvious but recently I was looking for an immediate mode GUI for C-Sharp & FNA. The most I could find was MonoGame.ImGuiNET but then I found that ImGui.NET basically has this same code, but with better instructions (for interfacing with FNA) as part of its own repo.
Note, FNA doesn’t seem to have any HorizontalScrollWheelValue so a bit still needs to change:
io.AddMouseWheelEvent(
(mouse.HorizontalScrollWheelValue - _horizontalScrollWheelValue) / WHEEL_DELTA,
(mouse.ScrollWheelValue - _scrollWheelValue) / WHEEL_DELTA);
_scrollWheelValue = mouse.ScrollWheelValue;
_horizontalScrollWheelValue = mouse.HorizontalScrollWheelValue;
to something like:
io.AddMouseWheelEvent(
0f, // no horizontal i guess
(mouse.ScrollWheelValue - _scrollWheelValue) / WHEEL_DELTA);
_scrollWheelValue = mouse.ScrollWheelValue;Once the renderer part for ImGui was taken care of using it felt like having a baked in hot reloading for my code. I thought I was fine with just printing some debug info inside of the game scene itself, but the ease, of manipulating variables with ImGui, is pretty nice.