Commit Graph

169 Commits

Author SHA1 Message Date
Darkvater f475636186 (svn r7638) -Codechange: Remove special window ShowJoinStatusWindowAfterJoin and shuffle around
some code for SetupColorsAndInitialWindow. Because we know that after a successful
 load all windows are removed we can setup default windows in this function, and
 show ShowJoinStatusWindow in PACKET_SERVER_MAP.
-Setup the global _network_join_status for ShowJoinStatusWindow in the only two
 places where the function is called, instead of inside it.
-Turn the join status window into a modal window of the network window so it
 stays on top.
2006-12-30 01:52:09 +00:00
Darkvater c87fcab772 (svn r7637) -Codechange: Change ShowQueryString to use a window pointer as a parent. If the
query has no parent (eg give money, rename waypoint), the global function
 HandleOnEditText is used.
2006-12-30 01:17:53 +00:00
Darkvater 9b9add65c3 (svn r7523) -Feature: Add the possibility to change the newgrf configuration of a running game.
This is only possible in SP (or in the intro menu). During game play you will
 get a confirmation window when applying the changes as some actions can crash
 OpenTTD and/or make your current game unplayable.
2006-12-21 10:29:16 +00:00
glx 8bf9f5f7fd (svn r7511) -Fix(r7505): Fix network game list selection by enlarging by two pixel and adding a new row to it 2006-12-19 14:24:45 +00:00
rubidium 32db875d97 (svn r7505) -Feature: show NewGRFs used on a game server, show which NewGRFs you do and do not have.
-Feature: show NewGRF compatability of network games in the Game List window; a green square if you got the same OpenTTD version and have the needed NewGRF, a red square if the version does not match and a yellow square if the version matches, but the client is missing at least one of the NewGRFs.
2006-12-18 12:26:55 +00:00
matthijs 9218fc16e6 (svn r7372) - CodeChange: Rename all GetXXXArraySize() functions to GetNumXXX() and add GetMaxXXXIndex() functions. This prepares for the new pool interface. 2006-12-05 13:58:20 +00:00
Darkvater 53f954edd3 (svn r7206) -Codechange: Remove (some of) the magic needed for windows that could be invalid after
a call to DeleteWindow() somewhere else. Also do some cleanup with AllowWindowDescFront()
2006-11-18 17:04:44 +00:00
Darkvater d50f6c8a8c (svn r7128) -Codechange: Replace magic numbers by magic enums (windowdesc positioning WDP_AUTO = -1) 2006-11-10 19:24:14 +00:00
Darkvater c94db0a929 (svn r7077) -Codechange: Send proper message to network window, and handle selection control in
there instead of calling function.
2006-11-06 00:14:36 +00:00
Darkvater 2543ab6b27 (svn r6956) -Feature: Increase the chatbuffer of chat messages. Messages longer than the allocated
graphical box will be wrapped to a new line.
2006-10-27 11:08:17 +00:00
Darkvater b63d946898 (svn r6937) -Codechange: Add an InitializeTextBuffer() function that handles setting up the
textbuffer instead of typing it out each and every time.
2006-10-24 22:57:44 +00:00
Darkvater 2b8530507d (svn r6933) -Feature: Allow spectators to speak to eachother (team) 2006-10-24 22:26:20 +00:00
Darkvater bc018eb7ac (svn r6931) -Codechange: Change textmessage format a bit. Only the sender's name and target are
in the sender's colour, the actual message is in white. Should improve readability.
2006-10-24 22:19:12 +00:00
Darkvater 1e69ac550d (svn r6926) -Codechange: Rename WWT_4 to WWT_TEXTBTN_2 and WWT_6 to WWT_INSET (credits to peter1138
for the aptly found name)
-Codechange: Remove the explicit numbering from WindowWidgetTypes
2006-10-24 16:27:18 +00:00
Darkvater d303ef94b3 (svn r6925) -Codechange: Be more strict with widget distinctions. WWT_PANEL is only plain panel,
WWT_IMGBTN must contain an image for drawing. Renamed WWT_PANEL_2 to WWT_IMGBTN_2
 because that is what it is. Added WWT_PUSHBTN that is either just a pushable button,
 or a textbutton, which text's drawn dynamically independent of widget.
2006-10-24 14:15:17 +00:00
Darkvater ee27bb497c (svn r6884) -Codechange: Add strict bounds checking in string formatting system.
The last parameter should point to the end of the buffer (eg lastof(buf))
 Courtesy of Tron.
2006-10-21 23:31:34 +00:00
Darkvater e550bccf15 (svn r6879) -Codechange: Remove the superflouos argument CharsetFilter parameter from HandleEditBoxKey
as the same information is present in querystr_d->afilter
-Also (&((querystr_d *)&WP(w, querystr_d))->text is the same as &WP(w, querystr_d).text
2006-10-21 22:50:57 +00:00
Darkvater 91b9b3ab18 (svn r6876) -Codechange: Change the naming of _PLAYER in DESTTYPE_PLAYER/NETWORK_ACTION_CHAT_PLAYER
to _COMPANY as that is whom you are really addressing to. Also change some variable
 names, 'desttype' is confusing if there is also a parameter 'dest', so rename it to
 just type.
2006-10-21 22:29:14 +00:00
Darkvater 5b72dd22e8 (svn r6854) -Codechange: Use DrawSringCentered instead of DrawStringMultiCenter for simple
strings if maximum width is set to zero anywyas.
2006-10-20 10:48:46 +00:00
Darkvater 6b55f4cf07 (svn r6825) -Codechange: Remove two globals from chat-window 2006-10-18 21:19:04 +00:00
Darkvater b944a133cb (svn r6824) -Feature: Change the functionality of the chat window. SHIFT+ENTER (SHIFT+T)
sends a message to all players, CTRL+ENTER (CTRL+T) sends a message to all
 team mates and ENTER (T) sends a message to teammates if you have any, otherwise
 to all players.
 The chat-window now also shows what kind of message is being sent. Shortcut
 functionality has not been changed (ENTER sends message, ESC closes window)
2006-10-18 21:07:36 +00:00
Darkvater 68314cf576 (svn r6820) -Codechange: Some more const correctness, coding style.
-Codechange: Add FOR_ALL_ACTIVE_CLIENT_INFOS macro that will loop all clients
 skipping inactive ones.
2006-10-18 13:17:46 +00:00
Darkvater e97d801d92 (svn r6816) -Codechange: Some coding style, variable localization, const correctness.
-Codechange: 'quited' is not a word, use has_quit instead for NetworkClientState
2006-10-17 23:34:12 +00:00
Darkvater fbc724c6cb (svn r6814) -Codechange: For network games ci->client_playas was always p->index + 1. To
correctly handle this ci->client_playas - 1 was used all over the code making
 it pretty confusing at times. Use proper one-on-one values now. Special handling
 is only needed for user-output to not to confuse users.
2006-10-17 22:16:46 +00:00
Darkvater d5baf25923 (svn r6787) -Codechange: Use PLAYER_NEW_COMPANY as a player identifier wishing to become a
new player instead of a 0.
2006-10-15 23:48:34 +00:00
Darkvater dad5d5dd72 (svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to PLAYER_SPECTATOR and
put it into player.h where it belongs (instead of map.h)
2006-10-14 15:49:43 +00:00
Darkvater cad526ef36 (svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
disabled hardcode _networking/_network_available to zero and let the compiler
 handle all optimizations.
2006-10-12 14:59:27 +00:00
Darkvater d983d93732 (svn r6750) -Codechange: Juggle around some header includes as they're only used when
networking is enabled.
2006-10-12 14:13:39 +00:00
Darkvater 68d703bb5d (svn r6688) -Fix (r6297): Wrong caption for server password query window (eg put 'break' after switch statements) 2006-10-08 11:54:47 +00:00
belugas 17eb65050b (svn r6631) -Codechange: Use accessors for click_state.
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
2006-10-03 20:16:20 +00:00
belugas 753b572400 (svn r6619) -Codechange: Use accessors for disabled_state.
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
2006-10-03 02:08:15 +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 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
tron 8ef52bc43c (svn r6297) -Codechange: Disentangle the query window mess a bit: Move the network game password handling somewhere were it belongs to 2006-09-01 13:35:43 +00:00
tron d8436d15ae (svn r6276) Remove a redundant assignment 2006-08-31 14:54:25 +00:00
Darkvater 2f6a4bc1a9 (svn r6169) -Codechange: Use GetString() instead of GetStringWithArgs() which should be
integral to strings.c
2006-08-27 10:04:33 +00:00
truelight 5fd9aeb12b (svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 (or, will do that).
It isn't the best name, but we couldn't find any better.
  This unifies the pool-system even more.
2006-08-22 20:41:26 +00:00
truelight 0461d89612 (svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones
-Codechange: use IsValidXXX where ever possible
  Note: both changes to prepare for new pool system, which needs those changes.
  For every pool there are 2 ugly lines, which will be removed when done
  implementing new pool system.
  Based on FS#13 by blathijs, partly implemented.
2006-08-22 15:33:35 +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
rubidium 893d4ba9d4 (svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant. 2006-08-20 19:05:28 +00:00
truelight c07a8613a2 (svn r5972) -Fix: usr strrchr instead of your own function (tnx Darkvater)
-Codechange: added some comments and const correctness (Darkvater)
2006-08-20 12:03:39 +00:00
truelight cc7680e0f1 (svn r5968) -Feature: add auto-completion in chat-window. It completes Player-Names and
Town-Names (that order) using <tab>. Based on FS#28 by egladil.
2006-08-20 10:51:27 +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
rubidium 0d3ccad29f (svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and BASE_YEAR when comparing _cur_year with a 'full' year.
-Cleanup: replace some magic '1920' values with BASE_YEAR.
2006-08-15 15:18:03 +00:00
rubidium 243872b4fd (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
2006-08-14 14:21:15 +00:00
Darkvater a9251d2d02 (svn r5767) - Cleanup: Improve upon the header file mess regarding fios. Move all relevant types from hal.h into fios.h, eliminate the unneccessary passing of a global variable, and extern variables in header files (declare in fios.c and misc_gui.c 2006-08-05 00:59:45 +00:00
Darkvater 7c87c2e752 (svn r5655) -Fix [SF 1424115]: Reversed arrow-sign in the multiplayer list column headers on sort by name 2006-07-30 14:57:28 +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