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
73c06df571
(svn r7391) -Fix r6814: when sending money in multiplayer, the corresponding chat message was for the wrong player (off by one)
2006-12-06 02:03:55 +00:00
peter1138
c7d3d996bf
(svn r7357) -Codechange: new NewGRF set up window which allows modification of NewGRF settings.
2006-12-04 14:27:54 +00:00
rubidium
756d6a6efb
(svn r7355) -Codechange: replace 'for (i = 0; w->widget[i].type != WWT_TYPE; i++)'-type for loops with 'for (i = 0; i < w->widget_count; i++)'-type for loops
2006-12-04 13:46:03 +00:00
KUDr
3f3a14d24b
(svn r7329) -Fix (r7157): Invalid viewport position on quick zoom
2006-12-03 13:40:16 +00:00
belugas
c26dc76a7d
(svn r7198) -Codechange: Implement a circular tile search function.
...
Just provide the number of tiles per side, a pointer to a test function, the tile to start searching and voila.
Fixes [FS#364] by removing a lengthy and suboptimal random search pattern.
Thanks Rubidium.
2006-11-17 23:01:58 +00:00
KUDr
f2cda44d2e
(svn r7195) -Feature: [FS#297, optional elrails] New patches/vehicles option 'disable electrified railways'.
...
(original patch by maedhros, ideas: peter1138, Darkvater, Rubidium, Patrick, Eddi|zuHause, ..)
2006-11-17 19:31:44 +00:00
peter1138
1a4f1c8177
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
2006-11-16 22:05:33 +00:00
Darkvater
40d647ddde
(svn r7179) -Codechange (r7173): Actually "prefer" team chat through the patch setting instead of
...
always sending to teammate if the patch is on even if you do not have any allies. So
with setting off you always send to 'all players', with setting on you send to teammates
if you have any, otherwise to all players.
2006-11-16 20:57:23 +00:00
Darkvater
ea0018fced
(svn r7173) -Codechange (r6824): Allow the user to change the chat-destination when chatting with <ENTER> or 'T' instead of the game choosing one for you automatically.
2006-11-16 17:44:04 +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
fd2b3d3e14
(svn r7120) -Fix (r6631): A town size of 0 in the scenario editor is a random size. So to get a size
...
you need it between 1 and 3 and therefore there is no one-on-one correspondence between
widget-numbers and town-size. Based on a patch by Maedhros
2006-11-09 13:03:34 +00:00
Darkvater
c4e4fa98fd
(svn r7098) -Regression (r7094): Zoom buttons were not properly updated with a new/loaded game. The
...
good thing is, we got rid of even more magic code (tm)
2006-11-07 14:41:53 +00:00
Darkvater
293a89dd71
(svn r7095) -Codechange: Move MaxZoomIn function to viewport.h and change it to MaxZoomInOut
...
with a zoom parameter and a pointer to the window which's viewport we want to zoom.
2006-11-07 13:08:42 +00:00
Darkvater
65e051fe93
(svn r7094) -Codechange: Get rid of the window-specific code in DoZoomInOutWindow (enable, disable
...
buttons depending on calling window, game-mode); handle it by broadcasting messages
to the calling window, because that knows how and what buttons to set.
2006-11-07 13:06:02 +00:00
Darkvater
e90bc1681f
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
...
a bit more sensibly.
2006-11-07 13:01:36 +00:00
Darkvater
6c76a89c20
(svn r7023) -Fix: Pressing F1 in scenario editor did not work because the keypress event was sent
...
twice. due to e->we.keypress.cont not being set to false. Also indent the switch
statements for some coding style bonus points.
2006-10-31 21:46:21 +00:00
Darkvater
eadf788cc5
(svn r7022) -Fix [FS#292]: Properly guard against viewing company-sensitive information from
...
invalid players (eg spectators) which could lead to crashes.
2006-10-31 21:15:56 +00:00
Darkvater
fce44a1ce7
(svn r7000) -Fix: Incorrect use of e->we.click when the event is a 'place'. This didn't cause any
...
bugs so far because the 'click' element was at the same position in the union for both
events.
2006-10-28 23:47:00 +00:00
belugas
f48c419467
(svn r6930) -Codechange: Move industry name into IndustrySpec
...
-Codechange: member color_map is more related to random color, rename it as such
2006-10-24 19:19:25 +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
b3df5e5477
(svn r6877) -Fix r6876 +add main_gui.c
2006-10-21 22:33:45 +00:00
Darkvater
7c99e38c60
(svn r6828) -Fix: Properly fix r6842
2006-10-18 21:38:45 +00:00
glx
b1fb27dc2e
(svn r6827) -Fix r6824: removed warning
2006-10-18 21:33:59 +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
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
23197f4c69
(svn r6748) -Codechange: Use already existing function to count active players.
2006-10-12 11:42:57 +00:00
Darkvater
4bfb4430ce
(svn r6746) -Codechange: Remove the need for double strings in "checkmarked" items. While
...
here have a little go at the MenuWndProc() function for a little cleanup.
2006-10-12 11:27:37 +00:00
Darkvater
5c9fb10a3b
(svn r6745) -Codechange: Have the dropdown menus fall fully inside the top toolbar. So
...
normally they will start at the left side of the parent button except when
they would stick out, then align with the top toolbar's right side. This
also means the extra parameter 'x' is not needed, it is deducted from the
widget position.
2006-10-12 10:52:24 +00:00
Darkvater
e66059f6c7
(svn r6744) -Fix: Determine the length of the main toolbar dropdown list based
...
on the length of the strings in that list.
2006-10-12 10:43:14 +00:00
glx
fa3afe220e
(svn r6695) -Fix FS#356: disable main toolbar buttons showing company list drop downs when there are no companies
2006-10-08 21:00:13 +00:00
belugas
9d24f3df0a
(svn r6660) -Fix(r6631): Prevent the fast-foward button to toggle up and down when pressing shift.
...
The _fastforward and _pause bool are not exactly used as bool.
So, when doing test with them, amek it so that the will appear as such
2006-10-06 01:18:12 +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
bjarni
4ccdb0686f
(svn r6562) -Codechange: merged the vehicle list window widget arrays
...
It made no sense to maintain 8 nearly identically arrays when a single one can do the job
Also made the two buttons always use half of the bottom width each, even when resizing
2006-09-28 23:05:03 +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
rubidium
a7cfb80c40
(svn r6380) -Codechange: unify all ways to quit OTTD.
...
This means that in the intro menu the 'Quit' button immediatelly quits
and the 'Quit' in the menu of the normal game and scenario editor
immediatelly quits when the 'autosave_on_exit' patch is turned on.
This is the same way as the OS/window manager initiated quits, like
alt-F4 and the 'x' in the (OS/window manager drawn) title bar of OTTD.
2006-09-04 17:30:30 +00:00
rubidium
03f963af58
(svn r6365) -Cleanup: remove IsGeneratingWorld calls that are either not called or have no effect.
2006-09-03 22:07:28 +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
b83a3f8726
(svn r6222) Remove struct ColorList, because the names of its attributes are plain confusing
...
All the struct holds is a simple colour gradient, so using a simple array with 8 entries is more clear
Also add the names of colour the gradients as enum
2006-08-29 19:26:13 +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
tron
2eb76813ed
(svn r6184) Remove the unused (because it was NULL in all callers) second parameter of FillDrawPixelInfo() and simplify some expressions
2006-08-28 07:33:51 +00:00
truelight
b34d77ca3f
(svn r6050) -Codechange: mass-renamed SignStruct -> Sign and ss -> si. Now functions and variables all match eachother
2006-08-22 16:38:50 +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
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