summaryrefslogtreecommitdiff
path: root/news_gui.c
AgeCommit message (Collapse)Author
2005-10-23(svn r3078) Some more stuff, which piled up:tron
- 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
2005-10-07(svn r3024) -Codechange: Another batch of replacements of ↵tron
int/uint/int16/byte/-1 with proper types and constants
2005-07-29(svn r2747) -Fix: r2736 broke the newpaper display. Sorry.celestar
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-21(svn r2660) Get rid of some more shifting/anding/castingtron
2005-07-17(svn r2611) - CodeChange: use standardized truncutation with the ↵Darkvater
newsmessage-history window as well
2005-06-20(svn r2465) Remove some unreachable codetron
2005-06-15(svn r2444) - CodeChange: Add an enum for demagicifying the values of the ↵hackykid
'flags' parameter of DrawFrameRect(). (_Abraxa_)
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-04-13(svn r2192) - Add greater control to the 'message options' window. Now you ↵Darkvater
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.
2005-04-05(svn r2152) - Fix: Chatbar in MP games is now on-top of the news window.darkvater
- 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.
2005-02-21(svn r1894) - Codechange: cleaned up the console a bit, wholly unified ↵Darkvater
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().
2005-02-07(svn r1840) Repel str_buffr and use local buffers where possibletron
2005-02-06(svn r1833) byte -> char transition: the resttron
2005-02-06(svn r1813) Declare functions implemented in strings.c in their own shiny ↵tron
new header (though i think some of these function don't belong into strings.c)
2005-01-22(svn r1598) Feature: Message history now is stickyable and resizeabledominik
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.
2005-01-22(svn r1596) Add some more staticstron
2005-01-08(svn r1423) Fix: [ 1084074 ] Delayed news messagesdominik
2005-01-06(svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns ↵truelight
and _industries (in prepare of dynamic arrays): - DEREF_XXX is changed into GetXXX - All direct call are directed via GetXXX - struct Industry has now an index-field - ENUM'd some stuff - Replaced home built loops with FOR_ALL_XXX - Added _stations_size, _vehicles_size, ... which gives the length of the array (which will be dynamic in the near future) - Changed lengtof(XXX) to _XXX_size (e.g. _stations_size) - Removed all endof(XXX) (because mostly it was part of a FOR_ALL_XXX) - Made the sort-functions of all 4 dynamic - Made all 4 Initialize functions more of the same - Some minor tab-fixing and stuff (tnx to Tron for proof-reading my 100kb patch ;)) Note for all: please do NOT directly call _stations, _vehicles, _towns and _industries, but use the right wrapper to access them. Thank you. Ps: please also do not use 'v++', where v is of type Vehicle *.
2005-01-04(svn r1379) -Fix: various GUI glitches. Added default sizes to various ↵darkvater
widgets. Sticky/Resize- and Scrollbar must be 11 pixels wide, Horizontal scrollbar 11 pixels high, caption must be 13 pixels. I hope I didn't forget any widgets, the game will assert for that so report them to me!
2005-01-03(svn r1348) -Feature: resizable windows. Read the comment in window.h to ↵truelight
find out how the system works. All useful windows are already made resizable. Enjoy :) -Fix: fixed some GUI-glitches and flaws along the way
2004-12-21(svn r1201) -Fix: I forgot to add a * in r1183 ;)truelight
2004-12-20(svn r1183) -Fix: Newsmessage-validation-pointer was never reset, causing ↵truelight
some nasty crashes (tnx to GeniusDex for the clear backtrace)
2004-12-19(svn r1170) Fix: news_gui.c should compile everywhere without warnings now.dominik
2004-12-19(svn r1167) Feature: Added the possibility to add validation functions to ↵dominik
NewsItems. This is now done for "Train in depot" messages. Before displaying such a message, it checks if the train really still is in the depot. Can be applied to other news items as well.
2004-12-04(svn r925) Use sound enumstron
Also play the correct sound when a toyland road vehicle breaks down
2004-12-02(svn r901) Small step in the process to clean up the DPARAM mess:tron
- reduce to 2 sizes (*DParam64 for 64bit values, *DParam for the rest) - use inline functions instead of macros - add assert()s to check for buffer overruns
2004-11-25(svn r815) Include strings.h only in the files which need it.tron
This should reduce the compile time after altering english.txt by about 1/3, because "only" 62 instead of 90 .c files must be recompiled.
2004-11-23(svn r787) Invert the sense of the DO_TRANS_BUILDINGS flag to be consistent ↵tron
with its own name and all other DO_* flags. Now it is active-true.
2004-11-15(svn r626) Merge r438 to trunk:tron
Some whitespace and magic number cleanup (in news_gui)
2004-11-05(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunktron
This includes 2 fixes -Fix: [1048596] Monorail and Maglev sounds are swapped (r511) -Add special case to load the jackhammer sound (r478) The rest are cleanups und enumeration to make merging possible/easier
2004-09-10(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!truelight
2004-09-07(svn r177) -Fix: padded out Widget code to solve warnings on C99 compiler (Tron)darkvater
-Fix: added WIDGETS_END macro for WWT_LAST which does this for all last widget-types
2004-08-21(svn r103) Fix: rare newspaper crash with too many messages [ 1009976 ] (thx ↵dominik
to blathij)s
2004-08-20(svn r95) Another small news system fixdominik
2004-08-20(svn r93) Fix: memory leak in news system (blathijs)dominik
2004-08-20(svn r90) Fix: Some news system bugfixesdominik
2004-08-19(svn r84) Improved news system code a little to avoid potential memory leaksdominik
2004-08-19(svn r81) -Fix: news_gui.c contained a MSVC compile errortruelight
2004-08-18(svn r80) New internal news system (implemented with fifo queue)dominik
Message history works now
2004-08-09(svn r1) Import of revision 975 of old (crashed) SVNtruelight