mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Merge branch 'main' into 2027
This commit is contained in:
@@ -61,6 +61,12 @@ __declspec(dllexport)
|
||||
reinterpret_cast<void*>((AddGuiEarlyExecuteFn)&AddGuiEarlyExecute));
|
||||
HAL_RegisterExtension(HALSIMGUI_EXT_GUIEXIT,
|
||||
reinterpret_cast<void*>((GuiExitFn)&GuiExit));
|
||||
HAL_RegisterExtension(
|
||||
HALSIMGUI_EXT_GETGUICONTEXT,
|
||||
reinterpret_cast<void*>((GetGuiContextFn)&gui::GetCurrentContext));
|
||||
HAL_RegisterExtension(
|
||||
HALSIMGUI_EXT_GETGLASSCONTEXT,
|
||||
reinterpret_cast<void*>((GetGlassContextFn)&glass::GetCurrentContext));
|
||||
|
||||
HALSimGui::GlobalInit();
|
||||
DriverStationGui::GlobalInit();
|
||||
@@ -150,6 +156,9 @@ __declspec(dllexport)
|
||||
ImGuiConfigFlags_DockingEnable)) {
|
||||
return 0;
|
||||
}
|
||||
HAL_RegisterExtension(
|
||||
HALSIMGUI_EXT_GETIMGUICONTEXT,
|
||||
reinterpret_cast<void*>((GetImguiContextFn)&ImGui::GetCurrentContext));
|
||||
HAL_RegisterExtensionListener(
|
||||
nullptr, [](void*, const char* name, void* data) {
|
||||
if (std::string_view{name} == "ds_socket") {
|
||||
|
||||
@@ -6,6 +6,16 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
struct ImGuiContext;
|
||||
|
||||
namespace glass {
|
||||
class Context;
|
||||
} // namespace glass
|
||||
|
||||
namespace wpi::gui {
|
||||
struct Context;
|
||||
} // namespace wpi::gui
|
||||
|
||||
namespace halsimgui {
|
||||
|
||||
// These functions can be used to hook into the GUI, and can be accessed
|
||||
@@ -23,4 +33,13 @@ using AddGuiEarlyExecuteFn = void (*)(std::function<void()> execute);
|
||||
#define HALSIMGUI_EXT_GUIEXIT "halsimgui::GuiExit"
|
||||
using GuiExitFn = void (*)();
|
||||
|
||||
#define HALSIMGUI_EXT_GETIMGUICONTEXT "halsimgui::GetImguiContext"
|
||||
using GetImguiContextFn = ImGuiContext* (*)();
|
||||
|
||||
#define HALSIMGUI_EXT_GETGUICONTEXT "halsimgui::GetGuiContext"
|
||||
using GetGuiContextFn = wpi::gui::Context* (*)();
|
||||
|
||||
#define HALSIMGUI_EXT_GETGLASSCONTEXT "halsimgui::GetGlassContext"
|
||||
using GetGlassContextFn = glass::Context* (*)();
|
||||
|
||||
} // namespace halsimgui
|
||||
|
||||
Reference in New Issue
Block a user