Commit Graph

768 Commits

Author SHA1 Message Date
c016a74309 Add sliders to the GUI. Use them for the sound/music volume controls.
Patch by vladislavbelov, based on a patch by dpiquet.

Fixes #4039.
Differential Revision: https://code.wildfiregames.com/D325
This was SVN commit r19479.
2017-04-30 16:51:18 +00:00
8f36ca47a1 Replace input.js doubleclick hack and ease doubleclicking on moving units.
Differential Revision: https://code.wildfiregames.com/D326
Patch By: causative
Refs #4414

This was SVN commit r19444.
2017-04-22 01:24:03 +00:00
b856ec5ea4 Update the Minimap texture if the waterheight has changed.
Differential Revision: https://code.wildfiregames.com/D344
Patch By: Sandarac
Reviewed By: Vladislav
Refs https://code.wildfiregames.com/D229

This was SVN commit r19420.
2017-04-16 22:13:32 +00:00
16afbf32c8 Fix CChart scaling edgecases (constant value and infinity)
Reviewed by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D167
This was SVN commit r19408.
2017-04-11 12:27:21 +00:00
dbd56403b9 Allow hiding of list columns via XML or JS.
Differential Revision: https://code.wildfiregames.com/D228
Reviewed By: Vladislav
This was SVN commit r19353.
2017-03-28 00:25:17 +00:00
27f37ccd21 Cleanup the rest of the mess introduced with the NonGaiaEntities functions in 8c7b6dceaa.
Add a test for the GetNonGaiaEntities function of the RangeManager
broken by that commit that was fixed by f3e4e619bc.
Don't call one script function from another, but directly call into the
Selection helper like the others.
Don't make a loop around that RangeManager function for all players but
call the function once for all players.
The pointless virtual keywords were removed by 8827db201a.

Differential Revision: https://code.wildfiregames.com/D166
Reviewed By: leper
This was SVN commit r19344.
2017-03-25 02:42:51 +00:00
208b5b6dd8 Use a minimum height of at least one space character of the current font size when drawing list rows.
Use the maximum height of all cells of the current row.
Lobby games with empty servernames are not rendered weirdly anymore.

Patch By: Vladislav
Fixes #4402

This was SVN commit r19306.
2017-03-17 01:10:49 +00:00
a0a0895a12 Pass some strings and a vector as const refs.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D160
This was SVN commit r19240.
2017-02-24 17:02:10 +00:00
e1e4ef0370 Add UpdateAutoScroll calls to some events where they were missing. For example when deleting, cutting, pasting, autocompleting or doubleclicking text. Patch by Vladislav, fixes #4401.
This was SVN commit r19234.
2017-02-22 15:28:09 +00:00
6ae2db53db Employ some variadic macros to make some of the C++ -> JS function calling code nicer.
Template-ize CallFunctionVoid.
Changes CallFunction parameter order to make template parameter
deduction with
variadic parameters work nicely.

Reviewed By: Itms, wraitii, Yves
Differential Revision: https://code.wildfiregames.com/D77
This was SVN commit r19183.
2017-01-28 23:37:15 +00:00
4f01db4831 Split TurnManager classes into individual files per class. Patch by echotangoecho, fixes #4095.
Remove the "Net" prefix from the non-networked classes.
Use variadic macros and mark the client turnmanager as NONCOPYABLE.

Differential Revision: D16
Reviewed By: leper
This was SVN commit r19165.
2017-01-24 02:04:50 +00:00
2bae30c454 Fix [19027] by using generic code for conversions and fixing a few other issues. Refs #3403. Reviewed by leper.
Also fix some of the warnings that jenkins showed.

Differential Revision: https://code.wildfiregames.com/D24
This was SVN commit r19115.
2017-01-06 11:14:03 +00:00
3c8fc4f263 Return "local" from GetPlayerGUID to avoid duplicate checks and allow AIs to send private messages to the single player. Refs #4431.
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D38
This was SVN commit r19112.
2017-01-05 10:22:39 +00:00
507ecff2ed Scroll to the top when switching between tabs in the credits. Patch by vladislavbelov
This was SVN commit r19036.
2016-12-11 21:15:50 +00:00
78bc56f33e Display the updated batch size immediately when using the batch-train/barter hotkey, instead of waiting for the next turn. Patch by elexis. Fixes #3194
This was SVN commit r19028.
2016-12-07 19:18:57 +00:00
977a5c7ca2 Add C++ GUI code for drawing charts. Patch by vladislavbelov. JS will come later. Refs #3403
This was SVN commit r19027.
2016-12-07 19:03:54 +00:00
fe77783145 Change color of disabled labels and dropdowns, patch by vladislavbelov, fixes #4350
This was SVN commit r19020.
2016-12-05 17:21:51 +00:00
b18f74da44 Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/.
This was SVN commit r18987.
2016-11-23 11:18:37 +00:00
aa7e2fce49 Don't subtract the scrollbar size from GUI dropdowns when there is no scrollbar. Patch by Imarok, reviewed by mimo, refs #3571.
Remove unused button_width.

This was SVN commit r18984.
2016-11-22 13:05:56 +00:00
3f5648767d Scroll to the selected element after the selection changes. Fixes #4254, refs #3742.
This was SVN commit r18935.
2016-11-14 15:28:49 +00:00
34ce0f865d Reset the cursor when opening new GUI pages. Patch by danger89, refs #539.
Remove duplicate cursor image and duplicate hardcoded default paths.

This was SVN commit r18933.
2016-11-14 13:23:07 +00:00
caef42084d Add missing JSAutoRequest calls. (hopefully all of them have been spotted now)
Patch by echotangoecho, refs #4053

This was SVN commit r18730.
2016-09-18 09:34:45 +00:00
c2078bd0c6 Supress an error warning that isn't valid for unsortable ordered lists and hide sorting sprites if sorting is disabled. Based on patch by Imarok, refs #3905.
This was SVN commit r18694.
2016-09-03 22:22:11 +00:00
0cc23c1964 SpiderMonkey 38 upgrade: 33/35
Remove a workaround. Note that this removal is incomplete. Based on
patch by leper.

This was SVN commit r18687.
2016-09-02 16:53:22 +00:00
2aa75a05d4 SpiderMonkey 38 upgrade: 18/35
Renamed JS_Compile{,UC}Function to JS::CompileFunction. Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1089026

This was SVN commit r18672.
2016-09-02 16:34:02 +00:00
8d15411abf SpiderMonkey 38 upgrade: 13/35
Update JS_NewObject to JS_NewPlainObject, with new parameters. Patch by
leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1136906 and
https://bugzilla.mozilla.org/show_bug.cgi?id=1125356

This was SVN commit r18667.
2016-09-02 16:28:17 +00:00
c99ae7ca1c SpiderMonkey 38 upgrade: 12/35
Major update to the JSClass stubs. Based on patch by leper.
https://bugzilla.mozilla.org/show_bug.cgi?id=1103152

This was SVN commit r18666.
2016-09-02 16:26:54 +00:00
b01300c222 SpiderMonkey 38 upgrade: 11/35
Renamed JS_CallHeapFooTracer to JS_CallFooTracer. Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1052388

This was SVN commit r18665.
2016-09-02 16:25:42 +00:00
c7c3ef9f92 SpiderMonkey 38 upgrade: 09/35
Use .toFoo() instead of JSVAL_TO_FOO. Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=952650

This was SVN commit r18663.
2016-09-02 16:23:44 +00:00
8f1b37b216 Major ordered list GUI cleanup. Patch by Imarok, fixes #3905.
Remove m_SelectedDef, m_SelectedColumnOrder and m_HeadingHeight. Use
GetSetting and SetSetting instead. Thus
implement selecting a column / column order sprite from JS correctly.
Since the actual list sorting is done in JS, only the column header
sprites were inaccurate.

Remove "selected_def" since that is redundant with "selected_column".
Merge "selected_column" with "default_column" (and
"selected_column_order" with "default_column_order") since
all properties provided in XML pages are defaults and to remove the
copying on init.

Rename "def" to "column" and "ObjectDef" to "COListColumn".
Replace 30px header height hardcoded in the C++ with an option set by
the style.
Remove the unneeded requirement to specify a "list_name".
Thus rename "list_name" to "list_month" in the replay menu.
Remove unneeded "list_" prefix and substr(5) in column checks.
Use ranged loops.
Fix typo "Avalible".
Add an error message if the GUI style doesn't specify the selected
column order.

This was SVN commit r18652.
2016-08-31 19:29:48 +00:00
4e87fef3da The old debug API has been removed in SpiderMonkey 38, so remove profiler1 script profiling.
Patch by leper, refs #3708

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1069694

This was SVN commit r18580.
2016-08-02 16:58:30 +00:00
72ca6c5f80 Style cleanup by leper, preparing the SpiderMonkey update. Refs #3708
This was SVN commit r18579.
2016-08-02 16:12:11 +00:00
4c0f12bce3 Fix autostart replays following a23884d79a by grabbing g_GameAttributes from the simulation instead of the GUI. Patch by Imarok, refs #3143.
Don't remove attribs from the init attributes as that is still used by
the loading screen to show the mapname.

This was SVN commit r18510.
2016-07-12 01:49:48 +00:00
a23884d79a Cache gameAttributes in the session. Patch by Imarok, refs #3143, #3263.
This was SVN commit r18452.
2016-06-29 01:45:20 +00:00
0f807c643a GUI cleanup.
Point out missing functionality and unused properties in the
implementation of checkboxes.
Don't specify a useless font tag for checkboxes in the templates.

This was SVN commit r18419.
2016-06-21 14:38:06 +00:00
7c21a0cf8e Header cleanup: profile.h is no longer unnecessarily included in scriptinterface.h but rather in the required .cpp files
This was SVN commit r18417.
2016-06-21 10:33:11 +00:00
84d5fb2d34 Tooltip GUI engine cleanup.
Merge some if statements.
Fix whitespace.
Remove unneeded comments and braces.
Remove one duplicated statement out of an if-statement.

This was SVN commit r18381.
2016-06-15 15:40:05 +00:00
a296909f91 GUI engine cleanup.
Merge a check.
Remove unneeded comments and braces.
Some whitespace fixes.

This was SVN commit r18379.
2016-06-14 15:06:39 +00:00
62061557db Host on arbitrary UDP ports. Patch in cooperation with Imarok, fixes #3575.
This was SVN commit r18372.
2016-06-13 16:56:14 +00:00
c94cd66a57 Savegame cleanup.
Remove the player assignments altogether (506350d6fa) as the C++ part
already saves the playerID.
Grab the playerID directly from the game instead of passing it around
needlessly.

This was SVN commit r18357.
2016-06-10 19:04:57 +00:00
70e6be5196 GUI engine cleanup.
Remove unneeded parenthesis and few whitespace changes.

This was SVN commit r18341.
2016-06-07 15:57:33 +00:00
a7b310f3bd GUI engine cleanup.
Fix typos, remove unneeded comments.

This was SVN commit r18339.
2016-06-07 12:02:33 +00:00
248a48d88a Major network cleanup. Patch by Imarok.
Access the server from the client only, not from the GUI (except for
autostarted games).
Thereby lay the foundation for clients to setup the game (refs #3806)
and dedicated hosting (refs #3556).
Doesn't transfer nor remove the SetTurnLength showcase from 0ebe3486b6.

This was SVN commit r18322.
2016-06-04 12:08:30 +00:00
8b30273a50 GUI engine improvement + gamesetup cleanup.
Grab the list of children of a GUI object directly instead of hardcoding
the names.

This was SVN commit r18296.
2016-06-02 22:49:28 +00:00
00ea7763f7 GUIInterface / observermode cleanup as recommended by leper, fixes #3999.
Default to the viewed player in the GUIInterface to avoid passing that
separately in some places, refs #3168.
Thus GetEntityState will be called for the viewed player instead of
observer playerID, therefore
fixes a fog-of-war selection relict when changing the perspective, refs
#3850.
Also remove some unused player arguments.

This was SVN commit r18283.
2016-06-02 00:09:21 +00:00
9cc98aaf47 Take new observermode into account in some missing places, refs #3850, #3168.
This was SVN commit r18223.
2016-05-23 15:26:47 +00:00
ec1696ded3 Send a network message to update the GUI if another player pauses a multiplayer game. Patch by echotangoecho, fixes #1950.
Pause animations then and on disconnect.
Don't unpause unintentionally when closing a message box in
singleplayer.

This was SVN commit r18204.
2016-05-19 22:10:38 +00:00
856dc1c999 Network cleanup.
Send the "client has rejoined" message after the synchronization
finished instead of right after the loading screen.
Patch by echotangoecho, refs #1949, #1950.

This was SVN commit r18203.
2016-05-19 21:03:46 +00:00
6f744aef88 Simulation context cleanup, refs #3991, #3168.
Save the viewed player in the CGame class.
Add the const keyword back to the SimContext to help find mistakes at
compiletime.

This was SVN commit r18201.
2016-05-19 19:42:07 +00:00
9eccf5cd07 Use an actual playername instead of "You" in singleplayer, fixes #3979.
Differentiate between SP and MP name and allow editing it in the
settings.
Defaults to the OS username.
Makes sharing singleplayer replays more effective.
Also fixes a troublesome colorization of "You" in a translated sentence,
refs #3501.

This was SVN commit r18180.
2016-05-15 17:13:35 +00:00