mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[glass] Turn on docking by default
This uses a full-viewport dockspace and shift to enable docking.
This commit is contained in:
@@ -179,6 +179,11 @@ int main(int argc, char** argv) {
|
||||
gui::AddIcon(glass::GetResource_glass_256_png());
|
||||
gui::AddIcon(glass::GetResource_glass_512_png());
|
||||
|
||||
gui::AddEarlyExecute(
|
||||
[] { ImGui::DockSpaceOverViewport(ImGui::GetMainViewport()); });
|
||||
|
||||
gui::AddInit([] { ImGui::GetIO().ConfigDockingWithShift = true; });
|
||||
|
||||
gPlotProvider = std::make_unique<glass::PlotProvider>(
|
||||
glass::GetStorageRoot().GetChild("Plots"));
|
||||
gNtProvider = std::make_unique<glass::NetworkTablesProvider>(
|
||||
@@ -291,7 +296,8 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
});
|
||||
|
||||
gui::Initialize("Glass - DISCONNECTED", 1024, 768);
|
||||
gui::Initialize("Glass - DISCONNECTED", 1024, 768,
|
||||
ImGuiConfigFlags_DockingEnable);
|
||||
gEnterKey = &glass::GetStorageRoot().GetInt("enterKey", GLFW_KEY_ENTER);
|
||||
if (auto win = gui::GetSystemWindow()) {
|
||||
gPrevKeyCallback = glfwSetKeyCallback(win, RemapEnterKeyCallback);
|
||||
|
||||
Reference in New Issue
Block a user