mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-11 04:31:35 -10:00
* Add imgui * migrate render options * remove wmcgui * Add subsystem selection and highlighting * Add a syntactic sugar extension for imgui * don't rebuild the mission list every frame * Add imgui_sugar extension * Move helper functions out of lab_ui, add function to display consolidated table text for object * add button to export cubemap * fix entering and exiting the lab * refactor some of this for greater cleanness * use techroom lighting when no mission background is set * minor things * add imguizmo * add imguizmo * Add imgui * migrate render options * remove wmcgui * Add subsystem selection and highlighting * Add a syntactic sugar extension for imgui * don't rebuild the mission list every frame * Move helper functions out of lab_ui, add function to display consolidated table text for object * add button to export cubemap * fix entering and exiting the lab * refactor some of this for greater cleanness * minor things * add imguizmo * add imguizmo * Add button to reset changes made in the render dialog * refactoring * unfuck rebase * fix issue with loose mission files * use with_CollapsingHeader for greater uniformity * add weapon selection functionality * make primaries and secondaries fire again * implement animation triggers * avoid crash when switching back and forth between ships with and without team colors * add control to set team color setting to renderer texture dialog * make sure the table text updates when the ship class changes * let rotating subsystems rotate * do not add imgui.h to pstypes * code cleanup * add subsys highlighter from fred * Highlight non-modelled subsystems as well * add cmdline flag to show the imgui demo dialogue * fix compiler warnings reported by CI * fix error when building the subsystem list * refactor variable/method naming * code cleanup * remove vestigial code * update to imgui 1.89.1 * add credits entry for imgui * use the imgui namespace * Separate the background dialog out into its own window * make sure the subsystem highlights are placed correctly Co-authored-by: Fabian Woltermann <[email protected]>
38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
// dear imgui: "null" example application
|
|
// (compile and link imgui, create context, run headless with NO INPUTS, NO GRAPHICS OUTPUT)
|
|
// This is useful to test building, but you cannot interact with anything here!
|
|
#include "imgui.h"
|
|
#include <stdio.h>
|
|
|
|
int main(int, char**)
|
|
{
|
|
IMGUI_CHECKVERSION();
|
|
ImGui::CreateContext();
|
|
ImGuiIO& io = ImGui::GetIO();
|
|
|
|
// Build atlas
|
|
unsigned char* tex_pixels = NULL;
|
|
int tex_w, tex_h;
|
|
io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h);
|
|
|
|
for (int n = 0; n < 20; n++)
|
|
{
|
|
printf("NewFrame() %d\n", n);
|
|
io.DisplaySize = ImVec2(1920, 1080);
|
|
io.DeltaTime = 1.0f / 60.0f;
|
|
ImGui::NewFrame();
|
|
|
|
static float f = 0.0f;
|
|
ImGui::Text("Hello, world!");
|
|
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
|
|
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
|
|
ImGui::ShowDemoWindow(NULL);
|
|
|
|
ImGui::Render();
|
|
}
|
|
|
|
printf("DestroyContext()\n");
|
|
ImGui::DestroyContext();
|
|
return 0;
|
|
}
|