summaryrefslogtreecommitdiff
path: root/town_gui.c
AgeCommit message (Collapse)Author
2006-12-05(svn r7372) - CodeChange: Rename all GetXXXArraySize() functions to ↵matthijs
GetNumXXX() and add GetMaxXXXIndex() functions. This prepares for the new pool interface.
2006-11-10(svn r7128) -Codechange: Replace magic numbers by magic enums (windowdesc ↵Darkvater
positioning WDP_AUTO = -1)
2006-10-24(svn r6926) -Codechange: Rename WWT_4 to WWT_TEXTBTN_2 and WWT_6 to ↵Darkvater
WWT_INSET (credits to peter1138 for the aptly found name) -Codechange: Remove the explicit numbering from WindowWidgetTypes
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 r6885) - Fix (r1379): List of actions panel in the town authority ↵peter1138
window went underneath its scrollbar
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-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-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-23(svn r6499) -Codechange: Finally, got "byte event" outside of the union ↵belugas
WindowEvent, which is now a struct
2006-08-28(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else ↵rubidium
{' -> '} else {', tabs between code and comment, etc.
2006-08-27(svn r6169) -Codechange: Use GetString() instead of GetStringWithArgs() ↵Darkvater
which should be integral to strings.c
2006-08-22(svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 ↵truelight
(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(svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips ↵truelight
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(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. ↵rubidium
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
2006-08-19(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for ↵truelight
textboxes to only allow certain patterns (like numbers only)
2006-08-15(svn r5907) Remove more indirection by using pointers instead of IDs. Also ↵tron
fix some bogus warnings on MSVC by using (void*) casts
2006-07-26(svn r5609) CodeChange : Apply coding stylebelugas
2006-04-29(svn r4623) - Codechange: s/byte/PlayerID/Darkvater
2006-03-26(svn r4133) - Some miscellaneous changes (unconverted TownID in function ↵Darkvater
definition, Owner instead of byte, remove obsolete member and compare waypoint index with 0 not STR_NULL)
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2005-12-07(svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect ↵peter1138
their actual use, and add "Close Window" tooltip where missing.
2005-11-16(svn r3201) -Fix: Allow bribing up to the maximum rating for bribing, don't ↵tron
disable this option at some arbitrary value early
2005-11-14(svn r3181) -Bracingtron
-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-13(svn r3172) static, consttron
2005-10-23(svn r3078) Some more stuff, which piled up:tron
- 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-22(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in ↵tron
comments, excess empty lines, minor other changes nothing spectacular, just some stuff, which piled up
2005-09-10(svn r2932) Give the strings consisting of an up/a down arrow symbolic namestron
2005-07-24(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic ↵celestar
numbers by enums. There remains work in gfx.c to move the "transparency" and "recolor" bits around to make space for more sprites. However, 2800 additional sprites can now be loaded. There also remains cleanup and Doxygen work on many of the header files.
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-15(svn r2580) Change: Added {INDUSTRY} command for printing industry names ↵ludde
instead of the old {TOWN} {STRING} way. - The formatting of the industry name can be controlled with the string STR_INDUSTRY_FORMAT. Change: Changed several occurences of {STRING1} into {TOWN} to get rid of townnametype being used directly.
2005-07-15(svn r2572) - Codechange: [string] Changed string system so it's not as ↵ludde
dependent on decode_parameters - Feature: [strgen] Allow changing the order of parameters in translated strings. - Use {1:TOWN} syntax to set the order. - Codechange: [strgen] Rewrote lots of strgen internals.
2005-06-21(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayercelestar
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-05-15(svn r2324) Introduce _cmd_text for passing strings with a command instead ↵tron
of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes.
2005-05-14(svn r2307) - Fix (regression): it was not possible to change the drive-side ↵Darkvater
in the intro-game. - CodeChange: remove unused "CANT_DO_THIS" double-string.
2005-05-12(svn r2297) - CodeChange: server-check the next batch of commands.Darkvater
- CodeChange: since only the server will be able to modify difficulty settings, leave the checking of correct values besides, and trust users will join legit servers. - CodeChange: for renaming signs, only check if GetDParam(); eg _decode_parameters is empty ('\0') or not, instead of the extra check of players, etc. That basically does the same thing. Also dirty sign two times when renaming, once before, once after the action. Because if the name becomes shorter and you update only after, garbage remains on the screen. - CodeChange: made GetMaskOfTownActions() available to the town-cmd to double-check if the action was available to the player. For this purpose the hardcoded _local_player has been removed from the function and is now passed as a parameter.
2005-02-13(svn r1867) Include tables/sprites.h only in files which need ittron
2005-02-06(svn r1827) Next iteration of the byte -> char transition: some string ↵tron
drawing functions and buffers
2005-02-06(svn r1813) Declare functions implemented in strings.c in their own shiny ↵tron
new header (though i think some of these function don't belong into strings.c)
2005-02-05(svn r1803) Move debugging stuff into files of it's owntron
2005-02-01(svn r1764) -Add: dynamic towns, you can now have up to 64k towns (let me ↵truelight
know when you have that amount of towns in a map ;))
2005-01-22(svn r1594) Convert all undefined parameter lists to (void) and add the ↵tron
appropriate warning flags in the Makefile
2005-01-21(svn r1581) Added a display for the total map population to the town display ↵celestar
(Jango)
2005-01-14(svn r1504) enummed town ratings (Jango)celestar
2005-01-06(svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns ↵truelight
and _industries (in prepare of dynamic arrays): - DEREF_XXX is changed into GetXXX - All direct call are directed via GetXXX - struct Industry has now an index-field - ENUM'd some stuff - Replaced home built loops with FOR_ALL_XXX - Added _stations_size, _vehicles_size, ... which gives the length of the array (which will be dynamic in the near future) - Changed lengtof(XXX) to _XXX_size (e.g. _stations_size) - Removed all endof(XXX) (because mostly it was part of a FOR_ALL_XXX) - Made the sort-functions of all 4 dynamic - Made all 4 Initialize functions more of the same - Some minor tab-fixing and stuff (tnx to Tron for proof-reading my 100kb patch ;)) Note for all: please do NOT directly call _stations, _vehicles, _towns and _industries, but use the right wrapper to access them. Thank you. Ps: please also do not use 'v++', where v is of type Vehicle *.
2005-01-04(svn r1379) -Fix: various GUI glitches. Added default sizes to various ↵darkvater
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!
2005-01-04(svn r1377) -Fix: only a server can rename a town in a MP gamedarkvater
2005-01-03(svn r1348) -Feature: resizable windows. Read the comment in window.h to ↵truelight
find out how the system works. All useful windows are already made resizable. Enjoy :) -Fix: fixed some GUI-glitches and flaws along the way