|
rubidium
|
r5447:b32babc16e44
|
18 years ago
|
|
|
|
Darkvater
|
r5431:2abf239227ce
|
18 years ago
|
|
(svn r7637) -Codechange: Change ShowQueryString to use a window pointer as a parent. If the query has no parent (eg give money, rename waypoint), the global function HandleOnEditText is used.
|
|
Darkvater
|
r5418:a305874d4e01
|
18 years ago
|
|
(svn r7621) -Codechange: Rework ShowQuery into a general modal popup window. It gets passed a parent pointer which will be blocked as long as the popup is open. This applies to newgrf-apply, heightmap warning, genworld progress.
|
|
Darkvater
|
r5416:d7f016143540
|
18 years ago
|
|
(svn r7619) -Feature (Internal): Add support for modal children. It's a window-child that will block activity for the parent window until the modal popup is dismissed.
|
|
Darkvater
|
r5415:860abee1fbee
|
18 years ago
|
|
(svn r7618) -Feature: Add support for a parent<>child relationship in Window terms. A child is a window whose parent pointer is non-null. Deleting the parent cascades deleting the children as well; children first.
|
|
Darkvater
|
r5413:541b97f78812
|
18 years ago
|
|
(svn r7616) -Cleanup: -(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.
|
|
Darkvater
|
r5268:f35d2dfd8076
|
18 years ago
|
|
(svn r7409) -Codechange: Make the ResizeWindow function also available outside of window.c. This makes it possible to programmatically resize windows specifying a delta x,y.
|
|
rubidium
|
r5236:be42400a9cd6
|
18 years ago
|
|
(svn r7356) -Codechange: replace 'for (i = 0, wi = w->widget; wi->type != WWT_LAST; i++, wi++)' type for loops with 'for (i = 0; i < w->window_count; i++) { wi = &w->widget[i];'-type for loops for better readability. -Codechange: use IsWindowWidget(Disabled|Hidden) in favor of IsWidget(Disabled|Hidden).
|
|
rubidium
|
r5233:c43769ca5c39
|
18 years ago
|
|
|
|
rubidium
|
r5232:602f924ee420
|
18 years ago
|
|
(svn r7352) -Codechange: add widget_count parameter to the window. -Codechange: check whether widget indices are valid for all the (Set|Is)WindowWidget(Disabled|Lowered|Hidden) and related functions.
|
|
Darkvater
|
r5199:e855b32ff1fa
|
18 years ago
|
|
|
|
KUDr
|
r5187:03b78dac4092
|
18 years ago
|
|
(svn r7299) -CodeChange: Train and Aircraft Build window GUI code simplified a bit: - using one engine list instead of 3 - removed engine filters (loco, wagons, helicopters, etc.) - EngineList code isolated from GUI (moved to helpers.cpp - reusing CBlobT code which does exactly what is needed for EngineList) - removed unnecessary "optimization" (rebuild and sort engine list on each WE_PAINT)
|
|
Darkvater
|
r5124:e841fbeef573
|
18 years ago
|
|
(svn r7205) -Fix [FS #350, SF #1560913]: Window allocation and deletion messed with the actual window structs inside their array, and possibly invalidating pointers higher up. Meaning that any function called within an wndproc could cause unknown/invalid pointers once control was returned to this function. Solved by the introduction of an extra abstraction layer, an array of z-window positions that is only concerned with the pointers.
|
|
Darkvater
|
r5123:5980e27de250
|
18 years ago
|
|
|
|
Darkvater
|
r5120:e769487af966
|
18 years ago
|
|
(svn r7200) -Codechange: remove unneeded redraw (console.c), coding style, use FindWindowById instead of _windows loop (viewport.c), remove dump-code (mixer.c), MSVC6 borkdness in stdafx.h, constness (viewport.c), variable localization (win32.c), comments (window.c)
|
|
peter1138
|
r5108:28640689af54
|
18 years ago
|
|
|
|
Darkvater
|
r5090:8fd5f0b6cb60
|
18 years ago
|
|
(svn r7157) -Fix [FS #221, SF1168820]: Some mouse events possibly lost under high CPU load, handle mouse input right away instead of waiting for GameLoop. (KUDr)
|
|
Darkvater
|
r5086:b3c6dfb3476b
|
18 years ago
|
|
(svn r7153) -Fix [FS #279]: Some keyboard events possibly lost under high CPU load, handle keyboard input in place instead of global variables magic. (KUDr)
|
|
bjarni
|
r5077:d84dfecd5f73
|
18 years ago
|
|
(svn r7138) -Fix: [vehicle list windows] fixed a rare crash where having some (not all) vehicle list windows open for a player, that goes bankrupt would crash the game -Codechange: closing all windows for a player will now loop all windows and close those, which got the player as caption instead of having a list of windows to close
|
|
Darkvater
|
r5072:39de6c66b72d
|
18 years ago
|
|
(svn r7130) -Codechange: Handle the positioning of windows through the desc->left/top settings with some special values (WDP_) instead of checking window-class. This also fixes FS #172 now that we can position windows arbitrarily and are not restricted to window-classes.
|
|
Darkvater
|
r5071:949c4f7f3fa6
|
18 years ago
|
|
|
|
Darkvater
|
r5043:2aa5b9560997
|
18 years ago
|
|
(svn r7092) -Codechange: Add function to send a window message to a whole class of windows, SendWindowMessageClass().
|
|
Darkvater
|
r4962:2ff3f433591e
|
18 years ago
|
|
(svn r6961) -Codechange: Remove relic from r212 WWT_NODISTXTBTN which was originally used to not to allow clicking if a button was disabled. This has been superseded in r212 with general code that doesn't allow any click events for disabled buttons.
|
|
Darkvater
|
r4939:8315d865f2fb
|
18 years ago
|
|
(svn r6926) -Codechange: Rename WWT_4 to WWT_TEXTBTN_2 and WWT_6 to WWT_INSET (credits to peter1138 for the aptly found name) -Codechange: Remove the explicit numbering from WindowWidgetTypes
|
|
Darkvater
|
r4938:ccfdb2e58d04
|
18 years ago
|
|
(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.
|
|
Darkvater
|
r4884:efc306240cec
|
18 years ago
|
|
(svn r6821) -Codechange: For the measurement tool do not show the tooltip when the selection is only a single tile. Seems this was a bit annoying to some ;)
|
|
Darkvater
|
r4834:d9187a2081d2
|
18 years ago
|
|
(svn r6758) -Feature: Add a measurement tool that will show dimensions and height differences of various draggable tools (inspiration, concept and double checking by MeusH).
|
|
bjarni
|
r4800:28f9264f7dd8
|
18 years ago
|
|
(svn r6722) -Codechange: [aircraft build window] moved aircraft build window to a file of it's own Also made some changes to it so it should be easier to unify all the build vehicle windows
|
|
bjarni
|
r4790:10d9c442fb82
|
18 years ago
|
|
|
|
bjarni
|
r4786:0b6acbed2002
|
18 years ago
|
|
(svn r6707) -Feature: [build aircraft window] added buttons to view propeller planes, jet planes or helicopters -Codechange: the build aircraft window now generates 3 malleced lists and displays based on those list This is preparation for sorting aircraft
|
|
bjarni
|
r4770:543b61edc4ba
|
18 years ago
|
|
|
|
bjarni
|
r4766:faaab7cb5a8d
|
18 years ago
|
|
|
|
bjarni
|
r4765:7228ab2d82f2
|
18 years ago
|
|
(svn r6679) -Feature: [train build window] added filter for wagons, engines or both in the display -Codechange: [train build window] to get rid of a really ugly hack, the train build list is now generated in one loop and stored in an array
|
|
glx
|
r4755:2d0c9bd7697a
|
18 years ago
|
|
|
|
belugas
|
r4749:78fcb653fd27
|
18 years ago
|
|
(svn r6661) Feature: Windows are not restricted to 32 widget items anymore. The functions required to do so are to be found in window.h. Rather then use the old deprecated disabled_state, hidden_state and click_state uint32 variables, we now need to use accessors like SetWindowWidgetDisabledState, SetWindowWidgetHiddenState or SetWindowWidgetLoweredState. This is the final commit for the merge of XTDwidget branch.
|
|
bjarni
|
r4739:596230f43fa6
|
18 years ago
|
|
(svn r6651) -Coding feature: added the windowevent WE_INVALIDATE_DATA This gives the ability to invalidate some window data and recalculate as needed instead of doing it for each WE_PAINT
This event is called right away when using InvalidateWindowData(), so it may be a good idea to set a bool or similar in the window or similar and then act on that bool in WE_PAINT instead of doing a lot of stuff in WE_INVALIDATE_DATA as it might be called more than once before WE_PAINT is called
InvalidateWindowData() will not automatically repaint the window, so if you want to repaint it as well, you need to mark it dirty as well.
Made the depot windows use WE_INVALIDATE_DATA to set when to generate the engine and wagon lists instead of at each redraw It makes no sense to regenerate the list when say using the scrollbar if we know that no vehicle have entered or left the list
NOTE: currently there is a piece of code to generate the list when it's not needed and compare it to the stored list and assert if they mismatch This check is somewhat slow and kills the whole idea of WE_INVALIDATE_DATA, so it's a short lived one to verify that InvalidateWindowData() is used everywhere where it's needed
|
|
glx
|
r4730:532c49368f4b
|
18 years ago
|
|
|
|
belugas
|
r4727:8181e87539cd
|
18 years ago
|
|
|
|
belugas
|
r4719:e1d2222eb9fb
|
18 years ago
|
|
(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)
|
|
bjarni
|
r4712:ace1fd623579
|
18 years ago
|
|
(svn r6624) -Feature: added ability to add refit commands to vehicle orders (can only be done in goto depot orders) Example: make a train transport iron ore from A to B, then it visits a depot and refits to steel It then transport steel back to A or near A if there is a factory and then it visits another depot to refit to iron ore again
This is controlled in the orders. If a goto depot order is lightlighted, then "Unload" changes to "Refit" Control click "Refit" removes the refit part of the order (as the tooltip says) The player will still pay the normal refit costs
Known issues: If a vehicle is not in a depot, then the refit window will fail to tell refitted cargo capacity Refit costs in the refit window can sometimes print 0 when it should not because the refit calculation is unaware that the vehicle will be refitted in between
Warning: autoreplace got a protection against replacing something so you get a new cargo type, but it can fail here. In the iron ore/steel example, it can see that the vehicle carries iron ore and the new one can be refitted to iron ore, then it will replace. It will not check to see that it's valid for steel as well. This is something to look into in the future
|
|
peter1138
|
r4695:dfd8be1a9fcf
|
18 years ago
|
|
|
|
peter1138
|
r4694:2106e27743ca
|
18 years ago
|
|
|
|
belugas
|
r4692:b4568f9a45bc
|
18 years ago
|
|
(svn r6599) -Codechange: Add accessors around the members click/disabled/hidden_state of Window This is the first step toward merging XTDwidget.
|
|
bjarni
|
r4638:2cf83a5d0131
|
18 years ago
|
|
(svn r6513) -Codechange: unified the code to draw depot windows This change is intended to make it easier to make depot behaviour consistent and faster to code when adding more features in the future The user interface should hopefully not be affected by this
|
|
bjarni
|
r4635:6518f3ca4e6d
|
18 years ago
|
|
(svn r6503) -Codechange: added a function to tell what vehicles a depot contains This will ensure that you can always get the same list when checking for vehicles in a depot (no need to duplicate code for each place, that needs such a list) Since the vehicles are only looped once for each redraw, drawing speed is around twice as fast (measured to be 114%-121% faster depending on the number of vehicles in the game)
|
|
belugas
|
r4634:c040de534aac
|
18 years ago
|
|
|
|
Darkvater
|
r4547:6bbd94aaa2a8
|
18 years ago
|
|
|
|
Darkvater
|
r4542:80951dd47a54
|
18 years ago
|
|
(svn r6372) -Codechange: static, unneeded decleration in headers, superfluous header includes -Codechange: Unify the Sorting struct both for vehicle-lists and network-lists.
|
|
bjarni
|
r4520:34be879ba20b
|
18 years ago
|
|
(svn r6345) -Codechange: AllocateWindowDescFront() now ensures that window_number is set before calling the WE_CREATE event this allows using the window_number in WE_CREATE window event handlers
|
|
tron
|
r4438:d44613af0690
|
18 years ago
|
|
|
|
tron
|
r4437:dd0f972a6eac
|
18 years ago
|
|
|
|
rubidium
|
r4434:c817458d470e
|
18 years ago
|
|
|
|
belugas
|
r4345:3e958e22413f
|
18 years ago
|
|
(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
|
|
rubidium
|
r4344:bff007ae1fd1
|
18 years ago
|
|
|
|
truelight
|
r4337:4fcbb5be7d8e
|
18 years ago
|
|
(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'
|
|
truelight
|
r4335:d64541888d2c
|
18 years ago
|
|
|
|
truelight
|
r4318:1dfdd5583c16
|
18 years ago
|
|
|
|
truelight
|
r4300:642b2431578b
|
18 years ago
|
|
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds: - New optional landscape generator (TerraGenesis Perlin) - Load heightmaps (either BMP or PNG) - Progress dialog while generating worlds (no longer a 'hanging' screen) - New dialogs for NewGame, Create Scenario and Play Heightmap - Easier to configure your landscape - More things to configure (tree-placer, ..) - Speedup of world generation - New console command 'restart': restart the map EXACTLY as it was when you first started it (needs a game made after or with this commit) - New console command 'getseed': get the seed of your map and share it with others (of course only works with generated maps) - Many new, world generation related, things - Many internal cleanups and rewrites Many tnx to those people who helped making this: Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic) Many tnx to those who helped testing: Arnau, Bjarni, and tokai (alfabetic) And to all other people who helped testing and sending comments / bugs Stats: 673 lines changed, 3534 new lines, 79 new strings
|
|
truelight
|
r4299:ee21d1b71ef0
|
18 years ago
|
|
(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only allow certain patterns (like numbers only)
|
|
tron
|
r4266:5d7162f0a3b0
|
18 years ago
|
|
|
|
belugas
|
r4171:bf306290d87e
|
18 years ago
|
|
|
|
tron
|
r4077:259c4c4aacad
|
18 years ago
|
|
|
|
celestar
|
r3812:1a25bd693268
|
18 years ago
|
|
|
|
Darkvater
|
r3458:800f3b51f4b4
|
19 years ago
|
|
|
|
Darkvater
|
r3344:abc4ac7cb74a
|
19 years ago
|
|
|
|
bjarni
|
r2970:88088b9fcd53
|
19 years ago
|
|
(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
|
|
Darkvater
|
r2906:c34c12872496
|
19 years ago
|
|
|
|
Darkvater
|
r2888:fb75aa3b91f8
|
19 years ago
|
|
|
|
Darkvater
|
r2887:4db7143839b4
|
19 years ago
|
|
|
|
tron
|
r2817:7ad46034031f
|
19 years ago
|
|
|
|
tron
|
r2816:3dd6634c2a23
|
19 years ago
|
|
|
|
tron
|
r2788:50876acf77ef
|
19 years ago
|
|
|
|
peter1138
|
r2757:6b60d5d4934f
|
19 years ago
|
|
|
|
peter1138
|
r2746:dd3a78aef54a
|
19 years ago
|
|
|
|
peter1138
|
r2683:fd4e76041d77
|
19 years ago
|
|
|
|
peter1138
|
r2636:559bb89503b9
|
19 years ago
|
|
|
|
tron
|
r2634:a3ccca486bdf
|
19 years ago
|
|
|
|
truelight
|
r2622:9aba7bb6f7f0
|
19 years ago
|
|
(svn r3162) -Fix: renamed 'Message' to 'WindowMessage', a struct named 'Message' already exists on MorphOS
|
|
tron
|
r2596:b1e566613b25
|
19 years ago
|
|
(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
|
|
tron
|
r2549:1549d4b2ba28
|
19 years ago
|
|
(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
|
|
tron
|
r2498:8dfa040ed505
|
19 years ago
|
|
|
|
peter1138
|
r2448:c38ee06caea5
|
19 years ago
|
|
(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.
|
|
Darkvater
|
r2436:963efe8b84cc
|
19 years ago
|
|
(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
|
|
celestar
|
r2216:ed8d0dd67dce
|
19 years ago
|
|
|
|
celestar
|
r2187:60cea7c48bf4
|
19 years ago
|
|
(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.
|
|
tron
|
r2186:5ee653b1b5e1
|
19 years ago
|
|
|
|
tron
|
r2159:2c706fe6b0a7
|
19 years ago
|
|
|
|
tron
|
r2116:ddc2d73f5c38
|
19 years ago
|
|
|
|
ludde
|
r2064:5f15fe050577
|
19 years ago
|
|
(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.
|
|
Darkvater
|
r2021:429904c4db14
|
19 years ago
|
|
|
|
tron
|
r1977:1f8b99c96041
|
19 years ago
|
|
|
|
hackykid
|
r1938:bf28411019cf
|
19 years ago
|
|
|
|
darkvater
|
r1648:720d51a7e71e
|
20 years ago
|
|
(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.
|
|
pasky
|
r1570:9926c7803b79
|
20 years ago
|
|
|
|
Darkvater
|
r1474:03cff91e43a0
|
20 years ago
|
|
|
|
Darkvater
|
r1390:bd550d5f6790
|
20 years ago
|
|
(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().
|
|
tron
|
r1386:4a215c381ba1
|
20 years ago
|
|
|
|
tron
|
r1323:29249e0649f7
|
20 years ago
|
|
|
|
bjarni
|
r1178:3bce352ebe38
|
20 years ago
|
|
|
|
tron
|
r1093:18f56ef2d029
|
20 years ago
|
|
|