Commit Graph

10 Commits (jgrpp)

Author SHA1 Message Date
Peter Nelson 4bf9c123d3 Fix: TextfileWindow called virtual methods before constructor completed. (#11889)
SetStringParameters() was called during widget tree init in the constructor.

Calls within a constructor cannot call the derived classes methods. This would result in invalid data being passed to the string system, which could then crash.

(cherry picked from commit fef0bfcfd3)
4 months ago
Peter Nelson 7737aa6640 Codechange: Make all NWidgetPart arrays constexpr.
This ensures that the arrays are not created at runtime and prevents using non-constexpr values.
4 months ago
Peter Nelson 71aaed860b
Codechange: Missing some conversions to WidgetID. (#11773) 4 months ago
Peter Nelson a0dfb76e34 Codechange: Replace mishmash of types for widget index with WidgetID.
Indices were stored as int, but often passed around as uint/uint8_t and casts.

Now they should all use WidgetID.
5 months ago
Peter Nelson fd84f73323
Fix #11643: Empty area at top of survey preview. (#11647)
Empty area at the top of some textfile windows due to calling
SetDisplayedPlane() after calling FinishInitNested(), and/or changing
the displayed plane and not calling ReInit() after.

This was previously hidden by CheckForMissingGlyphs() reinitialising
all windows anyway.
5 months ago
rubidium42 27082f9efa Codechange: pass std::string references to OpenBrowser 6 months ago
Peter Nelson 90bd8e64d8 Change: Simplify help window widgets and use sparse padding. 7 months ago
Peter Nelson 18fb8e153f Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.
This is to allow unit-tests to produce more useful output.
7 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 8 months ago
Niels Martin Hansen 41de0d46f3 Feature: Help and manuals access window 8 months ago