summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/newgrf_commons.h6
-rw-r--r--src/textfile_gui.h24
2 files changed, 18 insertions, 12 deletions
diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h
index 5721b7eb2..a5cedf429 100644
--- a/src/newgrf_commons.h
+++ b/src/newgrf_commons.h
@@ -228,6 +228,7 @@ class HouseOverrideManager : public OverrideManagerBase {
public:
HouseOverrideManager(uint16 offset, uint16 maximum, uint16 invalid) :
OverrideManagerBase(offset, maximum, invalid) {}
+
void SetEntitySpec(const HouseSpec *hs);
};
@@ -238,8 +239,9 @@ public:
IndustryOverrideManager(uint16 offset, uint16 maximum, uint16 invalid) :
OverrideManagerBase(offset, maximum, invalid) {}
- virtual uint16 AddEntityID(byte grf_local_id, uint32 grfid, byte substitute_id);
- virtual uint16 GetID(uint8 grf_local_id, uint32 grfid) const;
+ uint16 AddEntityID(byte grf_local_id, uint32 grfid, byte substitute_id) override;
+ uint16 GetID(uint8 grf_local_id, uint32 grfid) const override;
+
void SetEntitySpec(IndustrySpec *inds);
};
diff --git a/src/textfile_gui.h b/src/textfile_gui.h
index 9495fa3f0..b7bcb2db7 100644
--- a/src/textfile_gui.h
+++ b/src/textfile_gui.h
@@ -32,17 +32,21 @@ struct TextfileWindow : public Window, MissingGlyphSearcher {
static const int BOTTOM_SPACING = WD_FRAMETEXT_BOTTOM; ///< Additional spacing at the bottom of the #WID_TF_BACKGROUND widget.
TextfileWindow(TextfileType file_type);
- virtual ~TextfileWindow();
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize);
- virtual void OnClick(Point pt, int widget, int click_count);
- virtual void DrawWidget(const Rect &r, int widget) const;
- virtual void OnResize();
- virtual void Reset();
- virtual FontSize DefaultSize();
- virtual const char *NextString();
- virtual bool Monospace();
- virtual void SetFontNames(FreeTypeSettings *settings, const char *font_name);
+ ~TextfileWindow();
+
+ void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override;
+ void OnClick(Point pt, int widget, int click_count) override;
+ void DrawWidget(const Rect &r, int widget) const override;
+ void OnResize() override;
+
+ void Reset() override;
+ FontSize DefaultSize() override;
+ const char *NextString() override;
+ bool Monospace() override;
+ void SetFontNames(FreeTypeSettings *settings, const char *font_name) override;
+
virtual void LoadTextfile(const char *textfile, Subdirectory dir);
+
private:
uint GetContentHeight();
void SetupScrollbars();