1
0
forked from 0ad/0ad
Commit Graph

40 Commits

Author SHA1 Message Date
ffc4a56b9f Revert non-ASCII characters from source and configuration files introduced in 157c6af18e.
Fixes #6846

Differential Revision: https://code.wildfiregames.com/D5185
This was SVN commit r27965.
2023-12-03 00:30:12 +00:00
bb
157c6af18e Make the space in 0 A.D. non-breaking throughout the codebase.
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful

Will add linter rule in seperate commit

Happy recompiling everyone!

Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
2023-07-27 20:54:46 +00:00
57dde8d082 Provides Canvas2D for sprite rendering.
Differential Revision: https://code.wildfiregames.com/D4029
This was SVN commit r25591.
2021-05-29 19:47:36 +00:00
969112b9c8 Replaces CPos by more a consistent CVector2D, reduces geometry code duplication.
Tested By: Freagarach, Langbart
Differential Revision: https://code.wildfiregames.com/D3759
This was SVN commit r25152.
2021-03-28 21:55:13 +00:00
f6348b9617 Clean up header includes, add new forward declarations.
This cleans up many un-necessary header includes, either simply
providing nothing or forward declarations in their place.

No major compilation time change here, though this does reduce depencies
in some headers.

Also fix up old MacOS STL-include fixes that are no longer relevant.

Differential Revision: https://code.wildfiregames.com/D3128
This was SVN commit r24227.
2020-11-21 11:20:29 +00:00
07cc1ba34c Move GUIbase structs and enums to separate files.
Differential Revision: https://code.wildfiregames.com/D2340
Tested on: clang 8.0.1, Jenkins

This was SVN commit r23022.
2019-10-01 12:46:55 +00:00
1bc6d778bb Delete GUI.h umbrella include following 8d0cb1b954.
Differential Revision: https://code.wildfiregames.com/D2304
Tested on: clang 8.0.1., VS2015, Jenkins
Comments By: Vladislav, Angen, Stan
Tested by: Angen
This was SVN commit r22941.
2019-09-20 13:11:18 +00:00
e1014aad3b Use CGUI& instead of CGUI* so that the 50+ users stop wondering whether or not that is null and can't even be mistaken to add redundant null checks preemptively.
Remove the remaining of such checks after d3e56f0f57 removed 21 of them
already.
2c47fbd66a initialized the pointer at construction time rather than at
random conditional events later.

Differential Revision: https://code.wildfiregames.com/D2205
Comments By: Vladislav, wraitii
Tested on: gcc 9.1.0, clang 8.0.1

This was SVN commit r22741.
2019-08-21 10:12:33 +00:00
a905fbbc98 Use NONCOPYABLE for most GUI classes and structs to have the compiler indicate unintended copies, refs 3028551b91 / D2163.
That is CChartData, CGUIList, CGUISeries, COListColumn, GUITooltip,
SGUIMessage, SSpriteCall, STextCall, SFeedback, IGUISetting,
CGUISetting, GUI, IGUIObject, IGUIScrollBar.
Drop copying GetSetting and SetSetting template functions for CGUIList,
CGUISeries, CClientArea, CGUIString.
Stop copying COListColumn.
Drop copying GUI<CClientArea>::GetSetting call in
IGUIObject::UpdateCachedSize() and four copying
GUI<CGUIString>::GetSetting calls in SetupText() functions.
Delete unused GUIRenderer IGLState class from 849f50a500 obsolete since
1f5b8f1c9a.

Differential Revision: https://code.wildfiregames.com/D2164
This was SVN commit r22638.
2019-08-10 00:04:17 +00:00
3028551b91 MOVABLE idiom, const CGUI struct maps, in place move construction instead of copying temporaries during CGUI XML loading and GenerateText.
Introduce MOVABLE idiom indicating that a class can use move semantics.
Make values of CGUI struct maps holding XML data const to ensure at the
root that the data is not modified.
Use NONCOPYABLE and MOVABLE for SGUIIcon and SGUIStyle to enforce the
non-copy policy on the compiler level (until someone changes the GUI
design to make modifications needed).

As indicated by that:
  Replace copy operations by in place move operations for these CGUI
struct maps in the CGUI Xeromyces XML loading functions.
  Replace copy operations by const references for CSize and SGUIIcon in
CGUIString::GenerateTextCall and CGUI::GenerateText.
  This avoids copying of non primitive members, such as the strings and
containers of strings.

Further related cleanup to be kept separated for auditability.

Differential Revision: https://code.wildfiregames.com/D2163
Few comments on IRC by: wraitii, Itms
Tested on: gcc 9, Jenkins, partially VS2015

Refs #1984,
  NONCOPYABLE CGUISpriteInstances: 0a7d0ecdde, 8f4f8e240f, c19f3608a5
  NONCOPYABLE Image, Sprite: fb8032043b
  NONCOPYABLE GUI page: 94c57085e9
  NONCOPYABLE GUIManager: 7c2e9027c2
  NONCOPYABLE macro: 16ccae10cd

This was SVN commit r22637.
2019-08-09 17:25:55 +00:00
52f2bfae2b Add virtual base initialization missing in 2c47fbd66a.
Reported by Jenkins, but not gcc, clang, VS2015.
Take the opportunity following 2c47fbd66a to make the CGUI pointer held
by IGUIObject constant (the address, not the value).

Differential Revision: https://code.wildfiregames.com/D2139
This was SVN commit r22589.
2019-08-01 23:55:10 +00:00
2c47fbd66a Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases.
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.
2019-08-01 20:20:24 +00:00
bb
e6dff349bd Fix scrollbare edgy-case and off by 1's in dropdown
Reviewed By: Imarok
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1030
This was SVN commit r20500.
2017-11-21 20:07:23 +00:00
108633affd Fix #3415. Removes 'ghost' scrollbar bounding to enable extreme-right hover and selection in dropdowns. Patch by elexis.
This was SVN commit r17149.
2015-10-31 05:40:43 +00:00
74c420f658 GUI code cleanup. Fixes #3354.
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.
2015-08-21 17:08:41 +00:00
e182b4ddd2 Fix a valgrind warning about uninitilized variables in the scrollbar code and some comment/style fixes.
This was SVN commit r14764.
2014-02-19 21:59:07 +00:00
bffe917914 Multiplayer lobby based on the XmPP protocol. Special thanks to Philip, alpha123, scythetwirler, and anyone else who has helped build, debug or test the lobby.
This was SVN commit r14098.
2013-11-07 20:07:24 +00:00
89430de468 Okay, do what f5ab6255d0 was supposed to do.
This was SVN commit r13773.
2013-08-26 04:17:26 +00:00
b10a01645f Revert f5ab6255d0. I accidentally somehow committed my whole working tree on this computer....
This was SVN commit r13772.
2013-08-26 04:15:36 +00:00
f5ab6255d0 General scrollbar improvements. Patch by Josh. Fixes #2080.
- Don't show the scrollbar when the contents aren't overflowing the
visible area.
- Fix bugs in minimum bar sizing.
- Add capability to set a maximum bar size.
- Correct outdated/incorrect comments.

This was SVN commit r13771.
2013-08-26 03:06:08 +00:00
67ca7461cd Adds Skip method to SGUIMessage which works more or less like wxEvent.Skip: GUI objects can allow other event handlers to process an input event after they finish.
Allows hotkey handling of mousewheel events after minimap. Fixes #673.
Adds SendEvent to GUI objects, used in place of separate calls to
HandleMessage and ScriptEvent.

This was SVN commit r9340.
2011-04-28 20:42:11 +00:00
1706363bab Fix #423 (Switch from CppDoc to Doxygen), based on patch from anr.
Also delete some unused declarations, and rename is_playing to
snd_is_playing.

This was SVN commit r7813.
2010-07-29 15:55:41 +00:00
051aa70940 Basic disconnection handling.
Pre-game chat.
Fix dynamic updates of focused input controls.
Allow scrollable texts to automatically scroll to the bottom.
Force usernames to be unique.

This was SVN commit r7664.
2010-07-02 21:28:48 +00:00
008d894dd7 Fix some GCC warnings
This was SVN commit r7048.
2009-07-28 16:59:19 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
a34b759720 . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it.
. timer, config: fix definition of ALLOW_RDTSC
. add movsx_be64 (for whirlpool), revise implementation, move to
byte_order, add test
. MAX -> std::max, remove those macros
. add timestamp to system_info as requested by philip

This was SVN commit r5050.
2007-05-09 21:01:11 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
3d26549032 Fixed file properties - removed svn:executable and svn:keywords (left over from CVS conversion?) from all files; set svn:eol-style=native for *.cpp, *.h (and fixed files with inconsistent line endings)
This was SVN commit r3802.
2006-04-23 23:14:18 +00:00
a69ac0dee9 - fix w4 warnings
- add convenience macros for config_db(CFG_GET_SYS_VAL)
- VFSUtil::EnumDirEnts now uses flags instead of bool recursive
- UNUSED() for params, UNUSED2 (<- need better name) for variables
- config.h defines must be tested with #if (always defined) -> allows
detecting misspellings thanks to compiler warnings
- replace debug_assert(0) with debug_warn (its sole purpose)
- replace ScriptingHost::ValueToInt et al with ToPrimitive
- use nommgr.h to disable both mmgr and VC debug heap

This was SVN commit r2585.
2005-08-09 15:55:44 +00:00
Gee
fe087a73f7 Fixed some bugs, updated some things, etc etc
This was SVN commit r2523.
2005-07-23 22:27:55 +00:00
Gee
1e8d354404 This was SVN commit r2115. 2005-04-07 09:13:10 +00:00
Gee
4113aa0a36 GUI Update. Mostly with Input Control Beta :)
This was SVN commit r1904.
2005-02-05 07:25:16 +00:00
d29833e4ed mouse_x/y => g_mouse_x/y
This was SVN commit r1767.
2005-01-23 17:35:36 +00:00
c19f3608a5 Initial changes to GUI sprite code. (There shouldn't be any visible effects - if there are, they're bugs)
This was SVN commit r1507.
2004-12-15 21:24:46 +00:00
Gee
d42de50280 Updated everything that's related to screen position to use floats
This was SVN commit r1107.
2004-09-03 05:48:47 +00:00
fe1bee706b Fixed loads of /W4 warnings, because it's easier than doing anything useful. Added some asserts to check potentially dangerous assumptions, implemented a few missing bits of code, adjusted some comments, etc.
This was SVN commit r814.
2004-07-24 14:04:40 +00:00
4258ba245d while working on cstr, search and destroy made "CStr &x" -> "CStr& x". didn't intend to hit gui code, but ok :)
This was SVN commit r534.
2004-06-18 14:07:06 +00:00
3abf9ac4b5 lots of type fixes; types.h is now a convenience wrapper on top of the standard uintN_t routines
This was SVN commit r334.
2004-06-01 17:34:12 +00:00
Gee
e326ebae46 major update
This was SVN commit r290.
2004-05-29 04:06:50 +00:00
Gee
e21ebb37f5 Major updates
This was SVN commit r141.
2003-12-27 06:26:03 +00:00