summaryrefslogtreecommitdiff
path: root/main_gui.c
AgeCommit message (Collapse)Author
2007-01-02(svn r7759) -Merge: makefile rewrite. This merge features:rubidium
- A proper ./configure, so everything needs to be configured only once, not for every make. - Usage of makedepend when available. This greatly reduces the time needed for generating the dependencies. - A generator for all project files. There is a single file with sources, which is used to generate Makefiles and the project files for MSVC. - Proper support for OSX universal binaries. - Object files for non-MSVC compiles are also placed in separate directories, making is faster to switch between debug and release compiles and it does not touch the directory with the source files. - Functionality to make a bundle of all needed files for for example a nightly or distribution of a binary with all needed GRFs and language files. Note: as this merge moves almost all files, it is recommended to make a backup of your working copy before updating your working copy.
2007-01-02(svn r7751) -Codechange: move network_* to a new network map. Furthermore ↵rubidium
move the low level network functions to network/core, so they can be reused by the masterserver and website-serverlist-updater.
2006-12-30(svn r7638) -Codechange: Remove special window ShowJoinStatusWindowAfterJoin ↵Darkvater
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(svn r7637) -Codechange: Change ShowQueryString to use a window pointer as a ↵Darkvater
parent. If the query has no parent (eg give money, rename waypoint), the global function HandleOnEditText is used.
2006-12-29(svn r7616) -Cleanup:Darkvater
-(re)set _rename_[id/what] to -1 to catch invalid calls (main_gui.c) -Only invalidate widget of pause/ff instead of whole window (main_gui.c) -Remove numbering from WE_ and WC_ as it's not needed, also remove non-existing windowclasses (window.h, openttd.h) -Give names to some of the enums (window.h) -In UninitWindowSystem not only free malloc'd widgets, but also reset the z-array (window.c) -Some coding style, comments, etc.
2006-12-21(svn r7525) -Fix (r6631): Invalidate the widget of 'many random industries' ↵Darkvater
when it is raised (Maedhros)
2006-12-21(svn r7523) -Feature: Add the possibility to change the newgrf configuration ↵Darkvater
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-06(svn r7391) -Fix r6814: when sending money in multiplayer, the corresponding ↵glx
chat message was for the wrong player (off by one)
2006-12-04(svn r7357) -Codechange: new NewGRF set up window which allows modification ↵peter1138
of NewGRF settings.
2006-12-04(svn r7355) -Codechange: replace 'for (i = 0; w->widget[i].type != WWT_TYPE; ↵rubidium
i++)'-type for loops with 'for (i = 0; i < w->widget_count; i++)'-type for loops
2006-12-03(svn r7329) -Fix (r7157): Invalid viewport position on quick zoomKUDr
2006-11-17(svn r7198) -Codechange: Implement a circular tile search function.belugas
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(svn r7195) -Feature: [FS#297, optional elrails] New patches/vehicles option ↵KUDr
'disable electrified railways'. (original patch by maedhros, ideas: peter1138, Darkvater, Rubidium, Patrick, Eddi|zuHause, ..)
2006-11-16(svn r7182) -Feature: Merge utf8 branch. This brings us support for ↵peter1138
Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
2006-11-16(svn r7179) -Codechange (r7173): Actually "prefer" team chat through the ↵Darkvater
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(svn r7173) -Codechange (r6824): Allow the user to change the ↵Darkvater
chat-destination when chatting with <ENTER> or 'T' instead of the game choosing one for you automatically.
2006-11-10(svn r7128) -Codechange: Replace magic numbers by magic enums (windowdesc ↵Darkvater
positioning WDP_AUTO = -1)
2006-11-09(svn r7120) -Fix (r6631): A town size of 0 in the scenario editor is a ↵Darkvater
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-07(svn r7098) -Regression (r7094): Zoom buttons were not properly updated with ↵Darkvater
a new/loaded game. The good thing is, we got rid of even more magic code (tm)
2006-11-07(svn r7095) -Codechange: Move MaxZoomIn function to viewport.h and change it ↵Darkvater
to MaxZoomInOut with a zoom parameter and a pointer to the window which's viewport we want to zoom.
2006-11-07(svn r7094) -Codechange: Get rid of the window-specific code in ↵Darkvater
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(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h ↵Darkvater
and rewrite the function a bit more sensibly.
2006-10-31(svn r7023) -Fix: Pressing F1 in scenario editor did not work because the ↵Darkvater
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(svn r7022) -Fix [FS#292]: Properly guard against viewing company-sensitive ↵Darkvater
information from invalid players (eg spectators) which could lead to crashes.
2006-10-28(svn r7000) -Fix: Incorrect use of e->we.click when the event is a 'place'. ↵Darkvater
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-24(svn r6930) -Codechange: Move industry name into IndustrySpecbelugas
-Codechange: member color_map is more related to random color, rename it as such
2006-10-24(svn r6925) -Codechange: Be more strict with widget distinctions. WWT_PANEL ↵Darkvater
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-21(svn r6884) -Codechange: Add strict bounds checking in string formatting system.Darkvater
The last parameter should point to the end of the buffer (eg lastof(buf)) Courtesy of Tron.
2006-10-21(svn r6877) -Fix r6876 +add main_gui.cDarkvater
2006-10-18(svn r6828) -Fix: Properly fix r6842Darkvater
2006-10-18(svn r6827) -Fix r6824: removed warningglx
2006-10-18(svn r6824) -Feature: Change the functionality of the chat window. ↵Darkvater
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-14(svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to ↵Darkvater
PLAYER_SPECTATOR and put it into player.h where it belongs (instead of map.h)
2006-10-12(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. ↵Darkvater
With networking disabled hardcode _networking/_network_available to zero and let the compiler handle all optimizations.
2006-10-12(svn r6748) -Codechange: Use already existing function to count active players.Darkvater
2006-10-12(svn r6746) -Codechange: Remove the need for double strings in "checkmarked" ↵Darkvater
items. While here have a little go at the MenuWndProc() function for a little cleanup.
2006-10-12(svn r6745) -Codechange: Have the dropdown menus fall fully inside the top ↵Darkvater
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(svn r6744) -Fix: Determine the length of the main toolbar dropdown list basedDarkvater
on the length of the strings in that list.
2006-10-08(svn r6695) -Fix FS#356: disable main toolbar buttons showing company list ↵glx
drop downs when there are no companies
2006-10-06(svn r6660) -Fix(r6631): Prevent the fast-foward button to toggle up and ↵belugas
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-03(svn r6631) -Codechange: Use accessors for click_state.belugas
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(svn r6619) -Codechange: Use accessors for disabled_state.belugas
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-09-28(svn r6562) -Codechange: merged the vehicle list window widget arraysbjarni
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-23(svn r6499) -Codechange: Finally, got "byte event" outside of the union ↵belugas
WindowEvent, which is now a struct
2006-09-04(svn r6380) -Codechange: unify all ways to quit OTTD.rubidium
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-03(svn r6365) -Cleanup: remove IsGeneratingWorld calls that are either not ↵rubidium
called or have no effect.
2006-09-01(svn r6297) -Codechange: Disentangle the query window mess a bit: Move the ↵tron
network game password handling somewhere were it belongs to
2006-08-29(svn r6222) Remove struct ColorList, because the names of its attributes are ↵tron
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-28(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else ↵rubidium
{' -> '} else {', tabs between code and comment, etc.
2006-08-28(svn r6184) Remove the unused (because it was NULL in all callers) second ↵tron
parameter of FillDrawPixelInfo() and simplify some expressions