Skip to content

Commit d3468eb

Browse files
committed
Refactor Limit Scaling to Scale Percentage #2
1 parent 52de561 commit d3468eb

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

libs/s25main/Window.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Window
7878
DrawPoint GetDrawPos() const;
7979
/// Get the size of the window
8080
Extent GetSize() const;
81-
/// Get the Limit Factors for scaling
81+
/// Get the Scaling Percentage
8282
ScaleLimPercent GetScalePercentage() const;
8383
/// gets the extent of the window in absolute coordinates
8484
Rect GetDrawRect() const;
@@ -91,7 +91,7 @@ class Window
9191
void SetWidth(unsigned width) { Resize(Extent(width, size_.y)); }
9292
/// setzt die Höhe des Fensters
9393
void SetHeight(unsigned height) { Resize(Extent(size_.x, height)); }
94-
/// Set the Limit Factors for scaling
94+
/// Set the Scaling Percentage
9595
void SetScalePercentage(ScaleLimPercent scalePercentage);
9696
/// Sendet eine Tastaturnachricht an die Steuerelemente.
9797
bool RelayKeyboardMessage(KeyboardMsgHandler msg, const KeyEvent& ke);
@@ -293,7 +293,7 @@ class Window
293293
friend constexpr auto maxEnumValue(ButtonState) { return ButtonState::Pressed; }
294294
using ControlMap = std::map<unsigned, Window*>;
295295

296-
/// scales X- and Y values to fit the screen, additionally considering a limiting factor for size
296+
/// scales X- and Y values to fit the screen, additionally considering a scaling percentage for size
297297
template<class T_Pt>
298298
static T_Pt Scale(const T_Pt& pt, const ScaleLimPercent& scalePercentage = ScaleLimPercent(100, 100));
299299
/// scales X- and Y values of pos_ and size_, additionally considering scalePercentage_ for size_ scaling

libs/s25main/controls/ctrlButton.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#include "drivers/VideoDriverWrapper.h"
99

1010
ctrlButton::ctrlButton(Window* parent, unsigned id, const DrawPoint& pos, const Extent& size, TextureColor tc,
11-
const std::string& tooltip, const ScaleLimPercent& factors)
12-
: Window(parent, id, pos, size, factors), ctrlBaseTooltip(tooltip), tc(tc), state(ButtonState::Up), hasBorder(true),
11+
const std::string& tooltip, const ScaleLimPercent& scalePercentage)
12+
: Window(parent, id, pos, size, scalePercentage), ctrlBaseTooltip(tooltip), tc(tc), state(ButtonState::Up), hasBorder(true),
1313
isChecked(false), isIlluminated(false), isEnabled(true)
1414
{}
1515

0 commit comments

Comments
 (0)