Commit Graph

108 Commits

Author SHA1 Message Date
Darkvater
0d310e213a (svn r3933) - [ 1439907 ] Increase client list window width so at least most languages fit (wikipedian). 2006-03-17 23:47:03 +00:00
tron
1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
Darkvater
009e9bf424 (svn r3501) - Load the lobby-window with up-to-date data upon opening 2006-01-31 22:24:02 +00:00
Darkvater
bfe7040cde (svn r3499) - Fix: a few gui glitches in the network window:
1. disable widgets also when the active companies/spectators is bigger than the max.
     This can happen if the server has changed the settings.
  2. updated scroll-count in the lobby as the window is higher.
2006-01-31 20:05:44 +00:00
Darkvater
35e369336e (svn r3494) - Update several languages. Thanks all translators online atm (Bjarni, glx, MeusH, Tron, me, my sister)
- Remove the most blatant of untranslated or wrongly-outdated strings.
2006-01-30 22:36:35 +00:00
Darkvater
3f7cb3d0eb (svn r3478) - Fix: In the network game list do the default sorting on connectivity (so servers which you can join are on top) and sort on names as a second criteria on clients and connectivity. 2006-01-29 20:24:18 +00:00
Darkvater
35c5738689 (svn r3469) - Fix: plug a possible memleak with subsequential strdup's without freeing the previous value and make it possible to ban offline clients 2006-01-29 18:04:52 +00:00
Darkvater
0855449106 (svn r3442) - Fix: Only windows has stricmp. So define strcasecmp to stricmp when using MSVC 2006-01-26 17:32:49 +00:00
Darkvater
227769d709 (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
1ba8bcd0de (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
Darkvater
f99a200470 (svn r3438) - Fix: first request company data, then general. Yes, it should be the other way around, but with the current network code this doesn't work. So workaround (have some nice promise from TrueLight for fixing ;)) 2006-01-26 15:55:53 +00:00
Darkvater
1be559cfb8 (svn r3435) - Fix a warning, removed unused extern and some comments in network_gamelist.c 2006-01-26 13:01:53 +00:00
Darkvater
7eaac72326 (svn r3434) - Correctly update all network information when pressing refresh in the lobby. Also always allow the join button to a server unless all clients are used up (otherwise you can always join an existing company 2006-01-26 12:56:05 +00:00
Darkvater
f14df34790 (svn r3429) - Feature (Followup): Change the gamelist window to accomodate for the new information. 2006-01-25 19:03:50 +00:00
Darkvater
082aa38f79 (svn r3427) - Feature: Allow seeing and setting the maximum amount of companies and spectators for a server. This can be changed/viewed during runtime as well in the console. 2006-01-25 18:11:06 +00:00
tron
849fff602d (svn r3336) byte -> WindowClass, uint16 -> WindowNumber 2005-12-24 15:01:17 +00:00
Darkvater
eea9e95278 (svn r3322) - Fix: Network window crash when it receives invalid information for example from the integrated nightly, so validate the network-input when it is received
- CodeChange: added str_validate(char *str) function that checks if a string contains only printable characters and if not, replaces those characters by question marks. Also move IsValidAsciiChar() to string.h
2005-12-20 20:52:05 +00:00
tron
a2533d5ee6 (svn r3298) Remove unused and write-only variables 2005-12-14 06:28:48 +00:00
peter1138
5f3dc36983 (svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing. 2005-12-07 15:48:52 +00:00
tron
ea1921d2e0 (svn r3211) Fix typo in r3181 2005-11-16 16:16:18 +00:00
tron
9d0e7b6458 (svn r3181) -Bracing
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
2005-11-14 19:48:04 +00:00
tron
81e5b16d71 (svn r3172) static, const 2005-11-13 13:43:55 +00:00
tron
181d586a7c (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
647cbd6bdd (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron
54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 2005-07-22 07:02:20 +00:00
Darkvater
09195e0bda (svn r2624) - Fix: oops, forgot to change the already in use DrawStringCenteredTruncated() functions. 2005-07-17 19:38:40 +00:00
Darkvater
6a91b08cad (svn r2610) - Feature: set server map name to the loaded name of the game/scenario. Also truncate where neccessary
- Feature: truncate the path of the saveload window
2005-07-17 16:01:26 +00:00
ludde
bb82f5e5d4 (svn r2581) Fix: Behave a bit safer if central server sends bogus information about clients.
Change: Made code a little bit more readable by putting _selected_item in a local var with a shorter name.
2005-07-15 18:43:39 +00:00
ludde
6246619185 (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
ludde
8086017097 (svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
Added a way to bind a C-string to an openttd string which doesn't modify the game state.
2005-07-14 09:43:59 +00:00
Darkvater
871e21e991 (svn r2422) - Codechange: magic number fix in network window (anonymous) 2005-06-06 14:11:15 +00:00
tron
1273f21ff5 (svn r2405) Simplify a few '? true : false' and '? false : true', especially the latter is confusing 2005-06-04 07:35:12 +00:00
Darkvater
ba8c649fac (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 2005-06-02 19:30:21 +00:00
Darkvater
f4f5cb93f8 (svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big.
- Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
2005-05-30 22:16:05 +00:00
Darkvater
b51c190546 (svn r2348) - Fix: Do not scroll the game with the arrow keys when the chatbox is open 2005-05-17 23:25:18 +00:00
Darkvater
ddd4958164 (svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
- CodeChange: remove cmd-misuses CmdStartScenario() and CmdDestroyCompanyHQ()
- Fix (invisible): when parameter checking CmdRestoreOrderIndex() the vehicle did not have its orders yet, so it would fail. So move doing this until AFTER the orders have been added back in RestoreVehicleOrders()
2005-05-12 23:46:01 +00:00
Darkvater
eb4233e8e9 (svn r2298) - CodeChange: removed CmdAbuses: CmdSetTownNameType(), CmdStartNewGame(), CmdCreateScenario(), CmdSetNewLandscapeType() and CmdGenRandomNewGame().
- CodeChange: renamed CmdTrainGotoDepot() to CmdSendTrainToDepot() to be consistent with other depot commands.
- CodeChange: 'newgame' console command now calls the unabused GenRandomNewGame(). For the server it still creates a new game, a client quits the game and continues in SP.
- CodeChange: in the game-difficulty window, setup the disabled buttons on window creation, not every redraw.
2005-05-12 00:18:30 +00:00
Darkvater
6e9ef3e30a (svn r2252) - ReFix: Redo r2251. Just remove the 'default widget handler', WDF_STD_BTN, instead of doing the "workaround" of the previous commit 2005-05-02 18:22:16 +00:00
Darkvater
5ee09dd208 (svn r2251) - Fix: [ 1193945 ] Clicking on the chat text box causes an assertion failure 2005-05-02 18:08:34 +00:00
Darkvater
f208f5fa10 (svn r2157) - Feature (request): [ 1166978 ] Focus keyboard on input-box in Multiplayer Menu
- Feature: If the to be started server is using a password, draw a red '*' after the set password button to remind the user.
2005-04-06 18:44:34 +00:00
darkvater
648fa7c97d (svn r2152) - Fix: Chatbar in MP games is now on-top of the news window.
- CodeChange: Introduction of SendWindowMessage() where a window can send another window a message (ala windows style msg, wparam, lparam). Messages can be sent by windowclass and by windowpointer.
- CodeChange: IsVitalWindow() simplifies a lot of checks for window handling that need to know what windows it can close, or be on top of, etc.
2005-04-05 21:03:30 +00:00
Darkvater
fb78ca8a62 (svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
- Codechange: Introduction of Textbuf struct which not only holds physical data as length but also pixel-constrains (width) and information about the caret
- Codechange: Move Clipboard function to OS specific file. Currently only Windows has clipboard actions
- Feature: Editboxes, console and exit screen also accept the numeric-enter as a yes
- Feature: Navigation through text with cursor keys is possible, as well as arbitrary insertion (also paste) and deletion; both backspace and del keys. Functions DeleteTextBufferChar, InsertTextBufferChar and InsertTextBufferClipboard handle input and deletion. Navigation is done through MoveTextBufferPos.
- Fix: OTTD crash when opening 'add server' editbox
- CodeChange: fix up some stringwidth calculations in gfx.c. You can get the width in pixels of a character by calling GetCharacterWidth().
2005-02-21 18:59:54 +00:00
tron
830565514c (svn r1867) Include tables/sprites.h only in files which need it 2005-02-13 11:18:02 +00:00
tron
76325c2bb2 (svn r1848) Remove the obscure feature of initialising the edit box with the contents of str_buffr - it was unused anyway.
Remove it from the chat box too, which inherited it via copy&paste.
2005-02-08 16:37:28 +00:00
tron
6984d6cd31 (svn r1832) Next byte -> char iteration: custom names 2005-02-06 20:53:31 +00:00
tron
c644e6b742 (svn r1827) Next iteration of the byte -> char transition: some string drawing functions and buffers 2005-02-06 18:30:45 +00:00
tron
59fa465dce (svn r1821) Move generic string handling functions to string.[ch] and introduce stre{cpy,cat}, see string.h for their semantics 2005-02-06 13:41:02 +00:00
tron
d3f84347ac (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c) 2005-02-06 08:18:00 +00:00
tron
12183084b7 (svn r1808) Use strcmp() instead of home brewed function str_eq() 2005-02-05 22:50:33 +00:00
truelight
5e8a669cba (svn r1643) -Fix: [ 1108547 ] You can now change the server-password via the GUI again 2005-01-24 20:25:52 +00:00