Commit Graph

71 Commits

Author SHA1 Message Date
4663ac0fe7 split debug_assert into ENSURE and ASSERT as discussed in a previous meeting.
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.
2011-04-30 13:01:45 +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
d045258c29 Let exceptions in GUI script events triggered by script setters propagate out of the setter, so error messages aren't useless.
This was SVN commit r8997.
2011-02-27 17:57:32 +00:00
1c7e33b528 Remove a load of implicit CStr type conversions, since they're error-prone and can cause silent data loss.
Handle most CStr8/CStrW conversions via UTF-8 instead of effectively
assuming Latin-1.
Return UTF-8 strings from Xeromyces API.

This was SVN commit r8929.
2011-02-17 20:08:20 +00:00
19dbbb816d Changed all references from old CLogger API to use the new API. Removed old API. Fixes #247
This was SVN commit r8791.
2010-12-05 08:41:55 +00:00
64bd264fc0 Attempt to fix GUI script interaction with JITs.
Simplify some other GUI script interface code.

This was SVN commit r8657.
2010-11-20 00:45:58 +00:00
bd3bd084c0 Support new SpiderMonkey API.
wposix: Define int8_t compatibly with SpiderMonkey.
Remove unused camera, lightenv JS interfaces.
Remove most of vector JS interface.
Remove some of the redundant JS string conversion functions.
Remove unneeded vmem, _lodBias functions.
Clean up some formatting.

This was SVN commit r8629.
2010-11-16 23:00:52 +00:00
9ee44bd9b8 Game setup changes, including showing name, civ, team, and some options loaded from the scenarios. Civ data added. Civ info window to preview civs. Icon tooltips. Support for random map implementation. Fixes #590.
This was SVN commit r8494.
2010-10-30 04:02:42 +00:00
1cc4d358d7 Fix #549 (Allow units to be moved by right-clicking on the mini-map), based on patch from Badmadblacksad
This was SVN commit r8107.
2010-09-11 19:49:21 +00:00
d46abd9aaf Use a fixed aspect ratio for the menu screen background and loading screen concept art, to prevent ugly stretching at widescreen resolutions
This was SVN commit r7898.
2010-08-10 22:39:00 +00:00
9674c3c0fe Remove ScriptingHost initialisation code (share with ScriptInterface instead).
Fix GUI scripts to avoid strict warnings.
Rejig GUI/SpiderMonkey interface to use less custom code, and to work
with JSOPTION_VAROBJFIX.
Add event name to GUI event handler function names (visible in the
profiler).

This was SVN commit r7769.
2010-07-19 23:01:58 +00:00
e88391e5d8 # GUI bug fixes.
Align rendered shapes to pixels, to avoid fuzzy textures and subpixel
gaps at unlucky screen sizes.
Reposition dropdown scrollbars correctly after dynamic size changes.
Fix mouse-drag selection of text in input controls.
Draw input selection background as a nicer size.
Support tooltips on lists.
Support 'enabled' on lists.
Fix crash when switching GUI pages in tick hander.

This was SVN commit r7649.
2010-06-30 21:20:08 +00:00
4ff8d8742c Partially support Unicode strings in GUI XML files
This was SVN commit r7594.
2010-05-30 13:11:32 +00:00
c399dc277e # Rough first version of GUI redesign
Minor GUI engine cleanups

This was SVN commit r7289.
2010-01-27 19:20:34 +00:00
7c2e9027c2 # Rewrite of the game's simulation system
Giant merge from
http://svn.wildfiregames.com/hg-source/file/5fb522019d5e
Infrastructure is largely complete, gameplay is largely missing
Disabled by default; use command-line flag "-sim2"
(Second attempt at commit...)

This was SVN commit r7259.
2010-01-09 19:20:14 +00:00
9662666403 more string drudgery
- sprintf, snprintf -> sprintf_s (ensures 0-termination of result)
- use %s instead of %hs with sprintf_s to avoid GCC warnings
- convert h_mgr's to_string to unicode

This was SVN commit r7170.
2009-11-06 10:59:10 +00:00
8a52113e60 huge cleanup and conversion of most string handling (especially paths) to unicode
please note: format strings must be %hs for char* arguments and %ls for
wchar_t*

This was SVN commit r7161.
2009-11-03 21:46:35 +00:00
d63acc604f Apparently GUI should be able to try and set a setting, without it actually being defined, see comments in IGUIObject::LoadStyle.
Removing invalid access to setting in progress bar.
closes #314

This was SVN commit r7155.
2009-10-13 22:59:21 +00:00
92637c1041 refactoring all PS_RESULT in GUI to PSRETURN/PSERROR
closes #128

This was SVN commit r7147.
2009-09-27 15:04:46 +00:00
90f6641c1d Removing PS_RESULT errors from GUI, return values still need work
Affects Ticket #128

This was SVN commit r7145.
2009-09-23 21:16:55 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
4027a8f11b dehydra-inspired fix: get rid of all using namespace std (potentially confusing / pollutes namespace).
Long iterator type names are better expressed via typedefs, anyway :)
(or 'auto' keyword of upcoming C++09)

This was SVN commit r6226.
2008-07-13 21:22:03 +00:00
53bcba3368 Atlas: Updated wxJS to latest SVN version. Made the JS runtime have a greater lifetime than all the wx windows, to avoid garbage collection problems.
IGUIObject: Cache the JSObject*, to prevent some frequent allocation
while running GUI scripts.
JSInterface_IGUIObject: Fixed garbage collection issues.
JSInterface_IGUIObject, ScriptGlue: Changed to the JS_THREADSAFE form of
JS_GetClass.
Util: Avoid startup warnings on Linux caused by using unimplemented
cpu_* functions that aren't needed for anything important yet.
sysdep/unix: Changed to native line endings.

This was SVN commit r5154.
2007-06-08 22:56:01 +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
8d0a7170f6 # Slightly tidied up string code.
CStr: Indented comments more consistently. Made some parameters
pass-by-reference, made some others not. Removed some useless methods -
Length (use length or empty), GetSubstring (use substr), LCase/UCase
(use LowerCase/UpperCase). Removed operator[] bounds-checking because
VS2005 does that anyway.
Maybe fixed noncopyable warnings on VS2003.

This was SVN commit r4828.
2007-02-01 14:46:14 +00:00
5f7855f7f0 Simplification of #Include paths: relative names are used only for included files in the same directory as the including file; everything else uses the full path relative to source/.
This was SVN commit r3930.
2006-06-02 02:10:27 +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
pyrolink
230b7a896c Right click/double click support in main GUI handler, minimap updates-drag and order issuing
This was SVN commit r3381.
2006-01-21 11:07:25 +00:00
f2b88d7792 GameSetup: "-autostart=mapname" command-line parameter, for faster testing.
Misc: Don't catch(...)
Atlas: Removed old project files; adjusted include paths.

This was SVN commit r3062.
2005-10-30 21:30:52 +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
8ebbb0bf35 Added IsRootParent function to check if the absolute property should be ignored or not.
This was SVN commit r2502.
2005-07-20 23:49:39 +00:00
Gee
5f15ff3b2d It is now valid for parentless objects to have absolute set to "false", this can be viewed as if the object were the screen's child, i.e., it doesn't matter if absolute is true or false if an object has got no parent, the property is ignored.
This was SVN commit r2495.
2005-07-20 03:52:09 +00:00
ec6b78b252 rename assert2 debug_assert; use instead of all plain assert(), since there are no longer any issues (e.g. can't use while handling an exception)
This was SVN commit r2447.
2005-06-28 04:06:25 +00:00
0eb78450c0 Maybe fixed GUI event-handler function things. Other minor changes and fixes.
This was SVN commit r2096.
2005-03-30 22:33:10 +00:00
MarkT
bb7a22f32a First draft of a GPG3-style profiler (including tracing into scripts, after a fashion)
This was SVN commit r2090.
2005-03-30 16:14:19 +00:00
Gee
4113aa0a36 GUI Update. Mostly with Input Control Beta :)
This was SVN commit r1904.
2005-02-05 07:25:16 +00:00
38b30e5eb4 Corrected ICC errors and some warnings. Removed some unnecessarily verbose logging. Did minor things.
This was SVN commit r1718.
2005-01-13 00:17:31 +00:00
0382cdd9b1 More tooltip updates. Made the main menu buttons and the in-game resource counters use them.
Fixed space/tab inconsistencies in (though not between) GUI XML files.

This was SVN commit r1554.
2004-12-23 13:56:34 +00:00
28c7a682b8 Fixed annoying crash when SpiderMonkey's GC ran.
Minor tooltip updates.

This was SVN commit r1542.
2004-12-21 18:41:58 +00:00
8f4f8e240f Fixed things that use a colour rather than a texture (e.g. the progress bars). Also fixed the completely broken 'caching' system that recalculated everything every single frame. Also made it give linker errors if I ever make that mistake again.
This was SVN commit r1518.
2004-12-17 00:05:37 +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
80b1876b77 Reduced GUI's exception usage (=> shortened debug-mode start time by a couple of seconds)
This was SVN commit r1494.
2004-12-13 12:07:12 +00:00
3136791492 Linux/GCC Compat(tm)
This was SVN commit r1284.
2004-11-07 21:30:47 +00:00
5e42dad394 CStr alterations
This was SVN commit r1282.
2004-10-31 20:29:09 +00:00
MarkT
d33d2e4450 Added some support for user profiles
This was SVN commit r1270.
2004-10-23 14:39:28 +00:00
Gee
f4b410ff82 A bunch of updates:
- Added *unfinished* control input.
- The GUI captures the events now, so that you can't press anything in
the game if the GUI is infront of it. The GUI needs some cleaning up
though.
- Made the type 'empty' unpressable, because all those "0 0 100% 100%"
empties were just like pieces of glass making the user unable to select
anything in the game.
- A bunch of other updates I made like weeks ago and never committed.

This was SVN commit r1234.
2004-10-14 10:09:26 +00:00
Gee
9133042540 GUI: Translates and outputs localised string in Unicode... hooray!
This was SVN commit r1125.
2004-09-06 02:21:21 +00:00
51e20e6ef6 Realised that there's no need to store the JSObject* as a void*
This was SVN commit r1115.
2004-09-04 14:40:06 +00:00
Gee
f2a615f0a3 Updates, mostly about centering text.
This was SVN commit r1099.
2004-09-02 03:02:32 +00:00
Gee
924b0bf1b4 Major fixes and updates. Let me know if I screwed up resolving conflicts.
This was SVN commit r1085.
2004-08-31 02:09:58 +00:00