Commit Graph

254 Commits (0d3e56f95e3dfe8cfd2601a1aa51357e048d9d4c)

Author SHA1 Message Date
rubidium ab48ce2ee0 (svn r17675) -Codechange: move the 'state' changes out of the OnPaint of the newgrf window 15 years ago
rubidium e3bb9351a4 (svn r17673) -Codechange: make InvalidateThisWindowData a function of the window class 15 years ago
alberth fb6306a1f6 (svn r17580) -Fix (r17541): Fix signed/unsigned mismatch with MSVC 2008. 15 years ago
alberth d54028fde8 (svn r17572) -Codechange: Use the Window::GetWidget() function to access nested widgets through the nested_array. 15 years ago
rubidium afb1217449 (svn r17559) -Fix [FS#3206]: close the "Add NewGRF" window when you close the "NewGRF Settings" window. The add window has a pointer to the settings which means that not deleting it would cause dereferencing an already freed pointer 15 years ago
frosch bdc86b7280 (svn r17541) -Feature: Filtering in Add-NewGRF dialog. 15 years ago
frosch 4317f1a010 (svn r17514) -Codechange: Nestify Add-NewGRF dialog. 15 years ago
frosch d9ece3698a (svn r17511) -Codechange: Simplify ShowNewGRFInfo() by passing 'right' instead of 'width'. 15 years ago
rubidium d5e749d8b1 (svn r17371) -Codechange: make the newgrf, news and order GUIs use the scrollbar wrappers 15 years ago
rubidium d4a98be94a (svn r17271) -Fix: SetFill sometimes used 1/0 when it should be using true/false 15 years ago
rubidium 99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium d61be2637e (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 15 years ago
rubidium 5bb7b8ad35 (svn r17062) -Change: unify the naming of some 125 strings 15 years ago
alberth fe9f5cbc46 (svn r16845) -Codechange: Introduction of constants for describing the bits in a WWT_MATRIX data field. 15 years ago
alberth 0db7c2929e (svn r16413) -Codechange: Allow leading/trailing whitespace and comma in newgrf parameters instead of treating them as invalid. 15 years ago
rubidium 3a15860df7 (svn r16304) -Codechange: remove some magic numbers from the newgrf add window so it mirrors nicely. 15 years ago
frosch 80e896fa53 (svn r16223) -Fix (r8881): ActionB should use the online parameters from GRFFile instead of the initial user-specified values from GRFConfig. Also use the values as they were set when the ActionB was executed, not as they are set when the message is shown. 15 years ago
alberth 663d6b60fb (svn r16186) -Codechange: Adding nested widgets to _newgrf_desc and _newgrf_add_dlg_desc window descriptions. 15 years ago
alberth 1a3a52abf9 (svn r16185) -Codechange: Moving the ShowNewGRFStateWidgets and AddNewGRFWindowWidgets widget enums outside their window structs.
-Codechange: Improvements to the _newgrf_add_dlg_widgets and _newgrf_widgets widget arrays in preparation for nested widgets.
15 years ago
rubidium 5c5b357043 (svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible. 15 years ago
alberth bbd546b792 (svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback 15 years ago
rubidium dcd5ad8b19 (svn r15797) -Codechange: make users of the old DrawStringMultiLine use the new one. 15 years ago
rubidium c1aabd9842 (svn r15785) -Codechange: remove the *Truncated part of the old text drawing API. 15 years ago
rubidium 303a8f9673 (svn r15783) -Codechange: make the dropdown draw code pass around the left/right instead of the x and width to make drawing text at offsets easier. 15 years ago
rubidium 7f468dc142 (svn r15723) -Codechange: use a constructor for WindowDescs as that makes expanding them much easier (Alberth) 16 years ago
rubidium 27ae9fbd7e (svn r15561) -Fix [FS#2646]: segfault when saving a preset with unknown NewGRFs 16 years ago
peter1138 bcb72d30d8 (svn r15311) -Fix (r15126): Obiwan error 16 years ago
smatz 9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 16 years ago
Yexo a20635fbfd (svn r15250) -Fix (r15126): The NewGRF Settings window was 1 pixel to low. 16 years ago
rubidium d5465604dc (svn r15245) -Fix: don't "save" the NewGRF settings on closing the NewGRF window when the content of the window isn't editable 16 years ago
rubidium d8b3a237dc (svn r15225) -Fix (r15126): searching for 'missing' NewGRFs gave the 'compatability loaded' NewGRF instead of the one that we're actually looking for 16 years ago
rubidium 75055f011d (svn r15221) -Change [FS#2574]: only show missing NewGRFs when opening the content download window from a NewGRF list and there are missing NewGRFs, otherwise show just all NewGRFs the system knows. 16 years ago
rubidium a4865b0cab (svn r15142) -Fix (r15126): missing NewGRFs cause a crash when getting the content list. 16 years ago
rubidium 72b0341ed0 (svn r15126) -Feature: downloading content from a central server (content.openttd.org) where authors can upload they NewGRFS/AI etc. This should make joining servers that use only NewGRFs that are distributed via this system easier as the players can download the NewGRFs from in the game. It should also make it easier to see whether there are updates for NewGRFs and make the necessary updates. 16 years ago
smatz ffa39caf3d (svn r14331) -Codechange: use an enum as additional parameter for ShowQueryString() 16 years ago
rubidium ee4173d8a4 (svn r14310) -Fix: don't show palette information in the newgrf lists of the network lobby. 16 years ago
rubidium 0b4c2e9493 (svn r14299) -Fix: disable 'toggle palette' when no NewGRF has been selected. 16 years ago
rubidium 882d39a081 (svn r14233) -Feature/Fix [FS#2172]: save the palette of the loaded NewGRFs in the savegame, so joining with a server using Windows palette will make a client with the DOS palette do palette conversion and (thus) not cause a desync due to the different palettes disabling different NewGRFs. 16 years ago
frosch 59f813267c (svn r14112) -Fix (r13715)[FS#2232]: Action B custom messages with parameteers were broken. 16 years ago
peter1138 afe73dfe11 (svn r14009) -Cleanup (r14008): Bad whitespace... 16 years ago
peter1138 1a28c1c4ee (svn r14008) -Fix (r14004): NewGRF preset drop down list not working 16 years ago
belugas 2240833463 (svn r13896) -Codechange: Replace numbers with Colours enum on newgrf, order and osk guis 16 years ago
peter1138 c0ef9a4ab8 (svn r13818) -Fix [FS#2157]: Deselect currently selected NewGRF when changing GRF preset. 16 years ago
peter1138 417a56cf99 (svn r13789) -Fix (r13781): Saved preset was not automatically selected. 16 years ago
peter1138 2466b7f01e (svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file. 16 years ago
rubidium 5a94972c2d (svn r13715) -Fix [FS#2129]: C-like strings had to be rebound each time they were printed, otherwise the text could change due to the few number of slots that could be used to bind.
-Codechange: remove all BindCString and related functions and replace it by RAW_STRING which prints the C-string raw pointer that is on the 'print stack'.
16 years ago
smatz 1f55797fe3 (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details 16 years ago
rubidium 162e2e074b (svn r13185) -Codechange: remove everything related to the WindowProc callbacks. 16 years ago
rubidium a89b5721a8 (svn r13139) -Codechange: move DrawWindowWidgets and DrawWindowViewport to the Window class and remove Window from their naming. 16 years ago
peter1138 3f0895872f (svn r13073) -Codechange: make classes of the NewGRF windows 16 years ago
rubidium 2c96ce4506 (svn r13027) -Codechange: use StrEmpty instead of arr[0] == '\0' and remove the need for WE_ON_EDIT_TEXT_CANCEL. 16 years ago
rubidium 51cda2252c (svn r13004) -Codechange: replace AllocateWindow and AllocateWindowDesc with a Window constructor. 16 years ago
rubidium 9db77e3808 (svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL. 16 years ago
rubidium 1ce0b03bf0 (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
peter1138 cb7b587746 (svn r12445) -Fix: Add missing compile asserts for window data structs 16 years ago
smatz 1f13638d03 (svn r12368) -Codechange: use explicit body for loops and conditions and remove -Wno-empty-body from the configure script 17 years ago
peter1138 e826a69e46 (svn r12172) -Codechange: Allow buttons to resize in NewGRF settings window 17 years ago
rubidium 90acd52f22 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 17 years ago
rubidium 64d691bacc (svn r11787) -Codechange: more header rewrites. This time related to viewport.h. 17 years ago
rubidium b09d957f31 (svn r11777) -Codechange: split the string header and make do not include it when it's not necessary. 17 years ago
rubidium 71d4004a85 (svn r11776) -Codechange: more header splittings to reduce the dependencies. 17 years ago
rubidium 81bf9f8503 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 17 years ago
rubidium 00c9d3ef20 (svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed. 17 years ago
rubidium 1f6043458c (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type. 17 years ago
rubidium 8427b8bad2 (svn r11675) -Codechange: split the string types from the string functions. 17 years ago
rubidium 2cf7d5b2cb (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found. 17 years ago
rubidium 8bfbfd0031 (svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps. 17 years ago
glx 3a0f350ab4 (svn r11631) -Fix (r11585, r11626): remove MSVC warnings 17 years ago
skidd13 10360288d0 (svn r11585) -Codechange: Enumify the widgets of the newGRF gui and a slight cleanup there 17 years ago
belugas 1495f6aaf8 (svn r11579) -Revert(r11578): some cases of key propagation are not handled correctly.
A better solution will be deviced, but not now.  Let's not cause a ton of bug reports
17 years ago
belugas cc29d43876 (svn r11578) -Codechange: Introduce the window default flag WDF_TEXTENTRY which specifies that the window holding it is actually one that enables an edit box.
Use this flag when dispatching a key event instead of using some hard coded window IDs.
This should ease a little bit the creation of new edit aware windows.
17 years ago
rubidium 92cb0e45ca (svn r11555) -Codechange: use the new members introduced in r11551. 17 years ago
skidd13 c0a2c0c23e (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 17 years ago
rubidium af0616729a (svn r11433) -Fix: starting OpenTTD with DOS files made it look weird out of the box.
-Change: make extra sprites (the ones not in the TTD GRFs) replaceable using Action 5.
-Feature: make replacing contiguous subsets of sprites in for some types possible in Action 5.
Note to GRF authors: when you replaced OpenTTD sprites that are not from the TTD GRF files using Action A, your GRF will not have the intended result anymore as the sprite numbers have changed. You should replace the Action A with an Action 5 from now on.
17 years ago
belugas e2c0f1faf7 (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
Patch heavily based on BiBB's work (FS#1383)
17 years ago
rubidium f42cdbf4d0 (svn r11329) -Fix: if a NewGRF failed to load for some reason (like fatal errors), but it was a "compatible" NewGRF, it was shown with the compatible colour and not the not-loaded colour in the NewGRF list. 17 years ago
belugas cba9def0ba (svn r11272) -Codechange: Truncate text describing the grf file in the NewGrf settings gui 17 years ago
rubidium 5ab0426680 (svn r11211) -Fix [FS#1302]: NewGRF GUI scrollbar does funny things when being resized. 17 years ago
rubidium 13ab17bca8 (svn r10704) -Codechange: provide an infrastructure to have resizable windows that are smaller than the default window size. 17 years ago
rubidium 627aa240ba (svn r10298) -Fix [FS#903]: show the subdirectory below the default data directory in this filename in the newgrf list. The directory was removed in r9560 because then it used to full path instead of the path relative to the data directory, but since the inclusion of "search paths" that is not necessary anymore. 17 years ago
glx 68ff3bc90f (svn r10267) -Add: enable double clic to add in 'add newgrf' window 17 years ago
glx 623a848cca (svn r10211) -Feature: [NewGRF] Add support for action 0F 17 years ago
maedhros 94d390eac4 (svn r10114) -Fix: Only load newgrf error messages if the language matches the current
language. Since only one error can be loaded anyway, if the language didn't
match you'd get "Undefined string". Also since we're only loading one language
there's no need to use AddGRFString any more.
17 years ago
rubidium 19d7d1c9c5 (svn r10021) -Fix (r9560): memory "corruption" that could lead to a failure to load newgrfs. 17 years ago
belugas d1c2c90ad0 (svn r9669) -Documentation: some more doxygen fixes 17 years ago
maedhros 68248cad4f (svn r9449) -Fix: Truncate the newgrf information text in the newgrf gui if it's too long. 18 years ago
belugas 8952924c64 (svn r9385) -Cleanup: doxygen changes. Today, we are exploring the letter N. 18 years ago
rubidium 979ccd45ba (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 18 years ago
maedhros b838a90657 (svn r9031) -Codechange: Introduce grfconfig->status, and use it for states that are
mutually exclusive. At the same time, add an INITIALISED state which makes it
possible to check if a grf is not yet active but will be later on during the
GLS_ACTIVATION loading stage.
18 years ago
Darkvater c83092130b (svn r8920) -Codechange: Do not require to press 'Apply changes' in the newgrf GUI if the changes in there are not activated (this happens in the title screen) 18 years ago
Darkvater 60866482ed (svn r8918) -Revert r8914 as the inverted files have been committed not the correct one. 18 years ago
Darkvater a0a259d32b (svn r8914) -Regression (UTF8): Win9x is very picky about trailing slashes in paths, so C:\\* will not work (but C:\Windows\\* does; go figure). Thanks glx for pointing it out and for the initial fix. 18 years ago
maedhros 4f98bec89b (svn r8881) -Feature: Allow built-in newgrf error messages to be translated, and load custom error messages properly. 18 years ago
maedhros 8b6d07cb85 (svn r8838) -Feature: Show newgrf error messages loaded in Action B in the newgrf gui
window. GRFs with an error have a warning symbol shown before the name.
18 years ago
rubidium 2a9851a3ad (svn r8511) -Codechange: make WindowClass an enumerated value. 18 years ago
peter1138 ca9843424b (svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
This lets us increase the sprite width from 14 to up to 29 bits, 
effectively nulling the old sprite limit. Table changes in next commit.
18 years ago
Darkvater 4f413d1ff4 (svn r8106) -Feature/Fix: Add the ability to load savegames when you don't have the exact GRF files in your list. GRF files that are found based on GRFID (but not on matching md5sum) are used instead of disabling them. This does not affect MP games, there you still need an exact match.
-GRF Window colour-codes changed a bit: Static is now grey, and compatible GRF (found locally only based on GRFID) are shown in orange. Compatible GRF's also have an orange status/warning text saying they're not the original the game was saved with.
-Loaded games with something amiss regarding GRF's will show an appropiate warning message.
18 years ago
Darkvater 43343d640b (svn r8102) -Cleanup: Remove unreachable code (r8096), useless cast 18 years ago
tron e043c6cef7 (svn r8097) Replace strlen() {==,!=,>} 0 by the more concise {,!}StrEmpty(). Additionally the test takes O(1) instead of O(n) now 18 years ago
Darkvater 6f51ba9418 (svn r8094) -Feature/Fix (r7523): Show the activated status of the GRF list after pressing 'apply'
in the newgrf window, instead of the local list.
18 years ago
Darkvater 95024bb21c (svn r8093) -Codechange: Add a function to get a string representation of an MD5SUM and use it. 18 years ago
KUDr 28e969924b (svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter 18 years ago
rubidium a7d0cdf95f (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 18 years ago
KUDr 07c30785ab (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 18 years ago