branchsbox/managed-hammercancel
7 Commits over 0 Days - ∞cph!
Replace Hammer::CreateMenus with Hammer::WindowInit
Disable ToolRenderContext
Commenting this out for this PR. Here's the issue with doing it like this. You're passing a struct down to addons, which can then be copied, which will copy the CToolRenderContext pointer. Which means you've lost control of it. That could lead to the situation where people are saving the struct somewhere and using it after the native pointer is dead. This is why where possible I've preferred the globals (Paint, Render) and protecting the pointer by nulling it when out of scope. This needs more thought on how it'd work for multiple views etc.
CFramelessMainWindow stores its managed handle
Add missing interop includes
Basic Hammer interop, let tools addons add menu bar options with [Menu]
FgdWriter tells Hammer to reload fgd automatically when written
Hammer: Save & restore selection when reloading fgds instead of clearing it
Hook Hammer MapViewHUD render and pass a ToolRenderContext to C# for helper overlays (e.g. showing where a platform will go.)
Bare managed interop setup for Hammer
FgdWriter: tell tools to reload fgds
Hammer: when reloading fgds instead of just clearing selection, make a backup and restore it