Drop the use of lowlevel interfaces and consitently use the cpp
interface decupling it from systm dependent code.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
`this.events` is only valid during one turn. When it is used in the next
turnn it might be outdated. So it makes no sense to keep it alive untill
the next turn.
There is a workaround for an old bug with the use of wxCollapsiblePane.
As the widget itself is no longer in use, just remove the now dead code.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
The terrain selection notebook is painful to navigate with a large
amount of tabs. Further the control is broken on macOS. As such replace
the wxNotebook with a wxChoicebook.
Fixes: #8705
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Interdependent content width in terrain selection panel results in GTK
throwing warnings. Don't expand the grid cell content.
Also wrap the grid to keep spacing consistent and not variable for the
terrain buttons.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
iwyu 0.26 now want's full declaration of TYPE in case of
std::vector<TYPE>, which is good as it allows the header to be
self standing.
There are some other changes suggested in part of the headers not being
updated when they should have been and some due to changes in iwyu
itself.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Add the header to iwyu mappings as private as the wx documentation
doesn't suggest otherwise.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
A regex-based
search across the codebase confirms there are no other instances
of "Man" that should be renamed to "Manager".
Variables were not renamed.
This commit performs code cleanup to improve
code clarity and consistency:
Remove redundant 'virtual' keywords from methods that are already marked
with 'final' or 'override', as well as reducing redundant 'override
final's to 'final'.
Previously, TreeSection was drawn before TrainerSection.
Reversing the order ensures TrainerSection layout is resolved first,
which fixes scroll state being computed against an incomplete
structree page render.
Fixes#8893
Instead of storing a single flat list of positions and data per
building, RallyPoint now stores them keyed by player ID. This lets
mutual allies independently set and display rally points on each
other's structures.
The GUI now allows selecting allied buildings with a rally point
and only shows the viewing player's own rally point data.
GuiInterface gets an OnUpdate handler to keep displayed positions
in sync when rally point targets move.
GetRallyPointCommands now takes raw position and data arrays instead
of a component reference. The network command field is also renamed
from "entities" to "structures".
Fixes#3115
The function was used as a fallback for when a platform specific approach
isn't available. Given that it effectively is a roundabout way to derive
it from argv[0] which we use as a generic fallback anyway just remove
it.
This further allows to make cxxtest optional.
Refs: #8618
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This is more reliable than argv[0] which is effectively used via
unix_ExecutablePathname. Also drop the fallback as it effectively is the
same as the generic fallback and blocks making cxxtest optional.
On FreeBSD the procfs is not mounted by default, so use a syscall
instead.
Refs: #8618
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
The fallback is of little value and blocks making cxxtest an optional
build dependency. While at it use realpath instead of readlink.
Refs: #8618
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Remove stale NAN and INFINITY, both have equivalents since C++11 and
cleanup headers in wposix source file.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
I forgot to finish CSubmitScheduler synchronization in
7c84c23114. Even ++m_FrameID was
forgotten. And it worked at the time. A proper synchronization is
described in renderer/backend/Vulkan/SwapChain.h.
The disabled test are all broken one way or another. The maps used in
the tests got renamed. The pathfinder component got some performance
improvements which now require to call UpdateGrid() once before use.
Finally for the InitAttributes to be deep frozen they need to be an
object, so initialize them.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
test_hash depends on modmod for xml schemas. InitAttributes need to be
set as deep freezing expects them to be a valid object. The map used got
renamed at some point. Finally prior to running the sim PreInitGame()
and InitGame() need to be called.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Don't declare empty constructor and destructor, avoid c-style cast and
remove TODO about a bug that can't be reproduced any longer.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Unused and since C++17 not really valuable with std::aligned_alloc
(_aligned_malloc and _aligned_free in case of MSVC) available. We also
have an other similar interface with "lib/sysdep/vm.h".
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
KEY_DOWN means we need to check for the "down" values instead of "char"
value which differer for numpad.
Ref: #501
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
9 isn't a valid playerID, setting this value causes a JS error
and corrupting the viewport.
Further limit selectable max playerID to what the mapSettings say.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
In many places there are missing gaps/borders and where there are there
are almost random values used (2/3/4/5/8/10/15).
Add missing and standardize on using gaps 5 and 10 pixel only.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
getTotalQueueTime(queue) calculates total remaining
queue time of a production building.
getBuildingsSortedByQueueTime(entities), sorts building selection
by their queued training time and filter invalid entities
Removes the resource availability guard from the Training selection
panel onPress handler to align mouse interaction with hotkey behavior
The `closePageCallback` isn't forwarted to the function calling it. Now
it's possible again to continue a saved campaign.
The error was introduced in 76b6725272.
Since C++11 a C typedef'ed union can be forward declared, so the wrapper
is no longer needed.
While at it switch signatures to refs and convert C style casts.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Add registerGlobalGuiPageHotkeys() to
common/functions_utility.js to selectively register
GUI page hotkeys
Allow active GUI pages to close using their corresponding hotkey
Move page_hotkeys.xml from gui/hotkeys/ to gui/
Update page_hotkeys.xml references in MainMenuItems and MenuButtons
Add default tipScrolling fallback in TipsPage when no initData is provided