Page 1 of 1
draw error - final score
Posted: 10 May 2013, 13:40
by garcia1968
I'm getting this draw error(no formal red bar error at top,etc) on the final score where it's showing parts of my pieces from somewhere overlaid on the score window.
Ideas on how to fix?

Re: draw error - final score
Posted: 10 May 2013, 14:58
by Een
It looks like some problem with z-indexing.
You should make sure to use only z-indexes < 1000 so as not to have your game elements display above dialog boxes. I think it shoud do the trick.
Re: draw error - final score
Posted: 11 May 2013, 02:36
by garcia1968
I'm familiar with z-indexing, and that could be part of it - I searched my files for 'z-index' but didn't find where it was referenced in the .css file or elsewhere.
Where is the client code to post the final score box?
Re: draw error - final score
Posted: 11 May 2013, 05:17
by garcia1968
Also I was noticing that if ending the game with a tie score, this final window declares one of the players a winner anyway instead of a tie - so not sure how to influence/correct this window after issuing an 'endGame' state for either the 'draw error' or 'tie displayed as win' error.
Thanks
Re: draw error - final score
Posted: 11 May 2013, 13:18
by Een
Yes, it doesn't look like you use z-index. Strange
The code for the popup is in the compressed javascript of the framework.
It looks like this:
Code: Select all
var scoreDlg = new dijit.Dialog({
title: dojo.string.substitute( __('lang_mainsite', 'End of game, ${winner} wins'), { winner: scores[0].name } )
});
var html = [...]
scoreDlg.attr("content", html );
scoreDlg.show();
Another possibility would be that you reused in your game some generic css class. I suggest that you look at the structure of the html inside the box with the inspection features of firebug or chrome dev tools, then check if there is some css overlap in your code.
As for the 'tie' message, it has been fixed on the main site, but the studio has not yet been upgraded: you don't need to do anything about it, this is a feature of the framework.
Re: draw error - final score
Posted: 11 May 2013, 21:42
by garcia1968
>Another possibility would be that you reused in your game some generic css class.
That was it! Thanks for the hint. I used 'score' to represent my score marker in the css and renamed it 'scoreMarker' to avoid the conflict.