Commit Graph

255 Commits (42c8f50551d7a7bdd33dfa68578c6ba45dce2bb9)

Author SHA1 Message Date
truebrain e9f584ac21 (svn r23531) -Codechange: document and rename widgets to be consistent and understandable 13 years ago
truebrain 2aa774e831 (svn r23528) -Codechange: move widget enums to widgets/NNN_type.h 13 years ago
frosch dd74536bef (svn r22981) -Add: GroupStatistics for the ALL_GROUP. 13 years ago
rubidium ff143c6708 (svn r22413) -Document: even more stuff 13 years ago
frosch 652c9cb663 (svn r22247) -Codechange: Update comments wrt. ForceRebuild() in command-scope. 13 years ago
frosch ec9540a12a (svn r22241) -Codechange: Add additional to-be-used parameter to OnInvalidateData(). 13 years ago
frosch 1a3a1e3b0c (svn r22133) -Fix: some coding style. 14 years ago
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 14 years ago
rubidium 289206b033 (svn r21868) -Fix (r21866 and some more): the changes to the main toolbar rail types dropdown should happen for the autoreplace dropdown as well 14 years ago
frosch 9e538acc03 (svn r20461) -Codechange: Replace WWT_HSCROLLBAR, WWT_SCROLLBAR and WWT_SCROLL2BAR with NWID_HSCROLLBAR and NWID_VSCROLLBAR. 14 years ago
frosch 037d2ed436 (svn r20455) -Codechange: Rename some vscroll and vscroll2 to more suitable names. 14 years ago
frosch 71ca58c2bb (svn r20453) -Codechange: Remove direct accesses to Window::hscroll, vscroll and vscroll2.
Note: All windows get individual members with the same names, which are initialised via Window::GetScrollbar(). This caching is not required at all, but simplifies conversion.
14 years ago
frosch 10339c60c0 (svn r20452) -Codechange: Remove NWidgetCore::FindScrollbar() and associate scrollbar explicitly using a NWidgetPart via SetScrollbar(). 14 years ago
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 14 years ago
rubidium e356cb9405 (svn r20281) -Codechange: unify case scope closure + break coding style 14 years ago
alberth 4203e641f8 (svn r20223) -Codechange: Replace scrolled row calculations by a call to GetScrolledRowFromWidget(). 14 years ago
alberth 22b9bc5157 (svn r20043) -Codechange: Introduce vertical alignment for DrawStringMultiLine(). 14 years ago
yexo e6e2e8b473 (svn r19187) -Fix [FS#3634]: the vehicle info in the autoreplace gui was drawn even when the window was shaded 15 years ago
frosch 88019e64e1 (svn r18966) -Codechange: Remove Window::OnDoubleClick() in favour of a parameter for OnClick(). 15 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
alberth 91872aca48 (svn r18588) -Feature [FS#2943]: Add shading and unshading of windows. 15 years ago
alberth 5a083f183e (svn r18580) -Codechange: Use widget information only for setting scrollbar capacity. 15 years ago
rubidium 293dfd7c3e (svn r18322) -Codechange: remove the WDP duplication; no need to tell the same twice. 15 years ago
rubidium 14300d309c (svn r18277) -Codechange: remove unneeded widget indices for close, resize and sticky boxes and for window captions 15 years ago
rubidium 69b6d9309a (svn r18274) -Codechange: remove the unused WDF flags 15 years ago
rubidium cf354803d6 (svn r18238) -Codechange: make the autoreplace window big font aware 15 years ago
rubidium 747e123307 (svn r18235) -Fix: like r18233, but for the non-trains 15 years ago
alberth 5087bb545b (svn r18233) -Fix: Fix matrix widget of the autoreplace gui. 15 years ago
alberth 450e40b997 (svn r18230) -Codechange: Allow fill stepsize to be set from Window::UpdateWidgetSize(). 15 years ago
alberth bf93372ca2 (svn r18220) -Codechange: Reduce number of nested widget dynamic casts. 15 years ago
rubidium d913282e7a (svn r18212) -Codechange: remove unneeded 'parameters' for WWT_CAPTION, WWT_CLOSEBOX and WWT_STICKYBOX in the nested widget arrays 15 years ago
rubidium 5f2ddfbc5a (svn r18152) -Codechange: remove the 'minimum window size' from the WindowDesc; it's determined from the (nested) widgets 15 years ago
rubidium e7dd53dffc (svn r18119) -Codechange/Fix: always call OnResize so the matrices/scrollbars are initialised without the need for duplicating the OnResize code 15 years ago
rubidium 5589792d0c (svn r18118) -Codechange: improve behaviour of the engine lists (both build vehicle/autoreplace) w.r.t. large(r) fonts and RTL. RTL support for 'wider than usual' vehicles is still needed though. 15 years ago
rubidium f025475535 (svn r18117) -Codechange: don't pass the location of the vehicle count but whether to show the vehicle count 15 years ago
rubidium 3d2d7af88f (svn r18086) -Codechange: remove 'widget' from WindowDesc 15 years ago
rubidium d41302c310 (svn r18071) -Codechange: remove the need for {SKIP} in the autoreplace window + strings 15 years ago
rubidium 0b5698a5b0 (svn r17892) -Feature [FS#1760]: automatically select the railtype with the most engines for the autoreplace window/try to avoid showing an empty autoreplace list 15 years ago
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. 15 years ago
frosch 21fdc65ce4 (svn r17830) -Fix [FS#3276]: Some windows already need their window_number when setting up smallest size (e.g. for DParams). So assign it earlier in Window::InitializeData instead of dealing with each window separately. 15 years ago
alberth 7658bac2b5 (svn r17823) -Codechange: Use top of the matrix widget as offset for row calculation in autoreplace window. 15 years ago
frosch 41037308c0 (svn r17803) -Codechange: Remove update_(left|right) in favour of the rebuild flag of GUIList. 15 years ago
alberth 22ddb90fdb (svn r17785) -Codechange: autoreplace window uses pure nested widgets. 15 years ago
alberth 0c766b913c (svn r17784) -Codechange: Replace 'i' with 'side' when side is intended in the autoreplace window. 15 years ago
alberth 13c1694158 (svn r17783) -Codechange: Remove local pointer variable 'widget' from autoreplace window. 15 years ago
alberth 06e5ae020a (svn r17781) -Codechange: Remove local variable 'selected_group' from autoreplace window. 15 years ago
alberth f78bd1016c (svn r17780) -Codechange: A bit more code style in the autoreplace window. 15 years ago
alberth c3961b7a64 (svn r17764) -Codechange: Replace 'list' class variable in ReplacceVehicleWindow by 'engines'. 15 years ago
alberth 54b8523936 (svn r17763) -Codechange: Rename 'wagon_btnstate' to 'replace_engines', and 'init_lists' to 'reset_sel_engine' in ReplaceVehicleWindow, add doxygen comments. 15 years ago
alberth 321139782d (svn r17761) -Codechange: Removed some unused/unneeded variables from ReplaceVehicleWindow. 15 years ago
smatz 32cbe57178 (svn r17692) -Codechange: minor coding style fixes 15 years ago
rubidium 17313b6e3f (svn r17530) -Codechange: use QSortT instead of qsort for sorting EngineIDs 15 years ago
rubidium e69e3378b0 (svn r17367) -Codechange: make the autoreplace, bridge and build vehicle GUIs use the scrollbar wrappers 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 1fe3ad3288 (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 15 years ago
alberth d0a47fc1b4 (svn r16845) -Codechange: Introduction of constants for describing the bits in a WWT_MATRIX data field. 15 years ago
rubidium fd589b90e8 (svn r16841) -Cleanup: spaces/tabs where they don't belong 15 years ago
belugas 6262d3bb73 (svn r16611) -Doc Fix(r16606): "then" became "the" and now is gone.
In other words, fix a comment ;)
15 years ago
alberth c1ef6abc6a (svn r16606) -Doc: Added/fixed doxygen comments. 15 years ago
yexo 2a5a8f395c (svn r16433) -Codechange: Remove most of CmdSetAutoreplace and replace it with calls to CmdChangeCompanySetting 15 years ago
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
yexo 31eff1d4c3 (svn r16315) -Codechange: move the autorenew settings to a new CompanySettings struct 15 years ago
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. 15 years ago
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. 15 years ago
alberth 9d2738b9c4 (svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback 15 years ago
yexo 289837b95f (svn r15870) -Codechange: New widgets for the autoreplace window. 15 years ago
rubidium dfe5dad5f6 (svn r15807) -Codechange: let the build vehicle gui helper function pass around left and right instead of only left and assuming infinite width. 15 years ago
alberth 70d0f8857e (svn r15802) -Codechange: Complete autoreplace GUI widget numbers and add them as comment 15 years ago
rubidium 45f189fdca (svn r15785) -Codechange: remove the *Truncated part of the old text drawing API. 15 years ago
rubidium f9def73be6 (svn r15723) -Codechange: use a constructor for WindowDescs as that makes expanding them much easier (Alberth) 15 years ago
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 15 years ago
rubidium 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 15 years ago
peter1138 3728df8323 (svn r15448) -Codechange: Don't show rail types in selection drop downs if they have no label. 16 years ago
rubidium 90e2465d7d (svn r15427) -Codechange: give w->caption_color a more sensible name as it holds the owner of whatever is shown in the window 16 years ago
rubidium 9907742a0f (svn r15423) -Codechange: split widget related types to their own header and add a bit of type strictness. 16 years ago
rubidium 377ce6c5bf (svn r15410) -Cleanup: get rid of most of the references to the 'patches' except where it's used for backward compatability. 16 years ago
rubidium ac7757324e (svn r15338) -Fix [FS#2598]: close all construction related windows whenever changing company. 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
rubidium 1ef953e4a5 (svn r14989) -Codechange: remove a lookup table by reordering some items in english.txt (Swallow) 16 years ago
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 16 years ago
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 16 years ago
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. 16 years ago
peter1138 ff07598ce2 (svn r14157) -Codechange: Add and use string properties for rail types instead of relying on consecutive string IDs. 16 years ago
frosch 4eae917c1c (svn r14037) -Fix (r8610): The autoreplace gui showed vehicle types for replacement which CmdSetAutoReplace() did not accept. 16 years ago
belugas 1737ce45e3 (svn r13887) -Codechange: Replace numbers with Colours enum on autoreplace, build_vehicle, cheat, depot and dock guis.
The fact that it goes alphabetically is pure coincidence.
16 years ago
frosch 1f31e117f0 (svn r13850) -Fix [FS#2146]: Fix resp. implement refitting of articulated vehicles during autoreplace. 16 years ago
frosch 91486b116b (svn r13840) -Fix: Some glitches in the autoreplace GUI. 16 years ago
peter1138 49769dffba (svn r13784) -Codechange: Truncate vehicle names in purchase list to width of window. 16 years ago
peter1138 00e052ad39 (svn r13760) -Codechange: With multiple NewGRF engine sets, engine IDs may not be allocated in the order expected by GRF authors, so sort by 'list position' instead of engine ID for all vehicle types. 16 years ago
peter1138 f954a93ee0 (svn r13314) -Codechange: Switch EngineList from std::vector to GUIList 16 years ago
peter1138 f44a2c38f8 (svn r13313) -Fix-ish (r13306): List was copied in another place the autoreplace gui... 16 years ago
peter1138 bb00206736 (svn r13306) -Fix (r8362): Pass engine list by pointer instead of making a copy of it. 16 years ago
peter1138 f7a9c4f522 (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp 16 years ago
rubidium 27c38052b7 (svn r13185) -Codechange: remove everything related to the WindowProc callbacks. 16 years ago
rubidium 87015f5b63 (svn r13140) -Codechange: move the gui-list-sorting out of window_gui.h so window_gui.h only needs to be included in *_gui.cpp. 16 years ago
rubidium 8b54212900 (svn r13139) -Codechange: move DrawWindowWidgets and DrawWindowViewport to the Window class and remove Window from their naming. 16 years ago
rubidium bb3bd587a6 (svn r13076) -Fix [FS#2012]: the wrong autoreplace window would be shown if the vehicle isn't a train. 16 years ago
rubidium dddfaaac7d (svn r13069) -Codechange: it is no longer needed to pass a void *data pointer with the WE_CREATE message because nothing uses it anymore. 16 years ago
rubidium e63137f47f (svn r13041) -Fix: calling a virtual function on a not fully constructed object is bound to cause errors. 16 years ago
rubidium b47a151bce (svn r13037) -Codechange: make a class of the ReplaceVehicle window.
-Fix [FS#1997]: MSVC 64 bit build failing to compile due to std::vectors being very large..
16 years ago
rubidium c32559ac12 (svn r13035) -Codechange: remove two needless global-ish variables. 16 years ago
glx 0b37b81956 (svn r13019) -Fix [FS#1997]: silence some more MSVC x64 warnings (michi_cc) 16 years ago
rubidium 23fc96c3e8 (svn r13005) -Codechange: prepare AllocateWindowDescFront for subclassing of Window. 16 years ago
smatz 3445b8054c (svn r12995) -Codechange: use std::vector for EngineList instead of C/C++ wrapper for CBlobT 16 years ago
rubidium 9bf519f26b (svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL. 16 years ago
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. 16 years ago
peter1138 a00371c8db (svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist. 16 years ago
peter1138 5ca6fd67fc (svn r12917) -Codechange: standardise variable names called with FOR_ALL_ENGINEIDS_OF_TYPE 16 years ago
bjarni 501b89b8de (svn r12843) -Feature [FS#1945]: The autoreplace window is now resizable in both directions
The code to open this window is also unified for all vehicle types
16 years ago
belugas da134d5a39 (svn r12837) -Codechange: Alignment of widget array 16 years ago
rubidium ef2be7d0fc (svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h. 16 years ago
rubidium 878489e38d (svn r12469) -Codechange: split type related stuff from group.h (and openttd.h) to group_type.h. 16 years ago
peter1138 a528dc89c7 (svn r12054) -Cleanup: Use VehicleType instead of byte for vehicle types... 17 years ago
peter1138 2fc2188127 (svn r11989) -Fix: Resize autoreplace window to fit purchase information text if it is too large. 17 years ago
peter1138 70025a149d (svn r11918) -Codechange: Draw engine lists at widget positions instead of fixed pixel positions 17 years ago
peter1138 307b0e8e7a (svn r11912) -Codechange: use dropdown widget for autoreplace, station builder and (second?) vehicle list windows 17 years ago
peter1138 ada41b7b3f (svn r11911) -Codechange: use enum for autoreplace window widgets 17 years ago
frosch 35f3421842 (svn r11899) -Cleanup: Remove ShowReplaceVehicleWindow() as it is basically a duplicate of ShowReplaceGroupVehicleWindow(). 17 years ago
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. 17 years ago
rubidium d4e6a6bf57 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 17 years ago
rubidium ac528411df (svn r11818) -Codechange: split player.h into smaller pieces. 17 years ago
rubidium 0e517fe023 (svn r11787) -Codechange: more header rewrites. This time related to viewport.h. 17 years ago
rubidium a8a3a7e3f2 (svn r11775) -Codechange: move all autoreplace/autorenew functions to a single location. 17 years ago
peter1138 24784b7e0d (svn r11737) -Fix: Reinstate NewGRF-specified engine list order in autoreplace window. 17 years ago
rubidium 384503e7d3 (svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes. 17 years ago
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' 17 years ago
rubidium 9e9cfe6e59 (svn r11677) -Codechange: move price and command related types/functions to their respective places. 17 years ago
rubidium 433a9f3c09 (svn r11675) -Codechange: split the string types from the string functions. 17 years ago
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. 17 years ago
rubidium 7db6c7db38 (svn r11664) -Codechange: use more specific ("rail_type.h" instead of "rail.h" that includes way more than only "rail_type.h") includes at some places. 17 years ago
rubidium ec90ce7e98 (svn r11643) -Codechange: conform with the coding style for the WP macro uses. 17 years ago
rubidium 527b72749d (svn r11555) -Codechange: use the new members introduced in r11551. 17 years ago
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 17 years ago
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)
17 years ago
rubidium ac838de385 (svn r10992) -Fix [FS#1132]: huge amount of vehicles in the "ungrouped" group. Patch by frosch. 17 years ago
rubidium c03cb2c8db (svn r10704) -Codechange: provide an infrastructure to have resizable windows that are smaller than the default window size. 17 years ago
rubidium efc7fdf2fd (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h 17 years ago
rubidium 7aec26887c (svn r10567) -Add [FS#915]: a "group" with ungrouped vehicles. Patch by Matthias Wolf. 17 years ago
peter1138 de357c74c1 (svn r10363) -Fix [FS#911]: invalidating autoreplace windows didn't take account of vehicle group (Matthias Wolf) 17 years ago
peter1138 d69589b3c2 (svn r10324) -Codechange: reference engine names by index 17 years ago
rubidium d234e97f8b (svn r9919) -Codechange: prepare some more places for more road types. 17 years ago
rubidium 7d4be11516 (svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13. 17 years ago
rubidium ba24c34f85 (svn r9869) -Codechange: replace some bytes with VehicleType, i.e. more type strictness. 17 years ago
glx 94b3ea7b34 (svn r9528) -Fix r8610: don't try to modify non-existent widgets (many thanks to Bruce Perence, the libefence developer) 17 years ago
rubidium ce919e8c71 (svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code). 18 years ago
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 18 years ago
belugas a723770836 (svn r8853) -Cleanup: doxygen changes. Correct forgotten c files to cpp files with the @file tag as well as a few general comments style 18 years ago
bjarni 037d636734 (svn r8621) -Codechange: assigned new numbers to the VEH_(type) enum so that VEH_Train is 0, VEH_Road is 1 and so on
This means that "v->type" can be used as array indexes instead of VehTypeToIndex() (or "v->type - VEH_Train/0x10 as the code still used in some places)
  Surprisingly this can be done without changing the savegame format
18 years ago
bjarni 80125fd934 (svn r8610) -Codechange/Feature: rewrote the list handling in the autoreplace window
-The user will notice the following changes:
      All vehicle types behaves in the same way
      Adding/removing an engine (new design and so on) can no longer result in the window selecting a new engine
      All valid replacements will be displayed since it looks at refitting options as well (this solves the missing ships with the newships GRF)
      Since you can't replace an engine into itself, the engine selected in the left list will no longer appear in the right list

   -The code changes:
      Instead of looping all engines all the time, each list generates a list like the build windows
        This ensures consistent list generation since only one function can loop all engines
      Unified code for all vehicle types
      It now use the lists to call the drawing code in the build vehicle window
      Works on selected EngineIDs instead of selected index in the list
18 years ago
rubidium c8882bd3d2 (svn r8511) -Codechange: make WindowClass an enumerated value. 18 years ago