FullscreenUI: Add horizontal padding to menu windows
This commit is contained in:
@ -703,7 +703,7 @@ void ImGuiFullscreen::EndFullscreenColumnWindow()
|
||||
|
||||
bool ImGuiFullscreen::BeginFullscreenWindow(float left, float top, float width, float height, const char* name,
|
||||
const ImVec4& background /* = HEX_TO_IMVEC4(0x212121, 0xFF) */,
|
||||
float rounding /*= 0.0f*/, float padding /*= 0.0f*/,
|
||||
float rounding /*= 0.0f*/, const ImVec2& padding /*= 0.0f*/,
|
||||
ImGuiWindowFlags flags /*= 0*/)
|
||||
{
|
||||
if (left < 0.0f)
|
||||
@ -718,14 +718,14 @@ bool ImGuiFullscreen::BeginFullscreenWindow(float left, float top, float width,
|
||||
|
||||
bool ImGuiFullscreen::BeginFullscreenWindow(const ImVec2& position, const ImVec2& size, const char* name,
|
||||
const ImVec4& background /* = HEX_TO_IMVEC4(0x212121, 0xFF) */,
|
||||
float rounding /*= 0.0f*/, float padding /*= 0.0f*/,
|
||||
float rounding /*= 0.0f*/, const ImVec2& padding /*= 0.0f*/,
|
||||
ImGuiWindowFlags flags /*= 0*/)
|
||||
{
|
||||
ImGui::SetNextWindowPos(position);
|
||||
ImGui::SetNextWindowSize(size);
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_WindowBg, background);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, LayoutScale(padding, padding));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, LayoutScale(padding));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, LayoutScale(rounding));
|
||||
|
||||
@ -1945,7 +1945,7 @@ bool ImGuiFullscreen::BeginHorizontalMenu(const char* name, const ImVec2& positi
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, LayoutScale(1.0f));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(item_spacing, 0.0f));
|
||||
|
||||
if (!BeginFullscreenWindow(position, size, name, UIBackgroundColor, 0.0f, 0.0f))
|
||||
if (!BeginFullscreenWindow(position, size, name, UIBackgroundColor, 0.0f, ImVec2()))
|
||||
return false;
|
||||
|
||||
ImGui::SetCursorPos(ImVec2((size.x - menu_width) * 0.5f, (size.y - menu_height) * 0.5f));
|
||||
|
||||
@ -35,6 +35,7 @@ static constexpr float LAYOUT_MENU_BUTTON_HEIGHT = 50.0f;
|
||||
static constexpr float LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY = 26.0f;
|
||||
static constexpr float LAYOUT_MENU_BUTTON_X_PADDING = 15.0f;
|
||||
static constexpr float LAYOUT_MENU_BUTTON_Y_PADDING = 10.0f;
|
||||
static constexpr float LAYOUT_MENU_WINDOW_X_PADDING = 12.0f;
|
||||
static constexpr float LAYOUT_FOOTER_PADDING = 10.0f;
|
||||
static constexpr float LAYOUT_FOOTER_HEIGHT = LAYOUT_MEDIUM_FONT_SIZE + LAYOUT_FOOTER_PADDING * 2.0f;
|
||||
static constexpr float LAYOUT_HORIZONTAL_MENU_HEIGHT = 320.0f;
|
||||
@ -162,10 +163,10 @@ void EndFullscreenColumnWindow();
|
||||
|
||||
bool BeginFullscreenWindow(float left, float top, float width, float height, const char* name,
|
||||
const ImVec4& background = HEX_TO_IMVEC4(0x212121, 0xFF), float rounding = 0.0f,
|
||||
float padding = 0.0f, ImGuiWindowFlags flags = 0);
|
||||
const ImVec2& padding = ImVec2(), ImGuiWindowFlags flags = 0);
|
||||
bool BeginFullscreenWindow(const ImVec2& position, const ImVec2& size, const char* name,
|
||||
const ImVec4& background = HEX_TO_IMVEC4(0x212121, 0xFF), float rounding = 0.0f,
|
||||
float padding = 0.0f, ImGuiWindowFlags flags = 0);
|
||||
const ImVec2& padding = ImVec2(), ImGuiWindowFlags flags = 0);
|
||||
void EndFullscreenWindow();
|
||||
|
||||
bool IsGamepadInputSource();
|
||||
|
||||
Reference in New Issue
Block a user