Search the Community
Showing results for tags 'settextbounds'.
-
Hello, I would like better understand pivot and how it's stored, calculated and what it affects. As it causes me troubles when I apply setTextBounds. May be someone can share link to article or tell me something? Thanks in advance
-
Hello. As I mentioned in title, setting text bounds causes game getting crashes. var bar = game.add.graphics(); bar.beginFill(0x000000, 0.2); bar.drawRect(FirstCave.position.x, 100, FirstCave.width, 230); var style = { font: "bold 25px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" }; CaveName = game.add.text(FirstCave.position.x, 100, "Kopalnia Złota", style); //CaveName.setTextBounds(0, 100, 100, 100); Code is from THAT example. Did I made mistake somewhere?
- 3 replies
-
- settextbounds
- setting
-
(and 3 more)
Tagged with:
-
Hi, I think I have found a bug with Text bounds on high res screens. Please see this code pen, it's just a modified example from the Phaser website to include devicePixelRatio resolution. This means that the example will work fine on screens with window.devicePixelRatio == 1, but will incorrectly center and right justify the text on higher pixel densities. http://codepen.io/mattcolman/pen/BKmQMZ/ Please confirm this is a bug and I will add to github issues. Cheers!
- 1 reply
-
- text
- resolution
-
(and 1 more)
Tagged with: