Commit Graph

288 Commits

Author SHA1 Message Date
frosch 8d8bd3d45f (svn r18597) -Fix (r17147)[FS#3395, FS#3396]: ChangeVehicleNews() did not update the news ticker. 2009-12-21 21:14:40 +00:00
alberth 91872aca48 (svn r18588) -Feature [FS#2943]: Add shading and unshading of windows. 2009-12-21 16:24:29 +00:00
alberth e0393a3de1 (svn r18492) -Doc: A few Doxygen reference fixes (NewsSubtype reported by Eddi), and a typo fix. 2009-12-13 21:12:36 +00:00
alberth 4b4c1ffc17 (svn r18349) -Fix (r18347): Older compilers want explicit assignments. 2009-11-29 21:40:51 +00:00
alberth f2f9ef7a9f (svn r18347) -Codechange: Compute width of labels in news settings window once. 2009-11-29 21:17:37 +00:00
rubidium 5d38d06313 (svn r18331) -Fix [FS#3334]: news items would with some chat 'bars' not be displayed fully. Fix by erikjanp. 2009-11-29 00:41:08 +00:00
rubidium 1f0da3710f (svn r18324) -Codechange: there's no need for a default size when the window isn't resizable 2009-11-28 15:01:49 +00:00
rubidium 293dfd7c3e (svn r18322) -Codechange: remove the WDP duplication; no need to tell the same twice. 2009-11-28 14:42:35 +00:00
rubidium 458c73aecb (svn r18318) -Codechange: add an enum value for manual window placement 2009-11-28 13:54:28 +00:00
rubidium ff32ea24fc (svn r18311) -Codechange: no need to hardcode locations of some 'random' windows 2009-11-28 13:38:34 +00:00
rubidium 14300d309c (svn r18277) -Codechange: remove unneeded widget indices for close, resize and sticky boxes and for window captions 2009-11-24 18:05:55 +00:00
rubidium 69b6d9309a (svn r18274) -Codechange: remove the unused WDF flags 2009-11-24 17:28:29 +00:00
rubidium 2a2884646c (svn r18257) -Fix: glitch when the news message is wider than the status bar 2009-11-23 16:23:42 +00:00
rubidium edc90be5b8 (svn r18252) -Fix: crash when news is shown when the end game window is opened (status bar goes missing for a while etc.) 2009-11-23 13:01:12 +00:00
alberth 450e40b997 (svn r18230) -Codechange: Allow fill stepsize to be set from Window::UpdateWidgetSize(). 2009-11-22 18:28:14 +00:00
alberth 2b6f792513 (svn r18229) -Codechange: Make fill_x, fill_y a number instead of a bool. 2009-11-22 18:26:01 +00:00
rubidium 8204f226f1 (svn r18213) -Codechange: it's not needed to manually set the fill, (re)size and tooltip for scrollbars 2009-11-22 11:24:30 +00:00
rubidium d913282e7a (svn r18212) -Codechange: remove unneeded 'parameters' for WWT_CAPTION, WWT_CLOSEBOX and WWT_STICKYBOX in the nested widget arrays 2009-11-22 11:20:12 +00:00
rubidium e9b6e73333 (svn r18211) -Cleanup: remove unneeded tooltip, size and fill 'parameters' from WWT_RESIZEBOX instances 2009-11-22 11:10:17 +00:00
rubidium 64d65cc635 (svn r18187) -Codechange: make the advanced face selection, custom currency, difficulty, news settings, signal, sign and vehicle details window RTL aware (use the arrow widget) 2009-11-19 17:57:27 +00:00
rubidium 4987d97810 (svn r18180) -Codechange: make the news history window RTL aware 2009-11-19 11:10:32 +00:00
rubidium 5f2ddfbc5a (svn r18152) -Codechange: remove the 'minimum window size' from the WindowDesc; it's determined from the (nested) widgets 2009-11-17 19:16:48 +00:00
rubidium 626de6b128 (svn r18126) -Codechange: remove duplicate (since r18119) scrollbar capacity/matrix initialisation 2009-11-16 20:34:57 +00:00
rubidium 1c5a92ae98 (svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions 2009-11-16 17:15:42 +00:00
rubidium 3d2d7af88f (svn r18086) -Codechange: remove 'widget' from WindowDesc 2009-11-15 10:26:01 +00:00
rubidium 860b9b1cea (svn r18028) -Codechange: unglobalise some functions 2009-11-09 10:40:33 +00:00
rubidium 4a970202a9 (svn r17947) -Codechange: make the statusbar, chat input and news window know of eachothers size so they don't get overlapped and don't get invisible (bottoms) of windows when a larger font is used 2009-11-02 10:15:48 +00:00
rubidium ca0521f89f (svn r17853) -Codechange: remove the 'delta' parameter from OnResize; it was used in ways that aren't always wanted, causing bugs and the like. Also with nested widgets most reasons for handling OnResize have gone. 2009-10-24 14:53:55 +00:00
rubidium d1d35b95b6 (svn r17786) -Fix [FS#3265]: graphical glitches (matrices/scrollbars with wrong 'size') upon reiniting windows 2009-10-17 14:29:10 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
rubidium c847f5c04e (svn r17674) -Codechange: replace SetDirty + OnInvalidateData with InvalidateData (which does the same). Also call InvalidateData in a few cases where that was actually meant. 2009-09-30 21:07:54 +00:00
alberth 116c77c342 (svn r17572) -Codechange: Use the Window::GetWidget() function to access nested widgets through the nested_array. 2009-09-19 11:31:12 +00:00
rubidium e8ddf001c8 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 2009-09-19 09:51:14 +00:00
frosch ebd916be3d (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 2009-09-13 19:15:59 +00:00
alberth 5fd5ae125a (svn r17398) -Codechange: Fill normal news item window with widgets. 2009-09-02 20:59:30 +00:00
alberth 0f9da2d636 (svn r17397) -Codechange: Add new vehicle news window. 2009-09-02 20:55:55 +00:00
alberth c0b9a6a9bc (svn r17396) -Codechange: Add company news window. 2009-09-02 20:54:27 +00:00
alberth c518d8c0d9 (svn r17395) -Codechange: Fill thin window with widgets. 2009-09-02 20:52:58 +00:00
alberth 96617e804c (svn r17394) -Codechange: Add news flags for viewport settings. 2009-09-02 20:49:25 +00:00
alberth 92321eb204 (svn r17393) -Codechange: Fill small window with widgets. 2009-09-02 20:46:42 +00:00
alberth a536a15459 (svn r17392) -Codechange: Use 'default' for reacting on click. 2009-09-02 20:44:36 +00:00
alberth 3375627552 (svn r17390) -Codechange: Switch news item windows to nested widgets. 2009-09-02 20:39:40 +00:00
alberth 417ad163c0 (svn r17387) -Codechange: Add news-item window description to NewsSubtypeData. 2009-09-02 20:21:30 +00:00
alberth 284b92f3e9 (svn r17385) -Codechange: Removed some unneeded parentheses. 2009-09-02 19:57:22 +00:00
rubidium 7aeaa4f132 (svn r17371) -Codechange: make the newgrf, news and order GUIs use the scrollbar wrappers 2009-09-02 08:18:54 +00:00
rubidium b1d4594fa7 (svn r17343) -Codechange: it's bankruptcy, not bankrupcy, according to my Oxford Dictionary of English and Merriam-Webster. 2009-09-01 12:28:46 +00:00
rubidium aca7ba714a (svn r17271) -Fix: SetFill sometimes used 1/0 when it should be using true/false 2009-08-23 19:03:09 +00:00
alberth f74b7d4ebd (svn r17265) -Codechange: Typo fix, small is with two l's 2009-08-22 19:06:02 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 7fb95e2c2b (svn r17228) -Codechange: some coding style fixes 2009-08-20 10:23:39 +00:00
alberth 4f1758b51a (svn r17204) -Codechange: Move viewport initialization into the constructor of the news item window. 2009-08-16 16:06:06 +00:00
alberth b03e758d25 (svn r17202) -Codechange: News item is already given as argument. 2009-08-16 09:20:25 +00:00
alberth 66e98469bb (svn r17200) -Codechange: Initialize NewsWindow::duration, add some documentation strings. 2009-08-16 08:59:56 +00:00
alberth 3409385e1d (svn r17199) -Codechange: Remove NF_VIEWPORT since it is implied by the news mode. 2009-08-16 07:31:36 +00:00
alberth dd6fcb08b6 (svn r17188) -Codechange: Use display mode names for naming window and widget descriptions. 2009-08-15 14:39:22 +00:00
alberth ff60a5605c (svn r17187) -Codechange: Make switches on news display mode complete. 2009-08-15 14:27:54 +00:00
alberth 13a37b427a (svn r17178) -Codechange (r17177): Remove now unused define. 2009-08-14 22:07:25 +00:00
alberth 200fcddc38 (svn r17177) -Codechange: Message options window uses nested widget tree. 2009-08-14 22:01:44 +00:00
alberth 3d38744b9f (svn r17176) -Codechange: Move widget state updating out of OnPaint method of message options window. 2009-08-14 21:33:30 +00:00
alberth fe74c526d8 (svn r17174) -Codechange: Switch to vertical alignment in the message options window. 2009-08-14 21:21:56 +00:00
alberth c4f055cc11 (svn r17172) -Codechange: Move the _message_opt variable into the MessageOptionsWindow struct. 2009-08-14 19:02:20 +00:00
alberth 4eb155ccfb (svn r17171) -Doc: Additions and corrections of various doxygen strings. 2009-08-14 18:41:03 +00:00
frosch 52f9b8ffbd (svn r17147) -Fix [FS#3048]: Keep vehicle news and viewports following vehicles, when autoreplacing/renewing them. 2009-08-10 20:06:39 +00:00
alberth 8d809d5f4c (svn r17123) -Codechange (r17122): Use this for calling methods. 2009-08-08 20:39:45 +00:00
alberth 2cd3b5f44c (svn r17122) -Codechange: Message history window uses nested widget tree. 2009-08-08 20:06:38 +00:00
rubidium 1fe3ad3288 (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 2009-08-05 17:59:21 +00:00
rubidium 4b2592dbc0 (svn r17062) -Change: unify the naming of some 125 strings 2009-08-04 18:04:33 +00:00
alberth 92206f2d18 (svn r16837) -Codechange: Collect largest used index while constructing nested widget tree. 2009-07-15 22:17:08 +00:00
alberth 292647b212 (svn r16487) -Codechange [FS#2940]: Add widget numbers to news display and news history windows (based on work by erikjanp) 2009-05-31 20:18:47 +00:00
alberth 304b42d00e (svn r16485) -Fix [FS#2938]: Move date in news window a pixel away from the right-edge (erikjanp) 2009-05-31 19:29:40 +00:00
frosch a4557c7da4 (svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted. 2009-05-24 16:52:42 +00:00
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
rubidium 5f81ba886c (svn r16297) -Codechange: silence more ICC warnings 2009-05-13 17:39:00 +00:00
alberth 86eb1ca626 (svn r16205) -Codechange: Added nested widgets for news windows and news-settings window. 2009-05-02 17:00:56 +00:00
alberth 1728dd8046 (svn r16204) -Codechange: Completing widget numbers of news settings window. 2009-05-02 16:52:21 +00:00
alberth 551e377614 (svn r16203) -Codechange: Simplify widget layout of news settings window. 2009-05-02 16:45:01 +00:00
alberth c3c527c9b8 (svn r16202) -Codechange: Use widget top coordinate instead of hardcoded value. 2009-05-02 16:40:26 +00:00
alberth eab4fb07c6 (svn r16200) -Codechange: Moving news-type description to NewsTypeData array. 2009-05-02 13:05:00 +00:00
rubidium 7dd677ced2 (svn r16162) -Codechange: remove needless TC_ colours from DrawString when they are part of strings and add some colours to a few strings. 2009-04-26 15:26:19 +00:00
rubidium 53887e07bb (svn r16160) -Codechange: remove the need for explicit TC_FROMSTRING for DrawString. 2009-04-26 14:52:56 +00:00
rubidium 11c6d30e77 (svn r16156) -Codechange: make the parameters of DrawStringMultiline the same as for DrawString (except the addition of the bottom parameter) 2009-04-26 10:45:07 +00:00
rubidium 59d45a04d6 (svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible. 2009-04-21 23:40:56 +00:00
alberth 9d2738b9c4 (svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback 2009-03-29 09:49:11 +00:00
smatz c299bac5be (svn r15830) -Codechange: don't use fixed size of array in news_gui.cpp and news_func.h 2009-03-23 11:48:05 +00:00
alberth 6567a29e18 (svn r15820) -Codechange: Some windows using nested widgets 2009-03-22 21:16:57 +00:00
rubidium 9038733f1a (svn r15812) -Codechange: use the new DrawString API in another set of GUIs 2009-03-22 14:39:20 +00:00
rubidium e74dc1e1d6 (svn r15803) -Codechange: use the new text drawing API for multicenter
-Fix (r15800): off-by-one w.r.t. offsets
2009-03-22 09:34:06 +00:00
rubidium 69decac406 (svn r15791) -Codechange: remove the *RightAligned part of the old text drawing API. 2009-03-21 22:22:00 +00:00
rubidium 9003641095 (svn r15790) -Codechange: remove the *Centered part of the old text drawing API. 2009-03-21 22:00:00 +00:00
rubidium 45f189fdca (svn r15785) -Codechange: remove the *Truncated part of the old text drawing API. 2009-03-21 20:12:12 +00:00
smatz af293142fe (svn r15725) -Fix: centering on a vehicle didn't respect its z coordinate 2009-03-15 15:25:18 +00:00
rubidium f9def73be6 (svn r15723) -Codechange: use a constructor for WindowDescs as that makes expanding them much easier (Alberth) 2009-03-15 15:12:06 +00:00
rubidium 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 2009-03-14 18:16:29 +00:00
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 2009-02-09 02:57:15 +00:00
rubidium 8dae160d0f (svn r15425) -Codechange: some color->colour changes and type safety. 2009-02-09 02:09:47 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
smatz 5fc7fe9648 (svn r14940) -Fix: let the statusbar know the current news are invalid or bad things will happen 2009-01-09 20:42:17 +00:00
rubidium c9a82ac3e7 (svn r14423) -Codechange: also do r14221 for the strings. 2008-09-30 21:18:28 +00:00
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 2008-09-30 20:39:50 +00:00
smatz 66be028ad4 (svn r14307) -Fix: when deleting a station, remove news items regarding it 2008-09-13 10:19:51 +00:00
belugas d34eedfdb3 (svn r13897) -Codechange: Replace remaining numbers with Colours enum on news guis
-Fix: a few misalignements
2008-07-31 16:44:51 +00:00
belugas d358eff64d (svn r13872) -Feature: Split the news message announcing opening and closure of industries into two news of their own 2008-07-30 01:53:03 +00:00
belugas da4dc32a6f (svn r13867) -Codechange: Fix missing alignment 2008-07-29 15:34:56 +00:00
rubidium 891bec7e23 (svn r13730) -Fix: make a copy of the names for news messages about the deletion of companies as the removal of a company could lead to wrong names in the news messages. 2008-07-18 16:26:51 +00:00
frosch ecc5d648df (svn r13649) -Codechange: Split the GfxFillRect() special flags from 'color' into their own parameter. 2008-06-28 15:44:24 +00:00
smatz bf8afb4c38 (svn r13434) -Fix (r13317): news window with invalid news item could be shown 2008-06-09 12:20:00 +00:00
rubidium 5176319dd5 (svn r13389) -Codechange: remove NM_CALLBACK because that information could be gathered from the fact that a callback has been specified. Patch by Cirdan. 2008-06-05 16:55:00 +00:00
rubidium 92c80dab4c (svn r13349) -Codechange: remove a pointless flag; the flag is set before calling a function and is then reset in the function without ever reading it. Patch by Cirdan. 2008-06-01 10:11:31 +00:00
rubidium 5a6f6bf067 (svn r13345) -Codechange: only one of all the NewsItem's instance duration variable, so move it so there is only once instance of that variable. Patch by Cirdan. 2008-05-30 20:57:19 +00:00
rubidium 923e21129c (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games. 2008-05-29 15:13:28 +00:00
rubidium 7f8f5fa52c (svn r13317) -Codechange: make news messages use a linked list instead of a moving circular buffer. This makes it possible to store more news messages in the history. Based on a patch by Cirdan.
-Codechange: the number of news messages is reduced by removing every news message that is a configurable amount older than when it would not be shown in the newspaper popup/ticker, which is e.g. a month for industry production changes and half a year for subsidy offers. As a result the more important messages will stay longer in the message history (if longer than 30 messages).
2008-05-28 21:36:16 +00:00
rubidium b4e431bf7c (svn r13316) -Codechange: move some functions around to make them grouped more logically. 2008-05-28 20:13:28 +00:00
rubidium 4625695653 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
2008-05-25 19:17:03 +00:00
peter1138 6f233b1f8f (svn r13225) -Fix (r13041): Missing calls to FindWindowPlacementAndResize() from lots
of windows causing 'two stage' opening effect.
2008-05-23 23:02:13 +00:00
rubidium 27c38052b7 (svn r13185) -Codechange: remove everything related to the WindowProc callbacks. 2008-05-19 09:48:47 +00:00
rubidium a1137fcdfe (svn r13181) -Codechange: make news callback handling a little simpler. Patch by Cirdan. 2008-05-19 09:18:51 +00:00
rubidium 50203f8786 (svn r13154) -Codechange: make a window class of the news message history window. 2008-05-18 08:50:51 +00:00
rubidium f5681547ef (svn r13151) -Codechange: use an enum instead of bool as return type of OnKeyPress/OnCTRLStateChange to make it obvious what the return values mean. 2008-05-17 23:11:06 +00:00
rubidium 152e82ba92 (svn r13147) -Codechange: move the code to draw bankruptcy news to news_gui.cpp. 2008-05-17 21:13:05 +00:00
rubidium 8b54212900 (svn r13139) -Codechange: move DrawWindowWidgets and DrawWindowViewport to the Window class and remove Window from their naming. 2008-05-17 12:48:06 +00:00
rubidium 6ac20f00bb (svn r13115) -Codechange: make a window subclass of the MessageOptionsWindow. 2008-05-16 07:15:32 +00:00
rubidium 7491b792e2 (svn r13114) -Codechange: use InvalidateData instead of direct window access to modify the state of the statusbar from outside the statusbar. 2008-05-16 07:08:04 +00:00
rubidium 9e4d664a24 (svn r13111) -Documentation: update the documentation of AddNewsItem to reflect reality. Patch by Cirdan. 2008-05-15 20:53:44 +00:00
rubidium d94bef9d5c (svn r13102) -Codechange: make a class of the NewsWindow. 2008-05-15 13:47:55 +00:00
rubidium 76b8970a33 (svn r13100) -Codechange: reduce the amount of parameters passed via AddNewsMessage as there is (for each news message type) a tuple of 4 parameters that is the same for all calls. 2008-05-15 13:39:36 +00:00
rubidium d0c79e1164 (svn r13065) -Codechange: remove the need for the news string callbacks. Patch by Cirdan. 2008-05-13 10:17:04 +00:00
glx c708ab3b48 (svn r13047) -Codechange: remove vp_d 2008-05-11 15:08:44 +00:00
rubidium 9066a961e7 (svn r13043) -Codechange: remove some duplicate variables from news_d. 2008-05-11 13:02:58 +00:00
rubidium 935434333b (svn r13028) -Codechange: WE_MESSAGE and WE_INVALIDATE_DATA were doing the same thing. 2008-05-10 12:30:27 +00:00
rubidium 2ba05f8987 (svn r13021) -Codechange: free data_b for other uses when it is not used to store a second tile to skip to (in news messages). Patch by cirdan. 2008-05-08 22:53:49 +00:00
rubidium 2eef026fe3 (svn r13004) -Codechange: replace AllocateWindow and AllocateWindowDesc with a Window constructor. 2008-05-08 11:31:41 +00:00
rubidium 9bf519f26b (svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL. 2008-05-06 22:08:18 +00:00
rubidium e6c944a6c4 (svn r12975) -Codechange: replace DeleteWindow(w) with delete w. 2008-05-06 21:28:30 +00:00
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 2008-05-06 15:11:33 +00:00
peter1138 4595d2c3b1 (svn r12953) -Feature: Open a new viewport when ctrl-clicking on a 'Location' button, a town/station/industry list, or some news items. 2008-05-05 11:36:43 +00:00
peter1138 57e104f97e (svn r12952) -Cleanup: Indenting and codestyle 2008-05-05 11:24:58 +00:00
glx 46bd824b3e (svn r12842) -Codechange [FS#1604]: scale message history by map size 2008-04-22 21:18:55 +00:00
rubidium fccfcd093b (svn r12805) -Codechange: remove some bit magic related to the news display states. Patch by cirdan. 2008-04-20 11:40:33 +00:00
rubidium 24b5c91039 (svn r12789) -Codechange: rename AssignWindowViewport to InitializeWindowViewport because the viewport is now part of the window struct. Patch by Alberth. 2008-04-19 13:17:19 +00:00
rubidium 222988603f (svn r12785) -Codechange: put all news-type related constants in the same array. Patch by cirdan. 2008-04-19 12:50:02 +00:00
rubidium acafc26426 (svn r12762) -Fix: tabs after the first non-tab character are generally not okay (or lines starting with a space and then tabs). 2008-04-18 04:54:09 +00:00
rubidium 5796fb3b34 (svn r12750) -Fix (r12749): viewport for industry new messages was not shown properly. 2008-04-17 11:25:12 +00:00
rubidium d7bae069e1 (svn r12683) -Fix [FS#1906]: in some cases a news messages would not be shown. 2008-04-13 11:15:48 +00:00
rubidium d97c16ee8b (svn r12475) -Codechange: cleanup coding style in news_gui.cpp. 2008-03-28 16:45:20 +00:00
rubidium eeabab4555 (svn r12459) -Codechange: split news.h into news_type.h and news_func.h. 2008-03-28 08:53:36 +00:00
peter1138 ac0fa7f69f (svn r11909) -Codechange: use dropdown widget for player livery, network lobby/setup and news settings windows 2008-01-17 20:00:13 +00:00
peter1138 e4c05f8d78 (svn r11848) -Codechange: New class-based drop down list functionality. Lists are now dynamically generated, and can include parameters, or be extended however needed. 2008-01-14 16:10:58 +00:00
rubidium dc87b05e8c (svn r11834) -Codechange: only include settings_type.h if needed. 2008-01-13 14:37:30 +00:00
rubidium 5c4150d304 (svn r11832) -Codechange: get rid of (quite) some VARDEFs. 2008-01-13 13:36:01 +00:00