Commit Graph

283 Commits (eca73a810c19ed5cfb3f24cb5560d0735e19ea00)

Author SHA1 Message Date
Rubidium 9c7a7b53a1 Codechange: use a contructor for NewsItem to set the values
And use std::unique_ptr to manage the memory of the allocated data
3 years ago
rubidium42 aa9818db90 Codechange: create a type for the "free_data" of NewsItems and (de)allocate it with new and delete 3 years ago
Rubidium 281a65b3e1 Cleanup: simplify some boolean expressions 3 years ago
Patric Stout 921ab68a48
Codechange: use AsIntSetting()->Read() wrapper if possible (#9324) 3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 3 years ago
rubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 3 years ago
rubidium42 8ffb4122df Codechange: just pass the SettingDesc to SetSettingValue and remove distinction between (non)company 3 years ago
PeterN 7b7dbbc935
Fix #9063: Caption of news window incorrectly aligned. (#9252) 3 years ago
PeterN 330a305c99
Fix: Apply unscaled padding to Viewport inside WWT_INSET. (#9219)
Since pixel dimensions in SetPadding() are scaled by GUI size, padding for inset viewports was excessive.

Instead, automatically apply padding for WWT_INSET at widget level. This applies to all widgets inside a WWT_INSET, which in all instances is a NWID_VIEWPORT.
3 years ago
Peter Nelson 51b4bd6c38 Codechange: Add widget text colour override property. 3 years ago
Peter Nelson 636e37d183 Codechange: Add internal widget alignment property, along with widget part. 3 years ago
Peter Nelson 2a0365b3d9 Cleanup: Remove unnecessary parameter of GetScrolledRowFromWidget()
Line height defaults to the resize height of the relevant widget, which is
set in all cases. Therefore it is not necessary to specify this value every time.

Additionally fixes scrolled padding for the framerate window.
3 years ago
frosch d9b4413bc9
Codechange: rename sound ids to make more sense. (#8701) 3 years ago
Jonathan G Rennison 55ed7d16f7
Fix: Unnecessary status bar redraws when there is no news to show (#8691)
InvalidateWindowData with mode SBI_NEWS_DELETED was called on the
status bar when checking for a new item of news to be shown in the
ticker, even if there is no news queued and no change occurs.
3 years ago
Charles Pigott 8121706b89 Fix #8620: Scale spacing between date & news in history window according to font scaling 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 4 years ago
dP 0110fa12da Feature: Make news and errors close hotkeys configurable 4 years ago
TechGeekNZ a10013dd00 Codechange: Spell 'Viewport' consistently
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
Charles Pigott 4c45448fa9 Fix #8129: Crash if a news message expires while viewing the endgame screen 4 years ago
TechGeekNZ 8652a4db76 Cleanup: Give `SetDirtyBlocks` a more descriptive name. 4 years ago
Charles Pigott 7191360754 Change: Keep News Window usable by only storing the 1024 latest news messages 4 years ago
stormcone 798e9ee93e Feature: Add a button to the vehicle advisory news window to open the group window. 5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
Johannes E. Krause 1978b9122b Fix #7737, afbf6a5: missing return 5 years ago
Johannes E. Krause afbf6a5918 Feature: Allow showing Newspaper and Ticker messages in parallel 5 years ago
Charles Pigott 47d0d86a3c Fix #7255: Prevent crashlog corruption by only printing the 32 most recent news messages 5 years ago
Niels Martin Hansen 58609e8fa6 Fix: Manager name in company news was being clipped 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
peter1138 317f69c152 Codechange: Use override specifier in Window-derived classes. 5 years ago
Peter Nelson 806e7d25dd Change: Use GUITimer class instead of bare int/uints. 6 years ago
Peter Nelson 2a8fa5fef9 Change: Split up Window::OnTick into OnGameTick and OnRealtimeTick. Adjust timers to work with milliseconds instead of ticks. 6 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
Charles Pigott 62d79900ec Add: List recent news messages in crashlog output 6 years ago
peter1138 d51defb0b9 (svn r27838) -Fix: Small news window's fake caption (r19943) was not sized to fit its text. 7 years ago
peter1138 5a924dcbbc (svn r26965) -Codechange: Add palette bit to indicate that palette is actually a text colour remap, and draw closebox as a sprite, using said bit. Change news popup to use closebox widget for its closebox. 10 years ago
peter1138 49a4a5958d (svn r26953) -Codechange: GUI-scale for company manager face on news popup. 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
michi_cc b911f4a452 (svn r25668) -Codechange: Pass proper Unicode UCS-4 characters instead of just UCS-2 to the window key press handlers. 11 years ago
frosch e184b9799c (svn r25533) -Codechange: Use SetCapacityFromWidget more often. 11 years ago
frosch 4e4e635916 (svn r25294) -Feature: Add another button to window title bars to resize the window to its default size. 11 years ago
frosch 8157a8afd8 (svn r25290) -Add: Assign string names to notable windows. 11 years ago
frosch 56e4a8c4d6 (svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction. 11 years ago
frosch b09743f3e8 (svn r25093) -Fix [FS#5486]: Clicking the statusbar crashed, when news were pending but no news were shown yet. (3298) 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
frosch 3ce8d2ce70 (svn r24846) -Add: Advanced settings to disable certain sound effects. 12 years ago
frosch 345c3203d7 (svn r24845) -Add: News ticker sound setting to adv. settings window. 12 years ago