mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-09 22:03:58 +00:00
[client] egl: warn when attempting to save without preset selected
This commit is contained in:
parent
1717555187
commit
8a2ae6860e
1 changed files with 7 additions and 2 deletions
|
@ -339,8 +339,13 @@ static bool presetsUI(struct EGL_PostProcess * this)
|
||||||
|
|
||||||
igSameLine(0.0f, -1.0f);
|
igSameLine(0.0f, -1.0f);
|
||||||
|
|
||||||
if (igButton("Save preset", (ImVec2) { 0.0f, 0.0f }) && this->activePreset >= 0)
|
if (igButton("Save preset", (ImVec2) { 0.0f, 0.0f }))
|
||||||
|
{
|
||||||
|
if (this->activePreset >= 0)
|
||||||
savePreset(this, stringlist_at(this->presets, this->activePreset));
|
savePreset(this, stringlist_at(this->presets, this->activePreset));
|
||||||
|
else
|
||||||
|
presetError(this, strdup("You must select a preset to save."));
|
||||||
|
}
|
||||||
|
|
||||||
if (igIsItemHovered(ImGuiHoveredFlags_None) && this->activePreset >= 0)
|
if (igIsItemHovered(ImGuiHoveredFlags_None) && this->activePreset >= 0)
|
||||||
igSetTooltip("This will overwrite the preset named: %s",
|
igSetTooltip("This will overwrite the preset named: %s",
|
||||||
|
|
Loading…
Reference in a new issue