|
|
@ -2905,7 +2905,8 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) |
|
|
|
ImGui::InputFloat("Font offset", &font->DisplayOffset.y, 1, 1, "%.0f"); |
|
|
|
ImGui::Text("Ascent: %f, Descent: %f, Height: %f", font->Ascent, font->Descent, font->Ascent - font->Descent); |
|
|
|
ImGui::Text("Fallback character: '%c' (%d)", font->FallbackChar, font->FallbackChar); |
|
|
|
ImGui::Text("Texture surface: %d pixels (approx) ~ %dx%d", font->MetricsTotalSurface, (int)sqrtf((float)font->MetricsTotalSurface), (int)sqrtf((float)font->MetricsTotalSurface)); |
|
|
|
const float surface_sqrt = sqrtf((float)font->MetricsTotalSurface); |
|
|
|
ImGui::Text("Texture surface: %d pixels (approx) ~ %dx%d", font->MetricsTotalSurface, (int)surface_sqrt, (int)surface_sqrt); |
|
|
|
for (int config_i = 0; config_i < font->ConfigDataCount; config_i++) |
|
|
|
if (ImFontConfig* cfg = &font->ConfigData[config_i]) |
|
|
|
ImGui::BulletText("Input %d: \'%s\', Oversample: (%d,%d), PixelSnapH: %d", config_i, cfg->Name, cfg->OversampleH, cfg->OversampleV, cfg->PixelSnapH); |
|
|
@ -3797,10 +3798,12 @@ static void ShowExampleAppSimpleOverlay(bool* p_open) |
|
|
|
const float DISTANCE = 10.0f; |
|
|
|
static int corner = 0; |
|
|
|
ImGuiIO& io = ImGui::GetIO(); |
|
|
|
if (corner != -1) |
|
|
|
{ |
|
|
|
ImVec2 window_pos = ImVec2((corner & 1) ? io.DisplaySize.x - DISTANCE : DISTANCE, (corner & 2) ? io.DisplaySize.y - DISTANCE : DISTANCE); |
|
|
|
ImVec2 window_pos_pivot = ImVec2((corner & 1) ? 1.0f : 0.0f, (corner & 2) ? 1.0f : 0.0f); |
|
|
|
if (corner != -1) |
|
|
|
ImGui::SetNextWindowPos(window_pos, ImGuiCond_Always, window_pos_pivot); |
|
|
|
} |
|
|
|
ImGui::SetNextWindowBgAlpha(0.3f); // Transparent background
|
|
|
|
if (ImGui::Begin("Example: Simple overlay", p_open, (corner != -1 ? ImGuiWindowFlags_NoMove : 0) | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav)) |
|
|
|
{ |
|
|
|