I added a game preference for color blindness to my game, in gameoptions.inc.php like this:
According to the documentation https://boardgamearena.com/doc/Game_opt ... ns.inc.php, it is supposed to add the "colorblind" class to the <html> element. I use this in CSS to adjust the color scheme to be easier to see for colorblind people.
This works perfectly during game play, but the option is completely ignored during replay (if a user tries to set this option, the page reloads, but the option goes back to "Standard" and the colorblind class is not added to <html>.
I believe this is a bug. The remaining options in the Preferences ("display game logs below player panels" and "display tool tips") work both during game play and during replay. Since these are display options, they should work during replay. The bug is present both on Studio and on the production site.
Are game preferences supposed to be ignored during replay? If not, how can I fix this? Thanks.
Code: Select all
$game_preferences = array(
100 => array(
'name' => totranslate('Game display'),
'needReload' => true,
'values' => array(
1 => array(
'name' => totranslate('Standard')
),
2 => array(
'name' => totranslate('Color blindness'),
'cssPref' => 'colorblind'
)
),
'default' => 1
)
);This works perfectly during game play, but the option is completely ignored during replay (if a user tries to set this option, the page reloads, but the option goes back to "Standard" and the colorblind class is not added to <html>.
I believe this is a bug. The remaining options in the Preferences ("display game logs below player panels" and "display tool tips") work both during game play and during replay. Since these are display options, they should work during replay. The bug is present both on Studio and on the production site.
Are game preferences supposed to be ignored during replay? If not, how can I fix this? Thanks.