Use icon instead of text, changed tooltip text
This commit is contained in:
@@ -171,7 +171,7 @@ public class ProfilePanel
|
|||||||
ImGui.PushStyleColor(ImGuiCol.Text, Constants.Colors.Warning);
|
ImGui.PushStyleColor(ImGuiCol.Text, Constants.Colors.Warning);
|
||||||
ImGuiUtil.PrintIcon(FontAwesomeIcon.ExclamationTriangle);
|
ImGuiUtil.PrintIcon(FontAwesomeIcon.ExclamationTriangle);
|
||||||
ImGui.PopStyleColor();
|
ImGui.PopStyleColor();
|
||||||
ImGuiUtil.HoverTooltip("Can only be changed while currently selected and the default profiles are disabled.");
|
ImGuiUtil.HoverTooltip("Can only be changed when currently selected and the default profiles are disabled.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -282,20 +282,18 @@ public class ProfilePanel
|
|||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
||||||
var disabledCondition = _templateEditorManager.IsEditorActive || template.IsWriteProtected;
|
var disabledCondition = _templateEditorManager.IsEditorActive || template.IsWriteProtected;
|
||||||
using (var disabled = ImRaii.Disabled(disabledCondition))
|
|
||||||
{
|
if (ImGuiUtil.DrawDisabledButton(FontAwesomeIcon.Edit.ToIconString(), new Vector2(ImGui.GetFrameHeight()), "Open this template in the template editor", disabledCondition, true))
|
||||||
if (ImGui.Button("Open in editor"))
|
|
||||||
_templateEditorEvent.Invoke(TemplateEditorEvent.Type.EditorEnableRequested, template);
|
_templateEditorEvent.Invoke(TemplateEditorEvent.Type.EditorEnableRequested, template);
|
||||||
ImGuiUtil.HoverTooltip("Open this template in the template editor");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (disabledCondition)
|
if (disabledCondition)
|
||||||
{
|
{
|
||||||
|
//todo: make helper
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.PushStyleColor(ImGuiCol.Text, Constants.Colors.Warning);
|
ImGui.PushStyleColor(ImGuiCol.Text, Constants.Colors.Warning);
|
||||||
ImGuiUtil.PrintIcon(FontAwesomeIcon.ExclamationTriangle);
|
ImGuiUtil.PrintIcon(FontAwesomeIcon.ExclamationTriangle);
|
||||||
ImGui.PopStyleColor();
|
ImGui.PopStyleColor();
|
||||||
ImGuiUtil.HoverTooltip("Can not be edited because this template is either write protected or template editor is already enabled.");
|
ImGuiUtil.HoverTooltip("This template cannot be edited because it is either write protected or you are already editing one of the templates.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user