Commit Graph

63 Commits (63f1a935307a6138a4e0d5d4b26f4423e48ac075)

Author SHA1 Message Date
celestar b5dd3ddbd5 (svn r4822) -Feature: Station List View can now be sorted and filtered (by waiting cargo type and facilities) 18 years ago
Darkvater c8a85d5419 (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 e91fa54a15 (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 19 years ago
bjarni c77c99b3c7 (svn r3535) -Feature: [autoreplace] allow autoreplacing of train wagons
currently ALL available wagons are displayed in the right menu in the replace window
	however the replacement will only be done if the new wagon can be refitted to carry same cargo as the old one is currently carrying

	Since the standard vehicles do not have any valid wagon replacements, this feature can only be used when using newgrf sets
19 years ago
Darkvater a902af3fc6 (svn r3461) - Fix: Increase window-size as for 64-bit machines it wasn't enough 19 years ago
Darkvater 227769d709 (svn r3441) - Feature: Allow the network game list to be sorted (by name/clients/compatibility ascending/descending) 19 years ago
Darkvater 1ba8bcd0de (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
tron 318fe153eb (svn r3365) Staticise 36 functions 19 years ago
tron e588f86bb3 (svn r3364) Remove 3 unused functions (ScrollWindowToTile, AllocateWindowAutoPlace, AllocateWindowAutoPlace2) 19 years ago
tron 849fff602d (svn r3336) byte -> WindowClass, uint16 -> WindowNumber 19 years ago
peter1138 db78ce622d (svn r3302) - Fix: split drawing of text buttons and the closebox, so the closebox symbol can be centred. 19 years ago
peter1138 219a63238c (svn r3291) - Codechange, Autoreplace: Replace int with EngineID and -1 with INVALID_ENGINE, as appropriate. 19 years ago
peter1138 28df667ceb (svn r3225) - Fix for "[ 1359165 ] Autoreplace problem with r3171 and later" -- Move the disabled/hidden bits to custom data in window struct. 19 years ago
peter1138 bb82872bbf (svn r3178) - Codechange: move static _dropdown_* vars into the window custom data, giving var1 and var2 more meaningful names. 19 years ago
tron b34de09e62 (svn r3176) Use proper types, not some variants of int 19 years ago
truelight 17b97b7b63 (svn r3162) -Fix: renamed 'Message' to 'WindowMessage', a struct named 'Message' already
exists on MorphOS
19 years ago
tron 42f5ec371e (svn r3133) - static, const
- remove long unused stuff and bogus comments
- complement struct typedefs
- remove read-only (_demo_mode) and unused (_fix_mouse_at) global variables
19 years ago
tron 181d586a7c (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 8980891b09 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 19 years ago
peter1138 968f7dcf55 (svn r2974) -Fix: Drag and drop selection on drop down boxes didn't select correct item when some items were hidden.
-Separate disabled and hidden masks in drop downs to support both hidden and disabled items.
19 years ago
Darkvater 4a58250cb9 (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
19 years ago
celestar 3af8aba978 (svn r2734) -Feature: The Main Toolbar Dropdown Menu can now display disabled items 19 years ago
celestar a3739aecdf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic 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.
19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron 71140a5768 (svn r2669) Shuffle some more stuff around to reduce dependencies 19 years ago
tron 152439b56c (svn r2626) static, const, misc. 19 years ago
ludde 6246619185 (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
Darkvater 5f2c7448b5 (svn r2530) - Fix: [ 1219829 ] Mouse-wheel crashes OTTD. Widget detection failed to detect the most-right and most-bottom pixels of a widget. If scrollwheel is used on a not-found widget (such as the background of the toolbar), it will now fail correctly (glx) 19 years ago
tron a733fede9b (svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile" 19 years ago
hackykid 90900802b9 (svn r2444) - CodeChange: Add an enum for demagicifying the values of the 'flags' parameter of DrawFrameRect(). (_Abraxa_) 19 years ago
darkvater 648fa7c97d (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
pasky 9d21e74480 (svn r2074) MouseLoop -> InputLoop(), factor out a real mouse-specific MouseLoop from the new InitLoop() (more in the spirit of HandleKeypress()). 20 years ago
Darkvater 4f2816db05 (svn r1978) - Fix: Plug some memleaks; thanks Valgrind 20 years ago
Darkvater fb78ca8a62 (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 05490e0556 (svn r1890) Begin to clean up the edit box: Remove one global variable and split the combined edit/original buffer into two 20 years ago
tron c644e6b742 (svn r1827) Next iteration of the byte -> char transition: some string drawing functions and buffers 20 years ago
bjarni bd8b10d250 (svn r1680) Feature: Replace train GUI now remembers the railtype selected in the dropdown menu 20 years ago
tron 94d5aeabb2 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
tron 589215c822 (svn r1508) Remove duplicate declarations and include proper headers where necessary 20 years ago
miham 0c75fe0948 (svn r1503) Added feature:
o allows users to setup the production values of the rawmaterial producing 
  industries in the editor

Modified:
o ttd.h - added CT_INVALID for 0xFF cargo type
o english.txt - added 1 string
o industry_gui.c - the feature itself
o window.h - added compile asserts to the structs which checks whether their
  sizes are smaller than WINDOW_CUSTOM_SIZE

Thanks:
o Darkvater to bother me to constantly improve the patch
o Various users at #openttd for testing
20 years ago
darkvater 84adfdf8c8 (svn r1496) -Fix: highscore no longer crashes in network games with a dedicated server. At the end of the game (can only be set by the server) the highscore is shown for the top5 companies of that game
-Fix: fixed some compiler warnings
-Added PF_NETWORK_ONLY flag to settings. Such a setting can only be modified in a network game.
20 years ago
darkvater 199a77d1ea (svn r1479) -Added highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
-Added endgame score on 1 jan 2051 where you are added to the highscore if sufficiently large points have been accumulated. Game is paused while
-These values are saved in hs.dat; added read/write functions for it
-Added code to delete all windows to show charts. There is one issue left: somehow a news-gui pops up in front of the the chart at the end of the game.
20 years ago
darkvater 2d023f9c0b (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
bjarni 578d34cfe0 (svn r1350) Replace Vehicle GUI:
- Replaced "WP(w,replaceveh_d).line_height" with 
"w->resize.step_height" since they needed to be the same anyway
- Cleaned the code a litte for readability (like correct tabbing)
- Added company color to replace vehicle windows to make them look like 
the rest of the vehicle windows and made the caption text white (also to 
fit the standard)

 --This line, and those below, will be ignored--

M    vehicle_gui.c
M    lang/english.txt
M    window.h
20 years ago
truelight 3b7d2a8b67 (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
darkvater d02bdb0768 (svn r1340) -Feature: scrolling credits list...finally! Hope nobody gets offended if I forgot them. 20 years ago
tron 7a51cb2aef (svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows 20 years ago
bjarni 5da75918c0 (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
miham 7bf7cf80ee (svn r1297) Language fixes in the source.. (ln-) 20 years ago
darkvater 5b701e585d (svn r1225) -Feature: SHIFT+DEL now deletes all non-vital windows (only status bar and main bar remain)
-Fix: For everyone who tried to crash the game by opening a huge amount of windows and stickying all of them; bad luck. It's fixed now (thanks Tron for the helpful criticism). First all normal windows are a candidate for replacement, then if none are found, sticky windows. Then..well that should not happen :)
20 years ago