Age | Commit message (Collapse) | Author |
|
before... doing anything with them. (Thanks to MeusH for pointing this out...)
|
|
refit window
This was actually not a bug from unifying this window as it was incorrect even before they were merged
|
|
in shared orders and station lists
|
|
SetWindowWidgetsDisabledState() and SetWindowWidgetsHiddenState() to depot and vehicle windows
|
|
don't use it to store data; instead, just get the widget's width.
|
|
1 is always first and so on
This should not be a big slowdown as it's only called each time the list is generated and will normally be much faster than the list generation itself (only a small % of the total number of vehicles is in the depot)
|
|
longer closed by a window event if the list is empty
The window is now closed when the order is deleted.
This is because removing windows from a window event is asking for problems
|
|
This moved a few of the strings and sprites a few pixels. Hopefully this will work out ok.
|
|
classes, so it's possible to redraw all lists of one vehicle type again (instead of all types)
|
|
|
|
DrawWindowWidgets, as it is a bit useless
-Fix(r6562): Use the correct widget index for enabling
|
|
(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
|
|
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
|
|
cases.
|
|
different from NULL before assigning data to it
|
|
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
|
|
more gui-fu needed...
|
|
scrolled.
|
|
DBsetXL, amongst others. This requires a savegame bump to save the cargo subtype.
|
|
refit window has been altered to support resizing and scrolling. Note that the cargo subtype isn't yet passed for actual refitting yet. (Based on mart3p's patch)
|
|
for each vehicle type
This is a request from translators as depot is not valid for all vehicle types in all translations
This will cause a lot of warnings when generating the lang files. MiHaMiX will fix them in a moment (hopefully)
|
|
vehicles having a certain depot in their orders
It got one known issue though. The top bar got a plural issue so expect to see stuff like "1 trains" until we figure out why it behaves this way
Added the button to the depot windows. Made the autoreplace button bigger while I was moving some widgets anyway
Made road vehicle depot windows start with one more row to make room for the buttons
|
|
allocation over and over if possible (like BuildDepotVehicleList() )
This will prevent some reallocations when sorting vehicle list windows
It also prevents moving the whole array into a new one each time the list is generated/updated (it used to make the list in one array and then move it into another one each time)
Also ensured that neither GenerateVehicleSortList() or BuildDepotVehicleList() will never allocate lists longer than the total number of vehicles in the game
|
|
when drawing the bottom row of buttons
|
|
vehicle lists
|
|
|
|
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
|
|
code into two new functions to make it easier to see what goes on where
|
|
reflect what it does.
|
|
|
|
This was requested by peter1138
|
|
WindowEvent, which is now a struct
|
|
ReplaceVehicleWndProc()
|
|
deselect the engine instead of selecting the first in the list (consistent with all other windows)
-Fix: [autoreplace GUI] engine info is now drawn in the right side even if the left list is empty
|
|
info text in the autoreplace window
|
|
from each time the window is redrawn
To do this, the player struct contains an array, that contains the count of each engine type that the player owns
Those arrays are updated each time a vehicle is build or deleted and is calculated on load (it's not saved)
It's possible to access the arrays outside of the autoreplace GUI, so feel free to read from them in other patches as well
|
|
locomotives consisting of more than one unit will only be counted once
This also cleaned up the counting loop alot and it will also (hopefully) be faster (didn't benchmark it)
|
|
more uniform.
-Cleanup: whitespace alignment of a few tables.
|
|
to 'data'.
|
|
|
|
every WE_PAINT
-Codechange: Initialize sorting-type on WE_CREATE instead of checking every time.
-Codechange: Update custom vehiclelist_d with standard list_d struct, more static
|
|
superfluous header includes
-Codechange: Unify the Sorting struct both for vehicle-lists and network-lists.
|
|
PlayerVehWndProc() into WE_CREATE
|
|
PlayerVehWndProc()
This is possible now that the window number is known when running WE_CREATE and it's a nicer solution
|
|
goto depot button
-Codechange: unified the code for mass goto depot to avoid duplicated code
-Fix: Vehicles already on the way to depots will not be cancelled by mass goto depot (made it really hard to send all vehicles at once)
|
|
|
|
vehicle list windows
this list is also used by mass goto depot to ensure that they use the same vehicles
right now only the list of all vehicles use this for goto depot, but eventually all the types will use this
|
|
|
|
|
|
resizing to smaller windows (AsterixMG)
|