Page MenuHomeWildfire Games

Fix sounds for options tabs
ClosedPublic

Authored by bb on Oct 6 2017, 8:28 PM.

Details

Summary

rP20101 created option tabs, however these tab button had a sprite tag that was unused and wrong since it was referring to a style. The sprite this was removed in rP20176.
But this is still wrong: when clicking a tab in the credits page, you can hear a sound, when performing the same action in the option page we don't hear a sound. This is fixed by adding the style in the xml

Do notice that this style will be overwritten on a selection for the tab.

Test Plan

set OS sound volume to something hearable
set 0ad sound volume to something hearable,
set gui sounds volume to something hearable
click an option tab and listen

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bb created this revision.Oct 6 2017, 8:28 PM
Owners added a subscriber: Restricted Owners Package.Oct 6 2017, 8:28 PM
Vulcan added a subscriber: Vulcan.Oct 6 2017, 9:09 PM

Build is green

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (307 tests)...................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (307 tests)...................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jenkins-master:8080/job/phabricator/2103/ for more details.

Vulcan added a comment.Oct 6 2017, 9:10 PM
Executing section Default...
Executing section Source...
Executing section JS...
Executing section XML GUI...
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/options/options.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/options/options.xml
|   1|   1| <?xml version="1.0" encoding="utf-8"?>
|   2|    |-
|   3|   2| <objects>
|   4|   3| 
|   5|   4| 	<script file="gui/common/functions_global_object.js"/>

http://jenkins-master:8080/job/phabricator_lint/576/ for more details.

elexis accepted this revision.Oct 6 2017, 10:40 PM
elexis added a subscriber: elexis.

Ah. With your patch applied, the XML and JS is consistent in credits and options.

So that's what we get again from duplicating logic in two JS/XML pages (and for example not implementing some underlying tab mechanism in source/gui/ which would cost much more code than the duplication that is removed though).

Thanks for the fix!

This revision is now accepted and ready to land.Oct 6 2017, 10:40 PM
This revision was automatically updated to reflect the committed changes.