Commit Graph

83 Commits

Author SHA1 Message Date
belugas 4ebb3857e7 (svn r6599) -Codechange: Add accessors around the members click/disabled/hidden_state of Window
This is the first step toward merging XTDwidget.
2006-10-01 01:32:07 +00:00
bjarni f7769e885e (svn r6513) -Codechange: unified the code to draw depot windows
This change is intended to make it easier to make depot behaviour consistent
   and faster to code when adding more features in the future
   The user interface should hopefully not be affected by this
2006-09-26 16:47:51 +00:00
bjarni 8f4a4a81da (svn r6503) -Codechange: added a function to tell what vehicles a depot contains
This will ensure that you can always get the same list when checking for vehicles in a depot (no need to duplicate code for each place, that needs such a list)
   Since the vehicles are only looped once for each redraw, drawing speed is around twice as fast (measured to be 114%-121% faster depending on the number of vehicles in the game)
2006-09-24 15:01:02 +00:00
belugas 1c56a5ae0f (svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct 2006-09-23 02:39:24 +00:00
Darkvater 56d06ba0a7 (svn r6379) -Codechange: cast 'remove babel' on widget's unkA and rename it to 'data'. 2006-09-04 15:44:28 +00:00
Darkvater 794cc6d55e (svn r6372) -Codechange: static, unneeded decleration in headers, superfluous header includes
-Codechange: Unify the Sorting struct both for vehicle-lists and network-lists.
2006-09-03 23:27:38 +00:00
bjarni 01a566429c (svn r6345) -Codechange: AllocateWindowDescFront() now ensures that window_number is set before calling the WE_CREATE event
this allows using the window_number in WE_CREATE window event handlers
2006-09-02 20:09:16 +00:00
tron 96f9a0ad7b (svn r6210) Remove FR_NOBORDER, because it is exclusivly used in conjunction with FR_TRANSPARENT 2006-08-29 06:39:00 +00:00
tron 17c610c0f4 (svn r6209) Move DrawFrameRect() out of gfx.[ch], because it uses data (_color_list) which the renderer shouldn't have know about 2006-08-29 06:07:57 +00:00
rubidium 27cee58ab8 (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc. 2006-08-28 18:53:03 +00:00
belugas 4c2abf1de5 (svn r6046) CodeChange : Rename WWT_5 Widget type to WWT_LABEL : a centered label
CodeChange : Move almost all fixed strings from ON_PAINT event to Widget array using WWT_LABEL.
Feature : All "Select Refit Cargo" are now centered, instead of been left aligned
2006-08-22 15:23:25 +00:00
rubidium 480af9c917 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 2006-08-22 14:38:37 +00:00
truelight 2849e4fea9 (svn r6038) -Codechange: move mousewheel code to event WE_MOUSEWHEEL instead of a general function that handles that
-Codechange: use always 'e' for WindowsEvent, neverr 'we'
2006-08-21 14:59:58 +00:00
truelight 9ec2fdcbf3 (svn r6036) -Codechange: do not handle SCROLL in a central function, but let windows handle them theirself. Added WE_SCROLL for this. 2006-08-21 14:34:59 +00:00
truelight 2309eeb8de (svn r5971) -Fix: wrong struct in assert_compile (thomasdev) 2006-08-20 11:51:10 +00:00
truelight 10b842bddc (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- New optional landscape generator (TerraGenesis Perlin)
  - Load heightmaps (either BMP or PNG)
  - Progress dialog while generating worlds (no longer a 'hanging' screen)
  - New dialogs for NewGame, Create Scenario and Play Heightmap
    - Easier to configure your landscape
    - More things to configure (tree-placer, ..)
  - Speedup of world generation
  - New console command 'restart': restart the map EXACTLY as it was when you
      first started it (needs a game made after or with this commit)
  - New console command 'getseed': get the seed of your map and share it with
      others (of course only works with generated maps)
  - Many new, world generation related, things
  - Many internal cleanups and rewrites
  Many tnx to those people who helped making this:
     Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
  Many tnx to those who helped testing:
     Arnau, Bjarni, and tokai (alfabetic)
  And to all other people who helped testing and sending comments / bugs
  Stats: 673 lines changed, 3534 new lines, 79 new strings
2006-08-19 10:00:30 +00:00
truelight 83d56d6d79 (svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only
allow certain patterns (like numbers only)
2006-08-19 09:31:22 +00:00
tron ba14683912 (svn r5894) Remove a totally unnecessary indirection in the vehicle sorter code. Less code, less data, simply better 2006-08-14 20:25:29 +00:00
belugas 6082507fea (svn r5609) CodeChange : Apply coding style 2006-07-26 03:33:12 +00:00
tron 2b27073156 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 2006-06-27 21:25:53 +00:00
celestar 48d991b819 (svn r4822) -Feature: Station List View can now be sorted and filtered (by waiting cargo type and facilities) 2006-05-11 10:33:58 +00:00
Darkvater b68b9b149a (svn r4301) - Fix: the maxlength parameter of Textbuf is supposed to be the size of the buffer (so length of string + '\0'), but in the code it was a mix of both. It didn't cause any problems though, only an occasionaly one-less character than allowed. (thanks Tron for noticing) 2006-04-06 19:11:41 +00:00
Darkvater d5909f901a (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 2006-03-26 22:23:32 +00:00
bjarni 78b51cbec2 (svn r3535) -Feature: [autoreplace] allow autoreplacing of train wagons
currently ALL available wagons are displayed in the right menu in the replace window
	however the replacement will only be done if the new wagon can be refitted to carry same cargo as the old one is currently carrying

	Since the standard vehicles do not have any valid wagon replacements, this feature can only be used when using newgrf sets
2006-02-04 18:25:07 +00:00
Darkvater a235c72b0d (svn r3461) - Fix: Increase window-size as for 64-bit machines it wasn't enough 2006-01-28 11:52:20 +00:00
Darkvater 070edf2f73 (svn r3441) - Feature: Allow the network game list to be sorted (by name/clients/compatibility ascending/descending) 2006-01-26 17:10:11 +00:00
Darkvater 2612d48550 (svn r3439) - CodeChange: Remove a whole bunch of global variables and put them into the WP() macro. Also combine more than one WP-custom element. For this the maximum size of w->custom (WP) has been increased, and multiple types put inside one with possibly moved to the corresponding gui file if it is only used there. 2006-01-26 16:19:24 +00:00
tron e272b03fee (svn r3365) Staticise 36 functions 2006-01-05 12:40:50 +00:00
tron 980e8f525b (svn r3364) Remove 3 unused functions (ScrollWindowToTile, AllocateWindowAutoPlace, AllocateWindowAutoPlace2) 2006-01-05 12:00:38 +00:00
tron f2db7e7245 (svn r3336) byte -> WindowClass, uint16 -> WindowNumber 2005-12-24 15:01:17 +00:00
peter1138 ec274769b9 (svn r3302) - Fix: split drawing of text buttons and the closebox, so the closebox symbol can be centred. 2005-12-14 08:05:36 +00:00
peter1138 04f39ef749 (svn r3291) - Codechange, Autoreplace: Replace int with EngineID and -1 with INVALID_ENGINE, as appropriate. 2005-12-13 09:57:07 +00:00
peter1138 4d2c4c5d8a (svn r3225) - Fix for "[ 1359165 ] Autoreplace problem with r3171 and later" -- Move the disabled/hidden bits to custom data in window struct. 2005-11-22 14:02:45 +00:00
peter1138 6124ee0974 (svn r3178) - Codechange: move static _dropdown_* vars into the window custom data, giving var1 and var2 more meaningful names. 2005-11-14 08:42:45 +00:00
tron 357aba7475 (svn r3176) Use proper types, not some variants of int 2005-11-13 21:16:34 +00:00
truelight 53ddd87dc2 (svn r3162) -Fix: renamed 'Message' to 'WindowMessage', a struct named 'Message' already
exists on MorphOS
2005-11-10 15:23:55 +00:00
tron 62d7732273 (svn r3133) - static, const
- remove long unused stuff and bogus comments
- complement struct typedefs
- remove read-only (_demo_mode) and unused (_fix_mouse_at) global variables
2005-11-04 14:01:44 +00:00
tron 47137cefb7 (svn r3078) Some more stuff, which piled up:
- 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-23 13:04:44 +00:00
tron 3397e202c8 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 2005-10-07 07:35:15 +00:00
peter1138 9c2700b14c (svn r2974) -Fix: Drag and drop selection on drop down boxes didn't select correct item when some items were hidden.
-Separate disabled and hidden masks in drop downs to support both hidden and disabled items.
2005-09-23 07:44:03 +00:00
Darkvater 8e6a911700 (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
2005-09-18 20:56:44 +00:00
celestar 727dea5824 (svn r2734) -Feature: The Main Toolbar Dropdown Menu can now display disabled items 2005-07-28 08:49:29 +00:00
celestar 238e47cd42 (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
by enums. There remains work in gfx.c to move the "transparency" and
"recolor" bits around to make space for more sprites. However, 2800
additional sprites can now be loaded. There also remains cleanup and
Doxygen work on many of the header files.
2005-07-24 15:56:31 +00:00
tron a227065ab7 (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron 0762aa9ec9 (svn r2669) Shuffle some more stuff around to reduce dependencies 2005-07-21 22:15:02 +00:00
tron 59d4ab3752 (svn r2626) static, const, misc. 2005-07-17 20:14:58 +00:00
ludde a069876725 (svn r2573) Codechange: Removed WDF_RESTORE_DPARAM, it's not needed with the new string system.
Also fixed a bug introduced in r2564, forgot to remove 4 global variables in network_gui.c.
2005-07-15 15:09:52 +00:00
Darkvater a014ef6340 (svn r2530) - Fix: [ 1219829 ] Mouse-wheel crashes OTTD. Widget detection failed to detect the most-right and most-bottom pixels of a widget. If scrollwheel is used on a not-found widget (such as the background of the toolbar), it will now fail correctly (glx) 2005-07-08 00:14:19 +00:00
tron 3154e7148d (svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile" 2005-06-24 12:38:35 +00:00
hackykid 8607bbf06d (svn r2444) - CodeChange: Add an enum for demagicifying the values of the 'flags' parameter of DrawFrameRect(). (_Abraxa_) 2005-06-15 17:27:14 +00:00