Commit graph

85 commits

Author SHA1 Message Date
Taran van Groenigen
af664dc699
Removed two tabs 2018-10-09 11:32:52 +02:00
Taran van Groenigen
4e2bd36ca5
A string now uses the same default values as an object passed into setFont 2018-10-09 11:28:02 +02:00
Taran van Groenigen
9a2a0ad45f
TextStyle.setStyle & TextStyle.setFont now set fontSize, fontStyle & fontFamily when font is a string
TextStyle.setFont now sets fontFamily, fontSize, and fontStyle when "font" is a string. 
TextStyle.setStyle calls TextStyle.setFont when "font" is overridden.
This fixes an issue where TextStyle.update(true) overrides TextStyle._font
2018-10-09 11:13:23 +02:00
Richard Davey
8b5d0a3af1 Text.setFont, Text.setFontFamily, Text.setFontStyle and Text.setStroke will no longer re-measure the parent Text object if their values have not changed. 2018-09-29 11:21:31 +01:00
Richard Davey
fcaa2bfc4f Completing Game Object jsdocs 2018-09-15 10:31:10 +01:00
Richard Davey
7722207dbd Remove texture deletion. 2018-09-13 13:23:24 +01:00
Richard Davey
f285cf4854 Trim the font style 2018-09-13 13:23:11 +01:00
Richard Davey
0a152949cb Added setLineSpacing method and docs. 2018-09-12 16:29:38 +01:00
Richard Davey
dedc939fdd initPipeline now defaults to the Texture Tint Pipeline if nothing else is specified. 2018-09-05 11:19:02 +01:00
Richard Davey
5b98386677 Calling Text.setStyle would make the Text vanish if you didn't provide a resolution property in the style configuration object. Calling setStyle now only changes the properties given in the object, leaving any previously changed properties as-is. Fix #4011 2018-09-04 22:43:25 +01:00
Richard Davey
27c3cc30ac Previously, changing a Text object by setting its text property directly wouldn't change the text being rendered as using setText was the expected way to change what was being displayed. Internally the text property has been renamed to _text and flagged as private, and a new getter / setter for text has been added, which hands over to the setText method, meaning you can now use both ways of setting the text. Fix #3919 2018-08-20 17:41:05 +01:00
Richard Davey
e91d95e107 Text updated to use proper texture frame and now supports crop 2018-08-03 19:07:12 +01:00
Richard Davey
ca68904953 The Canvas Renderer has a new batchSprite method that consolidates the process of drawing a texture-based Game Object to the canvas. It processes the alpha, blend mode and matrix calculations in a single function and now is used by nearly all Game Object canvas renderers. 2018-08-03 18:53:50 +01:00
Richard Davey
fc0dc13930 Removed use of currentBlendMode and currentAlpha 2018-08-03 01:53:51 +01:00
Richard Davey
9f44896a3f The Blend Mode is now set directly in all Canvas Renderers without comparing it to what's stored in the Canvas Renderer. This fixes problems where the blend mode would be lost between two different Game Objects because they restored the context, but didn't update the renderer flag. Game Objects in Canvas can now mix and match blend modes across the display list. 2018-08-03 01:29:18 +01:00
Richard Davey
106e32a4f5 Removed un-used imports 2018-07-19 13:26:11 +01:00
Richard Davey
ec5bd1912e GameObject.willRender now takes a Camera as its only argument and uses it within the check. This has allowed me to remove 23 duplicate checks spread across the various Game Objects, all of which did the same thing, saving both KB and CPU time as the flags were being checked twice in most cases. 2018-07-19 13:19:02 +01:00
Richard Davey
14ba51d928 Added Text.setResolution methods. 2018-07-18 14:45:10 +01:00
Richard Davey
94540e112e Text supports high dpi resolution for its internal canvas 2018-07-17 22:44:12 +01:00
Richard Davey
c8b058c26a Renamed object to avoid TS defs conflict 2018-07-16 10:28:28 +01:00
Richard Davey
5fdf51ce59 Using direct pipeline calls 2018-07-02 13:32:56 +01:00
Richard Davey
7a23378015 Unified use of roundPixels, antialias and pixelArt modes 2018-06-27 15:15:00 +01:00
Richard Davey
90ba2608fa Added in Camera alpha support to all canvas renderers 2018-06-25 16:24:08 +01:00
Richard Davey
5a0fe89a7e Swap _id to id 2018-06-23 12:26:39 +01:00
Chris Andrew
9f23818c40 Documented various missing descriptions for GameObject classes and functions. 2018-06-20 07:28:02 +01:00
Chris Andrew
47fdf779d3 Switched to example annotations for the setStyle() examples. 2018-06-14 14:49:29 +01:00
Chris Andrew
885b404b98 Fixed the indentation of setStyle() examples. 2018-06-14 14:41:17 +01:00
Chris Andrew
a6b8b8ed31 Documented the Text game object and its TextStyle companion.
Minor update to JSON representation descriptions.
2018-06-14 14:27:58 +01:00
Richard Davey
0893c158d1 Added jsdocs 2018-05-22 15:55:02 +01:00
Richard Davey
0d0846a415 Calling a creator, such as GraphicsCreator, without passing in a config object, would cause an error to be thrown. All Game Object creators now catch against this. 2018-05-16 15:17:08 +01:00
Richard Davey
28251fd0f5 addToScene added to all Game Object Creators 2018-05-02 10:57:26 +01:00
Richard Davey
3323b785b2 space-infix fix 2018-04-30 13:03:44 +01:00
Rex
0a46d64328 Remove extra space in each line end
Add space only when the word index is greater than last one.
2018-04-28 14:54:59 +08:00
Richard Davey
e3c28d3cd9 Removed un-needed arguments 2018-04-23 17:28:37 +01:00
Richard Davey
606ba6d8d7 Added new Mask component and added to all relevant Game Objects 2018-04-20 18:57:49 +01:00
Richard Davey
6299019838 Updated to use typeof DefinePlugin check. 2018-04-20 00:23:24 +01:00
Richard Davey
b0544c73b8 jsdoc fixes 2018-04-18 13:29:22 +01:00
Richard Davey
55965c748f jsdoc fixes 2018-04-18 12:13:49 +01:00
Richard Davey
28e2764723 More jsdoc fixes 2018-04-16 16:02:27 +01:00
Felipe Alfonso
c232642a52 Parent matrix is applied to canvas context on each draw function 2018-04-04 14:05:59 -03:00
Felipe Alfonso
96b8db4685 Added parentMatrix to all canvas rendering functions 2018-04-04 13:14:55 -03:00
Felipe Alfonso
e0f678d1ff Merge branch 'master' into containers 2018-03-28 20:49:00 -03:00
Richard Davey
747f09af86 jsdoc fixes 2018-03-28 15:04:09 +01:00
Felipe Alfonso
d544701495 parentMatrix added to individual game object render function 2018-03-27 14:49:09 -03:00
Richard Davey
db613c793a Merge branch 'master' of https://github.com/photonstorm/phaser 2018-03-21 03:17:00 +00:00
Richard Davey
d329724ae5 Added the ComputedSize component to the Text Game Object, which allows Text.getBounds, and related methods, to work again instead of returning NaN. 2018-03-20 19:00:48 +00:00
orblazer
87633fdfad Fix multiple types on GameObjects 2018-03-20 15:56:31 +01:00
orblazer
4cff464555 Fix nullable types 2018-03-20 15:36:03 +01:00
Richard Davey
3591edcb73
Merge pull request #3417 from rexrainbow/master
Bug fix: font might not sync to context
2018-03-20 00:34:51 +00:00
orblazer
b4a30b8e43 Add callbacks on GameObjects 2018-03-19 22:27:16 +01:00