Removed bool return value from BegniPopup() at the moment, it is meaningless. Tidying up.

This commit is contained in:
ocornut 2015-03-26 19:18:06 +00:00
parent 4b7818dfc2
commit e1de4908f6
2 changed files with 8 additions and 7 deletions

View File

@ -2742,8 +2742,8 @@ int ImGui::GetFrameCount()
void ImGui::BeginTooltip()
{
ImGuiState& g = *GImGui;
ImGuiWindowFlags window_flags = ImGuiWindowFlags_Tooltip|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_AlwaysAutoResize;
ImGui::Begin("##Tooltip", NULL, ImVec2(0,0), g.Style.Colors[ImGuiCol_TooltipBg].w, window_flags);
ImGuiWindowFlags flags = ImGuiWindowFlags_Tooltip|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_AlwaysAutoResize;
ImGui::Begin("##Tooltip", NULL, ImVec2(0,0), g.Style.Colors[ImGuiCol_TooltipBg].w, flags);
}
void ImGui::EndTooltip()
@ -2752,12 +2752,13 @@ void ImGui::EndTooltip()
ImGui::End();
}
bool ImGui::BeginPopup(bool* p_opened)
void ImGui::BeginPopup(bool* p_opened)
{
IM_ASSERT(p_opened != NULL); // Must provide a bool at the moment
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
bool ret = ImGui::Begin("##Popup", p_opened, ImGuiWindowFlags_Popup|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_AlwaysAutoResize);
return ret;
ImGuiWindowFlags flags = ImGuiWindowFlags_Popup|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_AlwaysAutoResize;
ImGui::Begin("##Popup", p_opened, flags);
}
void ImGui::EndPopup()
@ -9469,7 +9470,7 @@ void ImGui::ShowTestWindow(bool* opened)
ImGui::TreePop();
}
if (ImGui::TreeNode("Popup Menu"))
if (ImGui::TreeNode("Popup"))
{
static bool popup_open = false;
static int selected_fish = -1;

View File

@ -225,7 +225,7 @@ namespace ImGui
IMGUI_API void EndTooltip();
// Popup
IMGUI_API bool BeginPopup(bool* p_opened);
IMGUI_API void BeginPopup(bool* p_opened);
IMGUI_API void EndPopup();
// Layout