tron
260012382d
(svn r5226) Reduce the mess that sending chat messages is
...
This also fixes a bug:
-Fix: It was possible to rename a signs or waypoints with the chat box
19 years ago
Darkvater
d02f2ec1e6
(svn r4892) - Fix [FS#162]: SEGV when sorting an empty server list. (glx)
19 years ago
Darkvater
8faf1838e6
(svn r4623) - Codechange: s/byte/PlayerID/
19 years ago
tron
1440451a6b
(svn r4315) Remove MAX_QUERYSTR_LEN, rather use lengthof() the real thing
19 years ago
tron
10454a6dd1
(svn r4314) -Fix: a buffer overflow of the chat box introduced in r1263. Don't tell the Textbuf an arbitrary number as size of the string buffer, but the real lengthof() it
19 years ago
tron
3ef6afdb4d
(svn r4313) The parent window of the chat box is always the main toolbar (?!), therefore don't pass this information as parameter
19 years ago
tron
7a7e7c82cf
(svn r4312) Calculate the maximum pixel width of the entered text in the chat box from the "text box"-widget instead of hardcoding an arbitrary - and wrong - number
19 years ago
tron
dec2db09ee
(svn r4310) The chat box has no visible window title, therefore remove the string
19 years ago
tron
fc8d7f18a0
(svn r4309) The initial string of the chat box is always the empty string, so don't jump through hoops to check if nothing was entered and simplify the code
19 years ago
tron
04d6788bfd
(svn r4304) The chat box' parent window (the main toolbar, wtf?) doesn't care for the WE_ON_EDIT_TEXT_CANCEL event, so don't send one. This code looks like it was mindlessly copy&pasted from the query box
19 years ago
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)
19 years ago
Darkvater
2bbcd41247
(svn r3933) - [ 1439907 ] Increase client list window width so at least most languages fit (wikipedian).
19 years ago
tron
84fb96fe85
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
Darkvater
896551850a
(svn r3501) - Load the lobby-window with up-to-date data upon opening
19 years ago
Darkvater
9d07426a29
(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.
19 years ago
Darkvater
58f5dbd365
(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.
19 years ago
Darkvater
ddfe8f608f
(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.
19 years ago
Darkvater
20538e9b40
(svn r3469) - Fix: plug a possible memleak with subsequential strdup's without freeing the previous value and make it possible to ban offline clients
19 years ago
Darkvater
c8a2c7ae94
(svn r3442) - Fix: Only windows has stricmp. So define strcasecmp to stricmp when using MSVC
19 years ago
Darkvater
070edf2f73
(svn r3441) - Feature: Allow the network game list to be sorted (by name/clients/compatibility ascending/descending)
19 years ago
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.
19 years ago
Darkvater
bc450bbc9a
(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 ;))
19 years ago
Darkvater
fa735869e1
(svn r3435) - Fix a warning, removed unused extern and some comments in network_gamelist.c
19 years ago
Darkvater
8721b05453
(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
19 years ago
Darkvater
2b287a9e72
(svn r3429) - Feature (Followup): Change the gamelist window to accomodate for the new information.
19 years ago
Darkvater
78fa9c7393
(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.
19 years ago
tron
f2db7e7245
(svn r3336) byte -> WindowClass, uint16 -> WindowNumber
19 years ago
Darkvater
0f41b99c5e
(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
19 years ago
tron
bf98086de8
(svn r3298) Remove unused and write-only variables
19 years ago
peter1138
1c57091230
(svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing.
19 years ago
tron
5cb9de35d1
(svn r3211) Fix typo in r3181
19 years ago
tron
f7abff5f96
(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
19 years ago
tron
ee15e3de13
(svn r3172) static, const
19 years ago
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
19 years ago
tron
a227065ab7
(svn r2701) Insert Id tags into all source files
19 years ago
tron
559babcdc9
(svn r2673) Include functions.h directly, not globally via openttd.h
19 years ago
Darkvater
eabc482184
(svn r2624) - Fix: oops, forgot to change the already in use DrawStringCenteredTruncated() functions.
19 years ago
Darkvater
3e49626aec
(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
19 years ago
ludde
6a3f58e050
(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.
19 years ago
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.
19 years ago
ludde
3e62457107
(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.
19 years ago
Darkvater
d549523f96
(svn r2422) - Codechange: magic number fix in network window (anonymous)
20 years ago
tron
43f7974f6d
(svn r2405) Simplify a few '? true : false' and '? false : true', especially the latter is confusing
20 years ago
Darkvater
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
20 years ago
Darkvater
55423efb06
(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.
20 years ago
Darkvater
cdb81c660c
(svn r2348) - Fix: Do not scroll the game with the arrow keys when the chatbox is open
20 years ago
Darkvater
033995ec6e
(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()
20 years ago
Darkvater
c626555f68
(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.
20 years ago
Darkvater
5a35c8cc4e
(svn r2252) - ReFix: Redo r2251. Just remove the 'default widget handler', WDF_STD_BTN, instead of doing the "workaround" of the previous commit
20 years ago
Darkvater
ece616ff22
(svn r2251) - Fix: [ 1193945 ] Clicking on the chat text box causes an assertion failure
20 years ago
Darkvater
5109df6f55
(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.
20 years ago
darkvater
22d36985cd
(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.
20 years ago
Darkvater
d865c55007
(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().
20 years ago
tron
204d08140a
(svn r1867) Include tables/sprites.h only in files which need it
20 years ago
tron
d1fb165ad2
(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.
20 years ago
tron
27dc506a03
(svn r1832) Next byte -> char iteration: custom names
20 years ago
tron
2fb453a4a5
(svn r1827) Next iteration of the byte -> char transition: some string drawing functions and buffers
20 years ago
tron
b2ae5b197e
(svn r1821) Move generic string handling functions to string.[ch] and introduce stre{cpy,cat}, see string.h for their semantics
20 years ago
tron
0381073e56
(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)
20 years ago
tron
7aae12d55d
(svn r1808) Use strcmp() instead of home brewed function str_eq()
20 years ago
truelight
f08983a948
(svn r1643) -Fix: [ 1108547 ] You can now change the server-password via the GUI again
20 years ago
dominik
7d0468aaa4
(svn r1611) Display server port in the multiplayer game info window
...
I had to make the multiplayer window 10 pixels wider for this
20 years ago
tron
189ca73707
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
20 years ago
darkvater
e6d31cb89c
(svn r1526) -Fix: [1103027] Minor changes for the lobby GUI (widen window) (bociusz)
20 years ago
tron
3279a7c9a2
(svn r1520) Trim 134 (!) lines with trailing whitespace ):
20 years ago
truelight
e9a57c56b7
(svn r1510) -Add: Improved Network Lobby GUI: (bociusz)
...
- Added green dot if company income is positive (else red dot)
- Added lock icon if company is password protected
20 years ago
tron
4136f395bf
(svn r1508) Remove duplicate declarations and include proper headers where necessary
20 years ago
darkvater
352cf002b2
(svn r1502) -Fix: [1101889] Crash under windows... stupid typo in player_gui.c ^ should've been &
...
-Fix: in multiplayer clientlist can only be opened once
20 years ago
darkvater
085563653f
(svn r1478) -Fix: [1099195] mouse-wheel in train replace window. Scrollbar1 and Scrollbar2 now work independently. You can only scroll on list and scrollbar itself; scrollbar must be next widget of the list.
...
-Fix: updated the few gui's that didn't have the scrollbar right after the listbox.
20 years ago
darkvater
29b4ab04c3
(svn r1465) -Fix: [1099101] starting year patch goes out of range. Clamped year between 1920-2090 as wel as adding defines for it.
20 years ago
dominik
87e5984ae2
(svn r1383) Fix: You can now also delete automatically found servers by pressing "del"
...
Fix: The scrollbar is correctly updated when deleting servers
20 years ago
darkvater
4c5f6fe360
(svn r1379) -Fix: various GUI glitches. Added default sizes to various widgets. Sticky/Resize- and Scrollbar must be 11 pixels wide, Horizontal scrollbar 11 pixels high, caption must be 13 pixels. I hope I didn't forget any widgets, the game will assert for that so report them to me!
20 years ago
truelight
a94fe04a9a
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
...
how the system works. All useful windows are already made resizable. Enjoy :)
-Fix: fixed some GUI-glitches and flaws along the way
20 years ago
dominik
2cb37408a3
(svn r1334) Fix: [ 1093466 ] no more glitches with many maps in the scenario list when creating server
20 years ago
bjarni
29d8c5bb50
(svn r1323) Adding autoreplace feature
...
This feature works much like autorenew, but it will get you a new engine type instead of a new one of the same type. Once
ordered, it will automatically replace the engines while they visits a depot. The GUI for setting this up have been added on the
vehicle overview windows
Note: autorenew is now autoreplace, but to the same engine type
Nice new features, that was added to make this possible
- windows can now have two independant vertical scrollbars
- CMD_SHOW_NO_ERROR have been added as a flag for DoCommandP. It will make it do the action instead of showing the red box with
estimated costs even if shift is pressed
- fixed problem where enginetypes where not initialized when loading a game. It's now done in InitializeGame()
20 years ago
truelight
a11f46fed4
(svn r1322) -Add: banning system (mostly tnx to guru3)
...
A server can ban people via ClientList
Both server and dedicated can do it via console:
'ban', 'unban', 'banlist'.
20 years ago
truelight
bcc3b1cbb5
(svn r1298) -Fix: [ 1092661 ] On create, the scrollbar of the server-list was not updated
20 years ago
truelight
f3c8f40c51
(svn r1280) -Codechange: made the last patch a bit more... readable (in other words:
...
use that spacebar!!)
20 years ago
bjarni
b01382c20b
(svn r1279) Fixed the scrollbar in the network gui(server list). It now updates when scrolling (HackyKid)
20 years ago
truelight
97ec7de9e6
(svn r1263) -Fix: [Network] Client-names are limited (serverside) to 25 chars
...
-Fix: You can enter some more chars in the chatbox
20 years ago
darkvater
28c1dc3e39
(svn r1240) -Fix: OpenTTD once again compiles if ENABLE_NETWORK is disabled.
...
-Fix: removed some warnings
-Enabled ENABLE_NETWORK on windows again which I accidentally commented out.
20 years ago
truelight
90b2b2144b
(svn r1227) -Add: Ingame Server-list (select Internet, then Find Servers)
...
-Fix: UDPListener was launched wrongly
-Fix: Not all sockets have broadcast enabled anymore
-Fix: Server-advertise retries 3 times before giving up
20 years ago
dominik
1e1eac5f17
(svn r1205) Fix: Made the network window a bit wider, so that other languages don't have overlapping strings
20 years ago
truelight
c136432978
(svn r1197) -Fix: [GUI] in r1194 someone deleted too much code from WE_KEYPRESS. Now
...
you can change your player-name in the GUI again :)
20 years ago
dominik
7cfaa8a418
(svn r1194) Feature: You can now add and remove servers from the server list. Those will be remembered until you delete them by pressing the Delete key.
20 years ago
truelight
9b237345d1
(svn r1187) -Fix: [Network] You can no longer join as spectator a game with no
...
companies (a lot of code can simply not handle it)
20 years ago
truelight
5f25a0788a
(svn r1186) -Fix: [Network] You can now join a company on a server where a company
...
went bankrupt, without joining the wrong company (or even failing to do so)
20 years ago
truelight
db16262698
(svn r1174) -Fix: [Network] All strings can now be translated (no more hardcoded strings)
20 years ago
truelight
0e19f74c16
(svn r1168) -Cleanup: [Network] Cleaned the network code a bit. Added 'const'
...
and 'void' where needed, prefixed all functions, typedefs and global
vars with 'Network' and organized all externals nicely.
20 years ago
dominik
853c11d301
(svn r1162) The server list can now be automatically filled from the config file. Add a section [servers] with the addresses each in a new line. Those will be checked upon OpenTTD startup.
20 years ago
truelight
693d074d76
(svn r1126) -Fix: [Network] Pressing Disconnect on the GUI puts you back to the
...
main-menu (so you no longer stay ingame (if you were))
20 years ago
truelight
5f51b42c99
(svn r1113) -Add: [Network] Added the GUI part for server advertising. When you go
...
to Start Server, you can select by connection: 'Internet (advertise)'.
When selected, the server will announce itself to the server-list at
http://servers.openttd.org (when finished)
20 years ago
truelight
fa1f026367
(svn r1108) -Fix: [Network] Fixed problem around slow clients:
...
They joined, they got the map, but it took some time before the new
player was created. In this time a player could do stuff, causing a
player-id-mismatch, and the player was kicked out. Now a player get's a
nice GUI which says: registering.. When that is gone, the player is
joined and can play safely. Tnx to Moriarty for bugging me with this bug ;)
20 years ago
darkvater
c58549d512
(svn r1093) -Fix: Hopefully fixed windows revision issues once and for all. Removed globalness of _openttd_revision and put all such ifdefs into one place. If server has a revision only the same revisions can join; if the server has no revision everyone can join. I reckon this should be a server-side option to allow people to join or not to join.
20 years ago
truelight
b6c74c1c20
(svn r1090) -Fix: Made the _openttd_revision variable global, and with that
...
hopefully killed the windows-revision problem. If WITH_REV is defined,
for both Windows as *nix system _openttd_revision is filled with normal
info, else _openttd_revision is set to 'norev000'
-Fix: Small possible server-crash
20 years ago
dominik
7196860373
(svn r1082) Feature: Chat toolbar
...
- to chat with all players press Return (or Shift-T) and type in the message
- Press Return again to send the message
20 years ago
truelight
25dfbc3134
(svn r1054) -Fix: [Network] Redid revision 1024, only a bit more nice this time
...
(revision length is back to 10, and checking is now done correctly)
20 years ago
truelight
1c4c5ae370
(svn r1052) -Fix: [Network] You can't join a server when revision mismatches.
20 years ago
truelight
c0247e66e8
(svn r1051) -Fix: [Network] New Company button is disabled when there is no more
...
space for a new company
20 years ago
truelight
c0603e4768
(svn r1042) -Fix: [Network] Hopefully enabled revision-check for windows (somehow
...
windows uses WITH_REV_HACK instead of WITH_REV :s)
20 years ago