Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libs/s25main/ingameWindows/IngameWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ Extent IngameWindow::GetIwSize() const
return Extent(GetSize().x - contentOffset.x - contentOffsetEnd.x, iwHeight);
}

Extent IngameWindow::GetFullSize() const
{
return Extent(GetSize().x, contentOffset.y + contentOffsetEnd.y + iwHeight);
}

DrawPoint IngameWindow::GetRightBottomBoundary()
{
return DrawPoint(GetSize() - contentOffsetEnd);
Expand Down
2 changes: 2 additions & 0 deletions libs/s25main/ingameWindows/IngameWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class IngameWindow : public Window
void SetIwSize(const Extent& newSize);
/// Get the size of the (expanded) content area
Extent GetIwSize() const;
/// Get the full size of the window, even when minimized
Extent GetFullSize() const;
/// Get the current lower right corner of the content area
DrawPoint GetRightBottomBoundary();

Expand Down
6 changes: 3 additions & 3 deletions libs/s25main/ingameWindows/iwBuildings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ iwBuildings::iwBuildings(GameWorldView& gwv, GameCommandFactory& gcFactory)
}
}

// Hilfe-Button
// "Help" button
Comment thread
falbrechtskirchinger marked this conversation as resolved.
Extent btSize = Extent(30, 32);
AddImageButton(32, GetSize() - DrawPoint(14, 20) - btSize, btSize, TextureColor::Grey, LOADER.GetImageN("io", 225),
_("Help"));
AddImageButton(32, GetFullSize() - DrawPoint(14, 20) - btSize, btSize, TextureColor::Grey,
LOADER.GetImageN("io", 225), _("Help"));
}

/// Anzahlen der Gebäude zeichnen
Expand Down
10 changes: 5 additions & 5 deletions libs/s25main/ingameWindows/iwDistribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ iwDistribution::iwDistribution(const GameWorldViewer& gwv, GameCommandFactory& g
tab->SetSelection(0);

const Extent btSize(32, 32);
// Hilfe
AddImageButton(2, DrawPoint(15, GetSize().y - 15 - btSize.y), btSize, TextureColor::Grey,
// "Help" button
AddImageButton(2, DrawPoint(15, GetFullSize().y - 15 - btSize.y), btSize, TextureColor::Grey,
LOADER.GetImageN("io", 225), _("Help"));
// Standardbelegung
AddImageButton(10, GetSize() - DrawPoint::all(15) - btSize, btSize, TextureColor::Grey, LOADER.GetImageN("io", 191),
_("Default"));
// "Default" button
AddImageButton(10, GetFullSize() - DrawPoint::all(15) - btSize, btSize, TextureColor::Grey,
LOADER.GetImageN("io", 191), _("Default"));

iwDistribution::UpdateSettings();
}
Expand Down
12 changes: 6 additions & 6 deletions libs/s25main/ingameWindows/iwWares.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ iwWares::iwWares(unsigned id, const DrawPoint& pos, const Extent& size, const st
}
}

// "Blättern"
AddImageButton(0, DrawPoint(52, GetSize().y - 47), Extent(66, 32), TextureColor::Grey, LOADER.GetImageN("io", 84),
_("Next page"));
// Hilfe
AddImageButton(12, DrawPoint(16, GetSize().y - 47), Extent(32, 32), TextureColor::Grey, LOADER.GetImageN("io", 225),
_("Help"));
// "Next page" button
AddImageButton(0, DrawPoint(52, GetFullSize().y - 47), Extent(66, 32), TextureColor::Grey,
LOADER.GetImageN("io", 84), _("Next page"));
// "Help" button
AddImageButton(12, DrawPoint(16, GetFullSize().y - 47), Extent(32, 32), TextureColor::Grey,
LOADER.GetImageN("io", 225), _("Help"));

waresPage.SetVisible(true);
curPage_ = warePageID;
Expand Down