mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Adjusted the size and position of the various menus.
This commit is contained in:
parent
8f3ea88b7a
commit
d6eba6ae24
|
@ -51,7 +51,7 @@ void GuiGamelistFilter::initializeMenu()
|
|||
mMenu.addButton("BACK", "back", std::bind(&GuiGamelistFilter::applyFilters, this));
|
||||
|
||||
mMenu.setPosition((Renderer::getScreenWidth() - mMenu.getSize().x()) / 2.0f,
|
||||
Renderer::getScreenHeight() * 0.15f);
|
||||
Renderer::getScreenHeight() * 0.13f);
|
||||
|
||||
// Save the initial filter values to be able to check later if any changes were made.
|
||||
mInitialTextFilter = mTextFilterField->getValue();
|
||||
|
|
|
@ -70,8 +70,8 @@ GuiMenu::GuiMenu(Window* window) : GuiComponent(window),
|
|||
addChild(&mMenu);
|
||||
addVersionInfo();
|
||||
setSize(mMenu.getSize());
|
||||
setPosition((Renderer::getScreenWidth() - mSize.x()) / 2,
|
||||
Renderer::getScreenHeight() * 0.15f);
|
||||
setPosition((Renderer::getScreenWidth() - mSize.x()) / 2.0f,
|
||||
Renderer::getScreenHeight() * 0.13f);
|
||||
}
|
||||
|
||||
GuiMenu::~GuiMenu()
|
||||
|
|
|
@ -107,7 +107,7 @@ GuiScraperMenu::GuiScraperMenu(Window* window, std::string title)
|
|||
setSize(mMenu.getSize());
|
||||
|
||||
setPosition((Renderer::getScreenWidth() - mSize.x()) / 2,
|
||||
Renderer::getScreenHeight() * 0.15f);
|
||||
Renderer::getScreenHeight() * 0.13f);
|
||||
}
|
||||
|
||||
GuiScraperMenu::~GuiScraperMenu()
|
||||
|
|
|
@ -41,7 +41,8 @@ GuiSettings::GuiSettings(
|
|||
|
||||
setSize(static_cast<float>(Renderer::getScreenWidth()),
|
||||
static_cast<float>(Renderer::getScreenHeight()));
|
||||
mMenu.setPosition((mSize.x() - mMenu.getSize().x()) / 2, Renderer::getScreenHeight() * 0.15f);
|
||||
mMenu.setPosition((mSize.x() - mMenu.getSize().x()) / 2.0f,
|
||||
Renderer::getScreenHeight() * 0.13f);
|
||||
}
|
||||
|
||||
GuiSettings::~GuiSettings()
|
||||
|
|
|
@ -81,9 +81,9 @@ float MenuComponent::getButtonGridHeight() const
|
|||
|
||||
void MenuComponent::updateSize()
|
||||
{
|
||||
const float maxHeight = Renderer::getScreenHeight() * 0.75f;
|
||||
const float maxHeight = Renderer::getScreenHeight() * 0.80f;
|
||||
float height = TITLE_HEIGHT + mList->getTotalRowHeight() + getButtonGridHeight() +
|
||||
(2 * Renderer::getScreenHeightModifier());
|
||||
(2.0f * Renderer::getScreenHeightModifier());
|
||||
if (height > maxHeight) {
|
||||
height = TITLE_HEIGHT + getButtonGridHeight();
|
||||
int i = 0;
|
||||
|
@ -107,7 +107,7 @@ void MenuComponent::onSizeChanged()
|
|||
{
|
||||
mBackground.fitTo(mSize, Vector3f::Zero(), Vector2f(-32, -32));
|
||||
|
||||
// Update grid row/col sizes.
|
||||
// Update grid row/column sizes.
|
||||
mGrid.setRowHeightPerc(0, TITLE_HEIGHT / mSize.y());
|
||||
mGrid.setRowHeightPerc(2, getButtonGridHeight() / mSize.y());
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class MenuComponent : public GuiComponent
|
|||
public:
|
||||
MenuComponent(Window* window, std::string title,
|
||||
const std::shared_ptr<Font>& titleFont = Font::get(FONT_SIZE_LARGE));
|
||||
virtual ~MenuComponent(); // just calls save();
|
||||
virtual ~MenuComponent();
|
||||
|
||||
void save();
|
||||
void onSizeChanged() override;
|
||||
|
|
|
@ -366,8 +366,8 @@ private:
|
|||
});
|
||||
}
|
||||
|
||||
mMenu.setPosition((Renderer::getScreenWidth() - mMenu.getSize().x()) / 2,
|
||||
Renderer::getScreenHeight() * 0.15f);
|
||||
mMenu.setPosition((Renderer::getScreenWidth() - mMenu.getSize().x()) / 2.0f,
|
||||
Renderer::getScreenHeight() * 0.13f);
|
||||
addChild(&mMenu);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue