Commit Graph

281 Commits

Author SHA1 Message Date
rubidium bd39a3b4c4 (svn r18289) -Codechange: if using RTL draw the toolbar in the reverse direction so the buttons overlap 'nicely' 2009-11-25 21:30:45 +00:00
smatz f0c64208cf (svn r18281) -Feature: founding towns in-game (based on work by Belugas, TheJosh, GeekToo, Terkhen and others) 2009-11-24 21:18:11 +00:00
rubidium 69b6d9309a (svn r18274) -Codechange: remove the unused WDF flags 2009-11-24 17:28:29 +00:00
rubidium fb168e25ad (svn r18261) -Codechange: center the company icons in the toolbar dropdowns 2009-11-23 20:14:42 +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 777d5ce12e (svn r18201) -Codechange (r18092): No need anymore for initializing nested widgets for Widget* arrays. 2009-11-20 20:10:06 +00:00
rubidium 0fc733f3a0 (svn r18165) -Codechange: make company dropdowns RTL aware 2009-11-18 12:31:48 +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 95af4f40f3 (svn r18108) -Fix (r17986): crash when clicking just 'outside' of the date panel 2009-11-15 20:16:51 +00:00
rubidium aeb9f8e715 (svn r18092) -Codechange: remove support for the unnested widgets 2009-11-15 13:36:30 +00:00
rubidium 3d2d7af88f (svn r18086) -Codechange: remove 'widget' from WindowDesc 2009-11-15 10:26:01 +00:00
rubidium cbeba59fc2 (svn r18033) -Codechange: make the padding for IMGBTN_2 the same as for IMGBTN; the image doesn't move, so the extra space at the right and bottom aren't needed 2009-11-09 17:20:48 +00:00
rubidium c2221885f4 (svn r18027) -Codechange: make some unneededly global variables static and remove some unused variables 2009-11-09 09:59:35 +00:00
rubidium 7f8a062f3f (svn r17986) -Codechange: make the scenario 'main' toolbar nested. Also make it implement the 'switch' toolbar feature when it gets really small. 2009-11-06 20:34:43 +00:00
rubidium 1000445382 (svn r17985) -Codechange: make the toolbar container support non-resizable widgets and subclassing of itself. 2009-11-06 20:32:15 +00:00
rubidium 8678730ce3 (svn r17973) -Fix: 'save' toolbar button didn't change when clicking it
-Fix: wrong widgets (e.g. finances and company) could be visually disabled, based on the state of the zoom in/out buttons. However, they were still clickable
-Codechange: make the main toolbar a nested window
2009-11-04 20:02:14 +00:00
rubidium 32b568a7e9 (svn r17971) -Codechange: make the code of the toolbar more uniform; give the switch bar a tooltip and unify the naming of sprites. 2009-11-04 18:28:59 +00:00
rubidium b2946819e4 (svn r17970) -Codechange: some coding style / improvement of constant usage 2009-11-04 15:50:14 +00:00
rubidium fd29b7b526 (svn r17969) -Codechange: use the toolbar switch button lowered state as a way to tell which of the configurations it's showing 2009-11-04 15:49:27 +00:00
smatz 090c762921 (svn r17938) -Feature: non-automatic screenshot name can be entered in console 2009-11-01 18:15:35 +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 2b7d09b73e (svn r17748) -Fix: crash when right clicking on the 'toggle' toolbar button 2009-10-09 17:35:01 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
smatz 15511678e3 (svn r17603) -Codechange: since now, towns are 'founded' instead of 'built' 2009-09-21 18:16:00 +00:00
smatz 114d48e492 (svn r17596) -Codechange: constify some tables 2009-09-20 23:11:01 +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
frosch 734edc178d (svn r17525) -Cleanup: Remove SetWindowDirty(), it is completely covered by other functions already. 2009-09-13 17:37:47 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
alberth 118d5e9fac (svn r17192) -Fix (r17175): Buttons in the toolbar of the scenario editor did not raise again. 2009-08-15 20:33: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
rubidium 36a28fe3d2 (svn r16951) -Change: order the strings in the options dropdown slightly more logical 2009-07-25 11:02:15 +00:00
rubidium 65d4d8b46c (svn r16949) -Codechange: unify the way the DisplayOption enums are written 2009-07-25 10:54:42 +00:00
rubidium e9bc557b2a (svn r16930) -Codechange: more StringID name unification and grouping 2009-07-23 19:31:50 +00:00
smatz da57fe63f3 (svn r16497) -Feature [FS#2870]: Q/W/E/D will now open the landscape toolbar and select appropriate tool 2009-06-01 14:36:36 +00:00
smatz af07333c78 (svn r16430) -Fix: crash when a company is deleted while a dropdown with company names is open 2009-05-26 11:57:52 +00:00
smatz 10d1ef5447 (svn r16379) -Codechange: remove GetNumTowns(), GetNumIndustries() and GetActiveCompanyCount(), use PoolItem::GetNumItems() instead 2009-05-22 15:23:47 +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 bdbbe3a09b (svn r16321) -Fix (r5946): in the scenario editor change the (starting) game year of the scenario, not the (starting) game year for new games/scenarios. 2009-05-16 18:58:15 +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 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
rubidium 329cabab4f (svn r16088) -Codechange: merge HighLightStyle and ViewportHighlightMode as they are basically the same thing 2009-04-19 10:31:30 +00:00
alberth 9d2738b9c4 (svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback 2009-03-29 09:49:11 +00:00
glx 9fcff01850 (svn r15784) -Fix (r15779): TextAlignment and TA_* already exist on windows 2009-03-21 20:06:00 +00:00
rubidium 93fe44a3c5 (svn r15783) -Codechange: make the dropdown draw code pass around the left/right instead of the x and width to make drawing text at offsets easier. 2009-03-21 19:31:47 +00:00
rubidium 8a758beec3 (svn r15782) -Codechange: replace some calls to the all text drawing API to the new one. 2009-03-21 19:10:26 +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 b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 2009-03-15 00:32:18 +00:00
rubidium 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 2009-03-14 18:16:29 +00:00
rubidium 7831346ef8 (svn r15601) -Fix [FS#2615]: bridges/tunnels don't store tram owner making it possible to remove someone's tram tracks.
-Feature: allow building road stops on road/tram tracks of competitors.
2009-03-02 22:57:47 +00:00
peter1138 3728df8323 (svn r15448) -Codechange: Don't show rail types in selection drop downs if they have no label. 2009-02-11 18:10:12 +00:00
rubidium 8dae160d0f (svn r15425) -Codechange: some color->colour changes and type safety. 2009-02-09 02:09:47 +00:00
rubidium 861e9cefb3 (svn r15424) -Codechange: make it possible to have multiple windows with edit box open simultaniously (Zuu). 2009-02-09 01:22:29 +00:00
rubidium 377ce6c5bf (svn r15410) -Cleanup: get rid of most of the references to the 'patches' except where it's used for backward compatability. 2009-02-08 12:25:13 +00:00
rubidium 7da743a0dc (svn r15336) -Fix: do not use _current_company in the GUI as there are no guarantees that _current_company is the same as _local_company. 2009-02-04 16:45:07 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
glx a92f472714 (svn r15254) -Fix (r15242): of course MSVC requires a cast 2009-01-24 14:10:24 +00:00
rubidium 04709f2798 (svn r15242) -Feature: allow moving clients between companies/spectators by the server and the clients themselves (dihedral) 2009-01-23 22:18:06 +00:00
truebrain a3dd7506d3 (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
2009-01-12 17:11:45 +00:00
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 2008-12-28 14:37:19 +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 6a931d67cd (svn r14390) -Codechange: replace magic constants with symbolic constants. 2008-09-23 15:24:15 +00:00
smatz 0757669c49 (svn r14283) -Fix [FS#2281](r14175): beep only after clicking on the main toolbar, not after finishing the selection 2008-09-09 17:42:31 +00:00
peter1138 38ee1c8d49 (svn r14181) -Fix (r14175): Rail types are not road types 2008-08-28 19:22:03 +00:00
peter1138 759fb5937d (svn r14175) -Codechange: Rewrite the main toolbars to use the standard dropdown menu system, allowing flexible menus instead of fixed string lists, and removing code duplication. 2008-08-25 20:42:54 +00:00
belugas 96892e081a (svn r13970) -Codechange: Replace numbers with Colours enum on network, toolbar and dropdown guis.
Mostly forgotten ones.
2008-08-03 02:18:45 +00:00
belugas c5cecdd2e3 (svn r13919) -Codechange: Replace numbers with Colours enum on osk(forgot 2 assignations), statusbar, subsidy, terraform, timetable, toolbar, town, tree and vehicle guis. 2008-08-02 02:28:17 +00:00
rubidium 3a799389eb (svn r13731) -Codechange: make a pool of the array of players. 2008-07-18 16:40:29 +00:00
belugas aede445e2a (svn r13672) -Fix(r13670): silent warnings that MSVC did not raised. Looks like enums can not be easily matched :( 2008-07-03 01:08:35 +00:00
belugas ce721a579f (svn r13670) -Codechange : Merge some very alike events handlers. 2008-07-01 00:04:09 +00:00
belugas 4f5eae2789 (svn r13663) -Codechange: Use a default parameter, hoping to reduce the different signatures of functions in menus 2008-06-30 14:58:58 +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
belugas de86235274 (svn r13646) -Change: typos and miss-aligned enum values 2008-06-27 16:16:35 +00:00
belugas dde4de5e20 (svn r13644) -Fix(r13643): compare an apple with an apple. MSVC seems to not care, but some other compilers do.
Thanks to glx :)
2008-06-27 02:26:51 +00:00
belugas e8cddf8baa (svn r13643) -Codechange: Enumify some loosely related values been used in the toolbar resizing processes 2008-06-27 01:26:13 +00:00
belugas 32ea99a741 (svn r13642) -Documentation: Add the enum values to the widget arrays, in concordance with code style 2008-06-26 17:43:56 +00:00
belugas 6d1e5a3f5b (svn r13641) -Fix: Misleading enum name. 2008-06-26 17:13:39 +00:00
skidd13 41b09d4027 (svn r13628) -Feature: enable building of aqueducts in the scenario editor
-Codechange: related to this split the waterway based buttons from the landscape generation window
2008-06-25 17:30:16 +00:00
belugas a6e0e2d837 (svn r13597) -Codechange: Enumification of the Map menu items.
The rework allowed to remove a function, by merging two quite similar ones.
2008-06-21 01:40:56 +00:00
belugas 1f4475d518 (svn r13590) -Codechange: Enumification of the Save/Load menu items 2008-06-20 01:55:00 +00:00
belugas bee7934220 (svn r13588) -Documentation: Document the function PopupMainPlayerToolbMenu. Makes it a bit clearer, don't you think? 2008-06-19 20:04:24 +00:00
belugas 4cc9439d65 (svn r13586) -Codechange: Using default parameter, for cases where there are few exceptions. 2008-06-19 19:58:26 +00:00
belugas be4e7b86f3 (svn r13562) -Codechange: Yet another enumification, which required a bit of explanation/documentation of a trickery some would call a hack 2008-06-18 03:19:31 +00:00
belugas 22c017c0c2 (svn r13561) -Codechange: two more enumifications of widgets 2008-06-18 02:38:28 +00:00
belugas f16b9dcd2b (svn r13560) -Fix(r13550): This section widget_count did not required to be lowered. So small revert 2008-06-18 02:04:01 +00:00
belugas 5408e1a51b (svn r13559) -Codechange: Enumification of the Options menu items 2008-06-17 23:51:17 +00:00
belugas 6d4590ec7c (svn r13550) -Fix(r13540, r13542): widget_count did not had the same value as 27. So, it has to be lowered by one, so it can be used as a widget "pointer" 2008-06-17 16:33:55 +00:00
belugas d3fa4228cb (svn r13543) -Codechange: Enumification of the InGame toolbar and some leftovers of scenario editor one.
Still more go do
2008-06-17 03:20:04 +00:00
belugas 37c58f606b (svn r13542) -Codechange: Less a few more magic numbers and a code a bit more adaptable, still 2008-06-17 03:13:09 +00:00
belugas da5fb0cf7e (svn r13541) -Codechange: Aligning some switch case. Code cosmetics. 2008-06-17 02:33:42 +00:00
belugas f5f05b4e86 (svn r13540) -Codechange: Less a magic number and a more adaptable code 2008-06-17 02:25:45 +00:00
belugas 0c342f3292 (svn r13536) -Codechange: Bit shifting is not really required when you know exactly the value to use.
Even more when it's a parameter.
2008-06-16 17:28:15 +00:00
belugas bf9a32b475 (svn r13515) -Codechange: Widget enumification for scenario editor 2008-06-14 02:00:20 +00:00
belugas 8cbb17384d (svn r13514) -Codechange: Removal of dead code (or useless, to be more exact) 2008-06-14 01:45:58 +00:00
belugas 5d828d8eee (svn r13504) -Codechange: enumify some widgets for scenario editor. More work is required. 2008-06-13 01:57:48 +00:00
belugas 3d07e5ca10 (svn r13503) -Fix(r13173)[FS#2073]: Wrong widget numbers & event handlers were assigned to the zoom in and out buttons in the scenario editor 2008-06-13 01:17:03 +00:00
rubidium 933c9df335 (svn r13339) -Feature: splitting of the main toolbar when the resolution becomes very low so the buttons are still visible and useable. Patch by Dominik. 2008-05-29 23:33:37 +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
rubidium 6c20f77330 (svn r13228) -Codechange: split console.h. 2008-05-24 10:15:06 +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
smatz 0d2266a3ac (svn r13208) -Fix (r13173): it was possible to open invalid submenu from dropdowns 2008-05-22 00:47:42 +00:00
rubidium 27c38052b7 (svn r13185) -Codechange: remove everything related to the WindowProc callbacks. 2008-05-19 09:48:47 +00:00
smatz 6864eedb1b (svn r13179) -Fix (r13173): r13178 applies to the main toolbar in Scenario Editor, too 2008-05-19 02:01:44 +00:00
smatz 70127934d1 (svn r13178) -Fix (r13173): the main toolbar didn't respect patch settings, it was always positioned on the right side 2008-05-19 01:57:30 +00:00
rubidium 09b5320a81 (svn r13173) -Codechange: make windows of the main toolbars. 2008-05-18 22:11:46 +00:00
rubidium 6da56ee87e (svn r13169) -Codechange: remove a (now) unneeded parameter of one of the Window constructors. 2008-05-18 20:40:30 +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 b08d728ac9 (svn r13108) -Codechange: make a Window subclass of the main toolbars sub menus. 2008-05-15 20:04:10 +00:00
rubidium eeb6381690 (svn r13106) -Codechange: rework the toolbar code a little so functions do not have to return the Window they just created. 2008-05-15 19:00:20 +00:00
glx ca4d92e2f2 (svn r13061) -Codechange: make a class of the BuildTreesWindow. 2008-05-12 21:46:08 +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 68a1d75d9e (svn r13025) -Codechange: remove the need for two WindowEvents. 2008-05-09 15:27:00 +00:00
rubidium f438700402 (svn r13024) -Codechange: do not use WE_MOUSELOOP when WE_TICK suffices, rename WE_4 to something more descriptive and correct some (completely incorrect) comments. 2008-05-09 09:29:27 +00:00
rubidium 9ed36409c5 (svn r13006) -Codechange: GetMenuItemIndex is only used for the toolbar, so move it to there. 2008-05-08 12:59:47 +00:00
rubidium 2eef026fe3 (svn r13004) -Codechange: replace AllocateWindow and AllocateWindowDesc with a Window constructor. 2008-05-08 11:31:41 +00:00
smatz 220bc49731 (svn r12994) -Fix (r12976): another case main toolbar wasn't marked dirty 2008-05-07 18:14:09 +00:00
smatz 0c4715d825 (svn r12992) -Fix (r12976): main toolbar wasn't marked dirty when a child combobox was destroyed 2008-05-07 15:53:58 +00:00
rubidium 3d5567ccf7 (svn r12987) -Codechange: split viewport and tile selection. 2008-05-07 13:10:15 +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 f1679bcbb7 (svn r12892) -Fix: too many items in the vehicle toolbars were greyed out. 2008-04-25 06:15:58 +00:00
rubidium c332c68170 (svn r12813) -Fix [FS#1943]: the 'last built railtype' got reset too often. 2008-04-21 07:57:51 +00:00
rubidium 0cecc4af20 (svn r12769) -Codechange: some coding style cleanups. 2008-04-18 15:18:16 +00:00
rubidium dc16b4f2b4 (svn r12767) -Codechange: merge all main toolbar related functions into a single file instead of scattering the functionality over several files. 2008-04-18 15:11:39 +00:00
rubidium 9d8fa486af (svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators. 2008-04-18 04:37:06 +00:00
rubidium b1d1a4ac66 (svn r12757) -Codechange: move all cheat related stuff from all over the place to a single location. 2008-04-17 21:21:01 +00:00
rubidium 37d961c8e7 (svn r12402) -Fix: some toolbars didn't seem to show anymore. 2008-03-24 05:59:42 +00:00
rubidium 65c7ef9629 (svn r12398) -Codechange [FS#1770]: Move toolbar related code to it's own little neighbourhood. Based on a patch by Dominik. 2008-03-23 07:35:29 +00:00