This means the type information is available for all methods operating
with the setting type, which is easier for the authors, allows for
compile-time checks and optimizations.
Remove the enum that was used to indirectly obtain the setting type at
runtime.
Revises SGUISetting and enum from e326ebae46 (5122b0f906),
std::function from 82f1d2718b.
Differential Revision: https://code.wildfiregames.com/D2145
Tested on: gcc, clang, VS2015, Jenkins
This was SVN commit r22604.
Revise 53b335f5ae in CInput::UpdateBufferPositionSetting to use the
SkipMessage argument from 4113aa0a36 to prevent the infinite loop
instead of hijacking the pointer.
This was SVN commit r22603.
Call JS_AddExtraGCRootsTracer and JS_RemoveExtraGCRootsTracer depending
on JS::Heap use instead of on CGUI page link setup.
GUIObjects should be able to access the GUI page independent of the
scripting (for example to obtain PredefinedColors, refs D2108).
Refs: D2108, c02a7e1a7b
Comments By: wraitii
This was SVN commit r22587.
The type differs from the Color type, because contrary to Color, it can
be created from a color predefined in the GUI page (such as "yellow").
Move this predefined color check to the new class instead of hardcoding
it in FromJSVal / ToJSVal, GUIUtil, JSInterface_IGUIObject and to
straighten the latter.
Delete fov_wedge_color from Minimap, unused since introduction in
5275dc862b.
This was SVN commit r22558.
The variable was introduced in 492e49da38 without being used, neither
did it become used in a later commit. To me it seems that it is a
left-over from a copy paste, as the ".left" functions do use the
variable.
Notice 74c420f658 did cleanup around these lines, but did not remove
this variable
Patch By: Angen
Differential Revision: https://code.wildfiregames.com/D1813
This was SVN commit r22166.
Note that this does not fix the warnings in AtlasObjectXML, someone
interested
in fixing those should check whether using ICU would be a nicer
solution.
Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D740
This was SVN commit r20095.
Patch By: Vladislav
Refs #4225, D763
Also use SDL_Keycode instead of int, remove an outdated history lookup
comment and some other unneeded comments.
This was SVN commit r20074.
Some invalid cursor positions were not checked, resulting in a crash in
Debug mode. This was revealed by e1e4ef0370, refs #4401.
Reviewed By: echotangoecho, Itms
Differential Revision: https://code.wildfiregames.com/D484
This was SVN commit r19579.
Lots of code style fixes:
* type [*&]varname -> type[*&] varname
* else
if (...)
->
else if (...)
* Spaces around some ops.
* i++ -> ++i.
* switch-case style fixes.
* Indentation fixes.
* Removing some commented out code.
* include header sorting
* Changed multiple pointer var declarations to be one per line.
* Removed strange spaces in some places.
* Changed some include header guards to be consistent with the rest of
the codebase.
* Use UNUSED() instead of UNUSED2().
Some small code fixes:
* Using .find() instead of .count() == 0.
* !.empty() instead of .size() == 0.
* Range-based for loops.
* Making some member functions const by small changes.
* Adds GetScrollBarPos(idx) const for this.
* Using early returns/continues in some places.
* Uses size_t for some loops in CList and COList.
* Removes unused heading element (not attribute) from COList.
* Use ENSURE in one case where some custom code did something similar.
* Made some parameters const ptrs/refs.
* Change removal loop in GUItext.cpp to erase-unique.
* Made some static things const.
* Allow iterating over children of IGUIObject with range-based for
loops by
exposing begin() and end() (rename from ChildrenIt{Begin,End}()) and
use it.
Comments:
* Comment COList.
* Update a few comments.
* Remove useless or duplicated comments.
This was SVN commit r16931.
This fixes the problem where passing a non-ASCII string to
debug_printf(L"%hs", s) caused vswprintf_s to fail on Linux (because it
doesn't know what encoding the char* is meant to have). Now debug
messages will remain as UTF-8 until they reach the OS.
Fixes#3021.
This was SVN commit r16332.
Implements SDL2 text editing handler for input fields, this is for IME
support, so users entering CJK text can see what they're composing
before committing it. Should have no effect on SDL1 or normal text
input.
This was SVN commit r15785.
* Adds SDL color cursor implementation
* Adds config option for choosing preferred display in multimonitor
setup
* Uses text input API to better handle CJK input
* Fixes various hotkey and input bugs
SDL 1.2 is still the default and recommended, to test experimental SDL2
support, pass the --sdl2 flag to update-workspaces
This was SVN commit r15767.
Replace unifont with CFont and CFontManager, since the h_mgr interface
was
needlessly inconvenient.
Load the font textures through CTextureManager, to support dynamic
reloading (e.g. when resetting GL state - see #741).
Add CFontMetrics as a convenient wrapper for code that just wants to
measure text.
Fixes#1117.
This was SVN commit r14016.
Switch all the constant strings in graphics code to use the new
variables.
This avoids the cost of instantiating CStrInterns at runtime every
frame.
This was SVN commit r13906.
the old debug_assert always ran and tested the expression, which slows
down release builds. wrapping them in #ifndef NDEBUG is clumsy. the new
ASSERT behaves like assert and ENSURE like the old debug_assert. Let's
change any time-critical but not-super-important ENSURE to ASSERT to
speed up release builds. (already done in bits.h and unique_range.h)
This was SVN commit r9362.