Merge branch 'master' of https://gogs.theasuro.de/asuro/AsuroImgui
This commit is contained in:
@@ -66,6 +66,26 @@ time_t getDayStartOf(time_t time)
|
||||
return mktime(&localTime);
|
||||
}
|
||||
|
||||
void dropShadow(float size, ImColor color)
|
||||
{
|
||||
ImDrawList* windowDrawList = ImGui::GetWindowDrawList();
|
||||
ImVec2 lastMin = ImGui::GetItemRectMin();
|
||||
ImVec2 lastMax = ImGui::GetItemRectMax();
|
||||
|
||||
windowDrawList->AddQuadFilled(
|
||||
{ lastMin.x, lastMax.y },
|
||||
{ lastMax.x, lastMax.y },
|
||||
{ lastMax.x + size, lastMax.y + size },
|
||||
{ lastMin.x + size, lastMax.y + size },
|
||||
color);
|
||||
windowDrawList->AddQuadFilled(
|
||||
{ lastMax.x, lastMin.y },
|
||||
{ lastMax.x + size, lastMin.y + size },
|
||||
{ lastMax.x + size, lastMax.y + size },
|
||||
{ lastMax.x, lastMax.y },
|
||||
color);
|
||||
}
|
||||
|
||||
void init(DrawData& drawData, ApplicationData& appData)
|
||||
{
|
||||
std::wstring appPath;
|
||||
@@ -446,6 +466,7 @@ ImVec2 timerWindow(DrawData& drawData, ApplicationData& appData)
|
||||
appData.settings.timerDuration -= 60.f;
|
||||
if (appData.settings.timerDuration < 0.) appData.settings.timerDuration = 0.f;
|
||||
}
|
||||
dropShadow(3.f, { 1.f, 1.f, 1.f, .3f });
|
||||
|
||||
ImGui::SameLine();
|
||||
const char* durationFormatStr = "%.0fm";
|
||||
|
||||
Reference in New Issue
Block a user