Background color change, better keybinds
This commit is contained in:
@ -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
|
||||
//-------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user