Age | Commit message (Collapse) | Author |
|
multiplier instead of a vehicle. Fixes incorrect display of total
train capacity.
|
|
enumerators when we will never use
their type anyways.
|
|
player, resulting in an empty vehicle purchase list. Specify the player
as an argument to IsEngineBuildable()
|
|
|
|
when the window is opened
and remove a useless loop that tested if selected engine is still in list (moved to list
generation).
|
|
|
|
warrant a redraw, so call
that after the WE_INVALIDATE_DATA event and remove (some of) the superflouous calls.
|
|
by custom rule
|
|
from 9m to 1.5m cycles for a redraw of a full list is not frivolous.
|
|
|
|
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)
|
|
multiplier for the weight of cargo on freight trains, to simulate longer heavier trains. The default value of 1 behaves as before.
|
|
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.
|
|
|
|
(reported by skidd13)
|
|
window's number.
|
|
positioning WDP_AUTO = -1)
|
|
WWT_INSET (credits to peter1138
for the aptly found name)
-Codechange: Remove the explicit numbering from WindowWidgetTypes
|
|
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.
|
|
sprites meaningful names.
|
|
capacity.
|
|
refittable to in the purchase information window. (mart3p)
|
|
replace window) to allow room for more text. (mart3p)
|
|
instead of using hardcoded values. (mart3p)
|
|
The last parameter should point to the end of the buffer (eg lastof(buf))
Courtesy of Tron.
|
|
setting cargo type to CT_INVALID and handling it later. STR_8838_N_A is not a valid cargo type...
|
|
the {CARGO} command and supply the cargo type and quantity, instead of manually looking up the cargo type's string.
|
|
enabled later if refitting is possible.
|
|
they can contain cargo. This allows us to show the full cargo contents.
|
|
and just normally
check a boolean; no special magic needed
|
|
pass a StringID
|
|
position instead of plain EngineID. This brings us back the custom order that was lost when generalized sorting was introduced.
|
|
mistake in the widget names (the game itself is unaffected by this)
|
|
InvalidateWindowData() in rail_cmd.c
Moved the actual modification of railtype to WE_INVALIDATE_DATA in the train depot handler
-Codechange: added SetWindowDirty() to WE_INVALIDATE_DATA as it made no sense to update the list without making the window dirty
|
|
used for all vehicle types
|
|
to trailing empty blocks in the list array
Since they were freed with the rest of the array, it only meant that we wasted a few bytes (max 16) while the window were open and we didn't leak memory
|
|
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
|
|
|
|
|
|
reliability instead of the lowest to make them useful even when old
-Fix: when retiring an engine design, invalidate the build windows and invalidate the build window data
-Fix: mark build windows dirty when engine reliability changes
|
|
when the window data is invalidated or the window is generated, not on each redraw
|
|
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
|
|
names and fixed some incorrect indents
|
|
in the train purchase list.
|
|
(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)
|
|
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
|
|
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
|
|
This was requested by peter1138
|
|
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
|