Background color change, better keybinds
Some checks failed
Run Build / run-build-debian (push) Failing after 56s
Run Build / run-build-arch (push) Failing after 1m1s
Run Build / run-build-ubuntu (push) Failing after 1m6s

This commit is contained in:
2025-07-06 12:01:09 -04:00
parent fd3437d65b
commit c918665f6a
3 changed files with 213 additions and 164 deletions

View File

@ -58,6 +58,7 @@ struct Context
float DefaultPanelHeight = 600; // Height of panel in pixels
float DefaultInitialPanelWidth = 600; // Only applies when window first appears
int MaxAnnotations = 1000; // Limit number of texel annotations for performance
float InitialZoom = 1.0f;
};
Context *GContext = nullptr;
@ -191,7 +192,7 @@ bool BeginInspectorPanel(const char *title, ImTextureID texture, ImVec2 textureS
}
else if (justCreated)
{
newScale = 1;
newScale = GContext->InitialZoom;
}
if (newScale != -1)
@ -684,6 +685,11 @@ void SetZoomRate(float rate)
GContext->ZoomRate = rate;
}
void SetInitialZoom(float zoom)
{
GContext->InitialZoom = zoom;
}
//-------------------------------------------------------------------------
// [SECTION] Life Cycle
//-------------------------------------------------------------------------

View File

@ -32,7 +32,7 @@ enum InspectorAlphaMode
typedef ImU64 InspectorFlags;
enum InspectorFlags_
{
InspectorFlags_ShowWrap = 1 << 0, // Draw beyong the [0,1] uv range. What you see will depend on API
InspectorFlags_ShowWrap = 1 << 0, // Draw beyond the [0,1] uv range. What you see will depend on API
InspectorFlags_NoForceFilterNearest = 1 << 1, // Normally we force nearest neighbour sampling when zoomed in. Set to disable this.
InspectorFlags_NoGrid = 1 << 2, // By default a grid is shown at high zoom levels
InspectorFlags_NoTooltip = 1 << 3, // Disable tooltip on hover
@ -132,6 +132,7 @@ void DrawAlphaModeSelector(); // A combo box for selecting the alpha mode
* scroll will increase zoom level by 50%. The factor used for zooming out is
* 1/factor. */
void SetZoomRate(float factor);
void SetInitialZoom(float zoom);
//-------------------------------------------------------------------------
// [SECTION] ANNOTATION TOOLS