Age | Commit message (Collapse) | Author |
|
Immediately show a new message
if present if no news window is open, or has just been closed instead of waiting for the
timer of the current news to time out.
|
|
the first time (_latest_news
is INVALID_NEWS), make it the value of _oldest_news, not zero as DeleteVehicleNews can
change _oldest_news. Also remove the (i == INVALID_NEWS) return 0; guard from increaseIndex
as it's only used in 2 places, nowhere else.
|
|
fifo-array was full. Update the
bound conditions of the loop, add an assert and also update _current_news when needed. (r3757)
|
|
s/MoveToNexItem/MoveToNextItem/.
|
|
some minor other things
|
|
decreaseIndex to loop through the
fifo-array-buffer, typo's.
|
|
(r3757).
|
|
Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
|
|
WWT_INSET (credits to peter1138
for the aptly found name)
-Codechange: Remove the explicit numbering from WindowWidgetTypes
|
|
is only plain panel,
WWT_IMGBTN must contain an image for drawing. Renamed WWT_PANEL_2 to WWT_IMGBTN_2
because that is what it is. Added WWT_PUSHBTN that is either just a pushable button,
or a textbutton, which text's drawn dynamically independent of widget.
|
|
The last parameter should point to the end of the buffer (eg lastof(buf))
Courtesy of Tron.
|
|
|
|
windows
|
|
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
|
|
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
|
|
WindowEvent, which is now a struct
|
|
more uniform.
-Cleanup: whitespace alignment of a few tables.
|
|
label
CodeChange : Move almost all fixed strings from ON_PAINT event to Widget array using WWT_LABEL.
Feature : All "Select Refit Cargo" are now centered, instead of been left aligned
|
|
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
|
|
the offset since 1920
-Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
|
|
holding years; rename these variables to match this.
|
|
date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
|
|
|
|
scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
|
|
|
|
|
|
|
|
This is used to delete
- all news about a vehicle, when it gets deleted
- "vehicle has stopped in depot" news, when it gets started
- "vehicle has invalid orders" news, when the orders get changed
|
|
|
|
their actual use, and add "Close Window" tooltip where missing.
|
|
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
|
|
- const, whitespace, indentation, bracing, GB/SB, pointless casts
- use the trinary operator where appropriate
- data types (uint[] -> AcceptedCargo, ...)
- if cascade -> switch
- if (ptr) -> if (ptr != NULL)
- DeMorgan's Law
- Fix some comments
- 0 -> '\0', change magic numbers to symbolic constants
|
|
int/uint/int16/byte/-1 with proper types and constants
|
|
|
|
|
|
|
|
|
|
|
|
newsmessage-history window as well
|
|
|
|
'flags' parameter of DrawFrameRect(). (_Abraxa_)
|
|
|
|
can turn off the telegraphc ticker sound for summarized messages, or turn off news-messages altogether (you get a red blot to notify you though). The [<][>] set the settings in one way, while clicking on the option itself, cycles it. This commit also 'fixes' bugs [1166973], [1121484] and patch [1169930].
- I also changed an order of strings from On, Off to Off, On, so this can be used ingame with the WWT_4 widget type.
- Since the newssettings now take 2 bits per setting (off/summary/on) _news_display_opt is widened to 32 bits and the settings code changed slightly to accomodate for a maximum of 16 message-types.
|
|
- CodeChange: Introduction of SendWindowMessage() where a window can send another window a message (ala windows style msg, wparam, lparam). Messages can be sent by windowclass and by windowpointer.
- CodeChange: IsVitalWindow() simplifies a lot of checks for window handling that need to know what windows it can close, or be on top of, etc.
|
|
handling of text with that of editboxes
- Codechange: Introduction of Textbuf struct which not only holds physical data as length but also pixel-constrains (width) and information about the caret
- Codechange: Move Clipboard function to OS specific file. Currently only Windows has clipboard actions
- Feature: Editboxes, console and exit screen also accept the numeric-enter as a yes
- Feature: Navigation through text with cursor keys is possible, as well as arbitrary insertion (also paste) and deletion; both backspace and del keys. Functions DeleteTextBufferChar, InsertTextBufferChar and InsertTextBufferClipboard handle input and deletion. Navigation is done through MoveTextBufferPos.
- Fix: OTTD crash when opening 'add server' editbox
- CodeChange: fix up some stringwidth calculations in gfx.c. You can get the width in pixels of a character by calling GetCharacterWidth().
|
|
|
|
|
|
new header (though i think some of these function don't belong into strings.c)
|
|
The news messages are now precisely cropped according to pixel width to fit optimal into the window.
Introduced a new date format: DATE_TINY, which is ISOish.
|
|
|