Commit Graph

274 Commits

Author SHA1 Message Date
terkhen 3442b8c345 (svn r19673) -Codechange: Optimize calculation of graph grid size (method by Alberth).
-Fix: Remove a gcc 3.3 warning.
2010-04-18 20:23:35 +00:00
terkhen 320dcc7d07 (svn r19662) -Feature: Resizable graphs. 2010-04-17 19:18:58 +00:00
terkhen e959d56122 (svn r19661) -Codechange: Base the number of vertical grids of a graph on its size. 2010-04-17 19:15:13 +00:00
terkhen 22f864b0c0 (svn r19632) -Cleanup: has_negative_values is no longer used. 2010-04-14 19:37:55 +00:00
terkhen f61b9e3962 (svn r19631) -Feature: Graphs with negative values are no longer forced to have the zero axis in the middle (grid size calculation by Alberth). 2010-04-14 19:20:38 +00:00
terkhen 7ba4f98ce5 (svn r19615) -Fix [FS#3763]: Company related graphs weren't updated correctly after changing the company colour. 2010-04-12 17:58:09 +00:00
smatz fc878baee6 (svn r19579) -Codechange: auto-raise 'Enable/Disable all' buttons in the Cargo payment rates window 2010-04-07 21:22:08 +00:00
rubidium bcce2cabef (svn r19574) -Fix: graphs were not properly updated when going toggling keys (i.e. companies) 2010-04-07 15:20:24 +00:00
terkhen 869fac9964 (svn r19573) -Fix (r19541): Special cargos did not appear at the refit list. 2010-04-07 14:17:29 +00:00
terkhen 794828209b (svn r19550) -Fix (r19543): Scale graphs without taking into account excluded data. 2010-04-03 19:32:14 +00:00
terkhen 1cab553994 (svn r19543) -Feature [FS#3726]: Scale the vertical axis of graphs depending on the graph's highest value. 2010-04-02 16:45:53 +00:00
terkhen daf97ae52c (svn r19542) -Feature: Add buttons to enable / disable all cargos at the cargo payment rates graph. 2010-04-02 14:11:10 +00:00
terkhen 8660890bbb (svn r19539) -Codechange: Use a macro to loop through the list of sorted cargo specifications. 2010-04-02 12:20:41 +00:00
terkhen 33b1307343 (svn r19535) -Feature: Sort cargos at the cargo payment rates graph. 2010-04-01 19:50:31 +00:00
rubidium 7a73a7490d (svn r19090) -Codechange: some comment coding style fixes 2010-02-10 21:06:05 +00:00
terkhen 2329eacfe8 (svn r19076) -Codechange: Move graph functions to their own header. 2010-02-10 15:24:48 +00:00
frosch 88019e64e1 (svn r18966) -Codechange: Remove Window::OnDoubleClick() in favour of a parameter for OnClick(). 2010-01-30 18:34:48 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium b9052fff9f (svn r18765) -Fix [FS#3499] (r18750): crash when trying to show cargo payments when there are 'holes' in the cargospec array 2010-01-09 14:57:03 +00:00
rubidium 175db8d613 (svn r18750) -Fix [FS#3492]: the cargo payment button states weren't properly set on opening the window 2010-01-07 11:54:01 +00:00
rubidium b0c9b2c232 (svn r18644) -Fix [FS#3434]: company league window was too narrow 2009-12-27 13:19:17 +00:00
alberth 91872aca48 (svn r18588) -Feature [FS#2943]: Add shading and unshading of windows. 2009-12-21 16:24:29 +00:00
alberth 57e6c7fdb7 (svn r18490) -Doc: Fixed syntax of a few doxygen pre and post coditions. 2009-12-13 20:54:52 +00:00
rubidium ac4ef286f4 (svn r18447) -Change: make some more windows (e.g. graphs, company view) stickyable 2009-12-09 17:10:57 +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 8d6e323ef8 (svn r18280) -Codechange: remove widget indices that are not needed for custom drawing/handling input 2009-11-24 21:13:36 +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 584c75722e (svn r18264) -Codechange: make the company league window big font aware 2009-11-23 22:01:42 +00:00
rubidium 2ee87ce100 (svn r18259) -Codechange: make the graphs big font aware 2009-11-23 19:53:58 +00:00
rubidium c7c9f24f60 (svn r18250) -Codechange: make the graph legend big font aware 2009-11-22 22:21:00 +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
alberth bf93372ca2 (svn r18220) -Codechange: Reduce number of nested widget dynamic casts. 2009-11-22 13:22:53 +00:00
rubidium d786f42427 (svn r18196) -Codechange: make the performance rating details window big font and RTL aware 2009-11-20 14:03:17 +00:00
rubidium 095d64c4fc (svn r18167) -Change: make the graph legend, cargo payment graph and company league windows RTL aware 2009-11-18 15:09:39 +00:00
peter1138 d2358c5ea6 (svn r18160) -Codechange: The hyphen character may not line up in all fonts, so draw
the Y-axis ticks manually.
2009-11-18 10:09:22 +00:00
peter1138 b07c99a0fd (svn r18159) -Codechange: Rework graphs to scale to the widget they are in, instead of using absolute pixel placement. X-axis labels still need work for large fonts. 2009-11-18 08:32:39 +00:00
peter1138 61fa8d4fca (svn r18153) -Codechange: Correct height for 'key' button on graph windows. 2009-11-17 22:06:18 +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
peter1138 9e49386d9d (svn r18139) -Codechange: Scale company league table for font height. 2009-11-17 13:07:12 +00:00
rubidium 3d2d7af88f (svn r18086) -Codechange: remove 'widget' from WindowDesc 2009-11-15 10:26:01 +00:00
rubidium 16c2e53191 (svn r18078) -Codechange: remove some duplicate (non translatable) strings 2009-11-14 15:37:33 +00:00
rubidium d79439fb3c (svn r17963) -Codechange: some documentation style 2009-11-03 17:30:08 +00:00
rubidium 56611d13db (svn r17955) -Codechange: s/SPR_PLAYER_ICON/SPR_COMPANY_ICON/ 2009-11-02 16:07:09 +00:00
rubidium 38687193fe (svn r17866) -Codechange: make the remaining graph windows nested 2009-10-25 13:52:58 +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
rubidium 472ed0dc76 (svn r17473) -Codechange: use the post destructor for destroying companies too instead of complicating the graph GUI invalidate code. 2009-09-08 12:27:27 +00:00
smatz 0bfea0646c (svn r17420) -Codechange: replace assert() by assert_compile() where possible 2009-09-04 23:02:52 +00:00
rubidium dcf3719ca1 (svn r17404) -Change (r17379): silence gcc warning caused by inlining of a virtual function 2009-09-03 11:56:29 +00:00
rubidium b294497f2a (svn r17400) -Fix [FS#3172] (r17380): total line of performance rating was calculated wrong 2009-09-03 10:50:14 +00:00
rubidium d8b782365b (svn r17380) -Codechange: move drawing the performance detail data to DrawWidget 2009-09-02 13:39:46 +00:00
rubidium efff517449 (svn r17379) -Codechange: make the performance rating window nested, although it still needs some improvements 2009-09-02 13:24:36 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
alberth 153cfa8c70 (svn r17126) -Fix [FS#3096]: Initialize graph data from the constructor of the derived class. 2009-08-08 22:26:45 +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
belugas a2b996106e (svn r17058) -Codechange: magic numbers removal.
Two values used intead of just one, as it gives more possibilities to those who dare...
2009-08-03 20:02:25 +00:00
rubidium b6cfe4d2fe (svn r17053) -Codechange: pass a Rect to DrawGraph so it knows where to draw 2009-08-03 15:23:49 +00:00
rubidium 37d4277271 (svn r17052) -Codechange: move state changes out of OnPaint for the graph windows 2009-08-03 14:44:55 +00:00
rubidium 8589fb27a0 (svn r17051) -Codechange: make the graph legend window use nested widgets 2009-08-03 14:44:08 +00:00
rubidium 2675eb4619 (svn r17041) -Fix [FS#3083] (r14735): graphical glitch with graph key 2009-08-02 16:45:53 +00:00
smatz 77d13eae61 (svn r16852) -Codechange: use FOR_ALL_CARGOSPECS for iterating over all valid CargoSpecs 2009-07-16 20:40:06 +00:00
smatz 1f29e38b83 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 2009-07-16 19:00:13 +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 743f12fad0 (svn r16488) -Codechange [FS#2941]: Use widget numbers of base grap window and cargo payment window in the window handling code (erikjanp) 2009-05-31 20:33:09 +00:00
smatz 8808f3beea (svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get() 2009-05-18 16:21:28 +00:00
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 2009-05-17 01:00:56 +00:00
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
rubidium 2664f2a2d9 (svn r16242) -Codechange: rework pausing
-Fix [FS#2864]: autopause and manual pausing conflict with eachother
-Fix: new game + pause on new game + autopause make the game not unpause on the first join
2009-05-06 15:06:57 +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 ce171535d1 (svn r16157) -Fix: wrong truncation of refit cost/graph x labels because they were multiline strings being drawn using DrawString instead of DrawStringMultiLine. 2009-04-26 10:48:30 +00:00
alberth 76ccb85660 (svn r16141) -Codechange: Adding nested widgets to remaining graph windows. 2009-04-25 12:00:54 +00:00
alberth c6d5923d22 (svn r16139) -Codechange: Adding/completing widget number enums of several graph windows. 2009-04-25 10:06:22 +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 b5da02ac1c (svn r16003) -Codechange: Replaced magic widget number constant with enumerated value in graph legend window. 2009-04-09 11:42:24 +00:00
alberth 11f406c0a4 (svn r16002) -Codechange: Added nested widgets for company league window 2009-04-09 11:22:36 +00:00
alberth 4af791e888 (svn r16001) -Codechange: Added nested widgets to cargo payment rates window 2009-04-09 09:41:10 +00:00
alberth bdf05e797d (svn r15952) -Codechange: Added nested widgets to operating profit, income, delivered cargo, and company value windows. 2009-04-04 09:03:28 +00:00
alberth ccd2468eb2 (svn r15943) -Fix: Tooltip of detailed ratings window button showed wrong tip 2009-04-03 20:41:20 +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 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 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 9fb19be134 (svn r15457) -Fix: typo in stringid. 2009-02-12 15:17:10 +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 9907742a0f (svn r15423) -Codechange: split widget related types to their own header and add a bit of type strictness. 2009-02-09 01:06:23 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
rubidium d1bb5e5f36 (svn r14735) -Codechange: remove a bit of bit-waste in the map array (without changing the map array) and make the CompanyIDs contiguous.
-Note: 15 should be enough for now... making it any more means adding more bytes to the map array and thus wasting more bits instead of reducing the bit waste.
2008-12-24 09:53:15 +00:00
rubidium c3746a55bb (svn r14732) -Codechange: replace some magic number with less magic constants and use the proper type for a few variables. 2008-12-23 21:03:43 +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
rubidium fd97a89c57 (svn r14219) -Fix (rthebeginning): 10 days != 6*2.5 days, effectively causing the payment graph to show the wrong data. 2008-09-02 08:25:15 +00:00
belugas 8c7a450e98 (svn r14011) -Codechange: not required to define an enum which was just the representation of another.
If you want to customize it more easily, why not a simple const of said enum value?
2008-08-07 01:28:27 +00:00
belugas 5c3a18fa90 (svn r13994) -Codechange: replace a few rogue magic numbers with Colours enum values 2008-08-04 17:27:06 +00:00
belugas faaa637987 (svn r13883) -Codechange: Replace numbers with Colours enum on graph gui 2008-07-30 17:39:26 +00:00
belugas 63f7214abd (svn r13882) -Codechange: Replace widget numbers with appropriate enums 2008-07-30 17:13:55 +00:00
rubidium 3a799389eb (svn r13731) -Codechange: make a pool of the array of players. 2008-07-18 16:40:29 +00:00
skidd13 1ddafcadd2 (svn r13521) -Codechange: Use GUIList sorting instead of poll & sort for CompanyLeagueWindow 2008-06-15 15:48:33 +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 3455844ea3 (svn r13156) -Codechange: make classes of the GraphWindows. 2008-05-18 11:23:41 +00:00
rubidium cc3a41bfa9 (svn r13155) -Codechange: make a window class of the company league and graph legenda windows. 2008-05-18 09:39:40 +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 3b97cc2e30 (svn r13121) -Codechange: make a class of the PerformanceRatingDetailWindow. 2008-05-16 17:45:43 +00:00
rubidium 23fc96c3e8 (svn r13005) -Codechange: prepare AllocateWindowDescFront for subclassing of Window. 2008-05-08 11:50:34 +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 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
rubidium bbdc5a9314 (svn r11979) -Codechange: drop MSVC 2003 support because MSVC 2003 is broken in such a manner that it triggers an internal compiler error without any clue what of the code is wrong. Even trying to bisect the problem does not give a single line of code that causes the trouble. 2008-01-24 18:47:05 +00:00
rubidium d4e6a6bf57 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 2008-01-13 01:21:35 +00:00
rubidium ac528411df (svn r11818) -Codechange: split player.h into smaller pieces. 2008-01-12 14:10:35 +00:00
rubidium 0e517fe023 (svn r11787) -Codechange: more header rewrites. This time related to viewport.h. 2008-01-09 09:45:45 +00:00
peter1138 fa83291a76 (svn r11742) -Codechange [FS#1319]: Run window tick events when paused, so that news pop-ups and the about window still progress. For other windows the events are ignored when paused. 2008-01-01 22:34:00 +00:00
rubidium b9046c97fb (svn r11702) -Codechange: move all date related stuff to date*. 2007-12-26 13:50:40 +00:00
rubidium 429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 2007-12-25 11:26:07 +00:00
rubidium bf98e25e43 (svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed. 2007-12-25 09:48:53 +00:00
rubidium 8f0e68285b (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type. 2007-12-22 23:30:28 +00:00
rubidium 9e9cfe6e59 (svn r11677) -Codechange: move price and command related types/functions to their respective places. 2007-12-21 21:50:46 +00:00
rubidium 433a9f3c09 (svn r11675) -Codechange: split the string types from the string functions. 2007-12-21 19:49:27 +00:00
rubidium d582aea639 (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found. 2007-12-19 20:45:46 +00:00
rubidium 8896bea306 (svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps. 2007-12-19 19:44:29 +00:00
rubidium faf096f506 (svn r11559) -Fix [FS#1505]: overflow when drawing graphics with high company values. 2007-12-02 19:21:56 +00:00
rubidium 527b72749d (svn r11555) -Codechange: use the new members introduced in r11551. 2007-12-02 14:29:48 +00:00
skidd13 bf959f926f (svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style 2007-11-24 10:38:43 +00:00
skidd13 a91c2a4c39 (svn r11485) -Codechange: Remove the doubled function ToggleBitT and rename the remaining to fit with the naming style 2007-11-20 14:11:19 +00:00
skidd13 eeaa348f8b (svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style 2007-11-20 13:35:54 +00:00
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 2007-11-19 21:02:30 +00:00
skidd13 50bfe1a19d (svn r11476) -Codechange: rename the function myabs to abs to get rid of an unneeded define 2007-11-19 18:58:04 +00:00
skidd13 8be526e499 (svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style 2007-11-19 18:38:10 +00:00
belugas 56e6282f2f (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
Patch heavily based on BiBB's work (FS#1383)
2007-11-04 00:08:57 +00:00
rubidium 8212088c03 (svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo. 2007-10-20 14:51:09 +00:00
rubidium b1effc466e (svn r11039) -Fix [FS#1191]: underflow that caused overflows in the performance rating calculation. 2007-09-02 20:41:46 +00:00
rubidium c03cb2c8db (svn r10704) -Codechange: provide an infrastructure to have resizable windows that are smaller than the default window size. 2007-07-27 12:49:04 +00:00
rubidium efc7fdf2fd (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h 2007-07-16 09:16:58 +00:00
peter1138 eb6594caa8 (svn r10323) -Codechange: reference company name, number and player (president) name
by index
2007-06-25 13:30:38 +00:00
rubidium 9c0944aa09 (svn r10258) -Codechange: as we are now using int64 all over the place, it's better to use int64 variables in the string generating too instead of packing them into two int32s.
-Fix: some displays of money were wrong.
2007-06-21 17:25:17 +00:00
rubidium eb1472a82d (svn r10247) -Fix (r10210): *always* call SetDParamMoney when you want to place money in some string. 2007-06-21 14:54:51 +00:00
rubidium 80c259f64f (svn r9672) -Cleanup: lots of coding style fixes around operands. 2007-04-18 22:10:36 +00:00
peter1138 49eb9b6fad (svn r9638) -Feature: Increase cargo types from 12 to 32 and enable newcargo flag in NewGRF loader. 2007-04-15 16:20:35 +00:00
peter1138 fc540fcd0d (svn r9435) -Fix (r8972): ensure the cargo payment graph is at least 12 "items" high 2007-03-24 18:56:59 +00:00
peter1138 d7f56f1550 (svn r9388) -Codechange: variable scope and type, and standardify all CargoID loops. 2007-03-21 13:19:01 +00:00
peter1138 c94480ab80 (svn r9079) -Codechange: add WWT_LAST widget when dynamically building cargo payment graph 2007-03-09 22:55:04 +00:00
rubidium 24c4d5b06d (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 2007-03-07 12:11:48 +00:00
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 2007-03-07 11:47:46 +00:00
peter1138 8f2a554864 (svn r8989) -Fix: more indenting and variable scoping 2007-03-03 09:58:20 +00:00
peter1138 879eca8e23 (svn r8972) -Codechange: Dynamically add buttons on the cargo payment graph. This lets us remove the gaps and allow more than 12 cargo types later. 2007-03-02 11:36:34 +00:00
belugas 978d7da818 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style. 2007-03-01 01:24:44 +00:00
peter1138 ef2daa5060 (svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels. 2007-02-20 22:09:21 +00:00