Text Z Order problem [Chrome] Forum Home > Construct 2 Development > Bugs > Closed bugs |
Post Reply
|
| Author | ||
Post Options
Quote Reply
Topic: Text Z Order problem [Chrome]Posted: 01 Apr 2012 at 8:48pm |
||
|
Hey
I made a text object at layer 0, layer 1 have some sprites. when the sprites move to the text, the text object is above then, should be below. In Internet Explorer 9 it's showing correctly it's Z order position. Also the Text object at the same layer as the sprite object, if I put it behind the sprite and run the preview it appear above the sprite too. Tested only in IE9 and Chrome (latest version) Using C2 R84 64bit. EDIT: WebGL disabled with Chrome the problem doesn't appear, the text Z order is correct. Maybe something related to my video card? Can some1 try that with Chrome and webgl enabled with a dedicated video card and see if this problem persist? Edited by Guif0DA - 01 Apr 2012 at 8:51pm |
||
![]() |
||
Post Options
Quote Reply
Posted: 01 Apr 2012 at 10:44pm |
||
|
I also have this problem with text not going anywhere but top of everything. It's also Firefox too that does it also.
|
||
![]() |
||
Post Options
Quote Reply
Posted: 01 Apr 2012 at 11:04pm |
||
|
This is not a bug, it's by design. See the manual entry for Text:
IE9 does not support WebGL, which is why it Z orders as you expect. |
||
![]() |
||
Post Options
Quote Reply
Posted: 02 Apr 2012 at 12:07am |
||
but how could this be a design choice? I turn on webGL because it make the game faster but then I can't make the game like I want because there will be texts everywhere above things I don't want to be.. This technical limitation if from the browsers or C2 itself? |
||
![]() |
||
Post Options
Quote Reply
Posted: 02 Apr 2012 at 2:16pm |
||
|
WebGL does not render text, so to have text, Ashley is forced to display them in an other DOM element on top of the canvas.
|
||
![]() |
||
Post Options
Quote Reply
Posted: 02 Apr 2012 at 2:49pm |
||
|
@Kyatric is right, WebGL does not actually have the ability to draw text. So we work around this by having text layered on top of the WebGL canvas.
You can work around it if you put your text in Sprites or use the Sprite Font plugin - any way you can make your text appear without using the Text object should work. |
||
![]() |
||
Post Options
Quote Reply
Posted: 03 Apr 2012 at 12:12am |
||
Thanks by the way ;) |
||
![]() |
||
Post Options
Quote Reply
Posted: 17 Apr 2012 at 3:36am |
||
|
This can actually be achieved with R0J0hound's Canvas plugin, by pasting a Text object onto a Canvas, at which point you can then utilize other effects, opacities, etc.
If needed, you can also clear the canvas and rewrite text object, should any texts need changing. Here's a quick demonstration: DEMO Here's the capx:logo-fade-swipe.capx |
||
|
Check out Nibble in the HBGames Build and Win Construct 2 Contest!
|
||
![]() |
||
Post Options
Quote Reply
Posted: 17 Apr 2012 at 4:48am |
||
|
||
![]() |
||
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |