Wrong arguments passed for blackbox prefab based on NinePatch
See original GitHub issue- Phaser Editor 2D Version: 3.30
- Operating System: Mac
Description
When creating a black box prefab based on a NinePatch object in order to add custom fields to the prefab, it seems the arguments passed to the prefab constructor are incorrect.
Here is what the init looks like for a black box prefab that has a type in the prefab scene file of NinePatch.
// scaledTextBox
const scaledTextBox = new ScaledTextBox(this, 123, 124, 123, 124, undefined, undefined, "button0004");
this.add.existing(scaledTextBox);
Here is a NinePatch created as just a NinePatch (no prefab involved).
// ninepatch
const ninepatch = this.add.ninePatch(674, 478, 373, 216, "button0004");
ninepatch.setOrigin(0, 0);
In the case of the prefab the x,y coordinates are repeated twice and there are two unknown undefined parameters and then the texture key. The width and height are not passed in.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
sitemap-questions-285.xml - Stack Overflow
... -another-file-from-awk-based-on-current-files-contents-is-it 2016-03-04 ... https://stackoverflow.com/questions/148024/why-is-my-parameter-passed-by- ...
Read more >https://huggingface.co/jeniya/BERTOverflow/commit/...
... +mult +Al +Java +char +However +variable +param +open +did +write +simple ... +draw +##ources +base +##igger +github +Since +color +effect +##ined +Vis ......
Read more >Simple index - piwheels
... beniamin-project bad-otzyvy-net flask-webcache dabbiew enjoyn odoo-addon-pos-sale-pos-event-sale line-pay niteoweb-click2sell pydrobert-param moveit ...
Read more >Simple Index
conceptnet-a-practical-commonsense-reasoning-toolkit · conceptpower-api ... cudaminer-param-checker ... django-debug-error-logging · django-debug-html-store
Read more >Untitled
Green striped shirt outfit, Estudiantes de la plata results, Small prefab homes ... Passing hidden parameters in php, Trenes pompeya roma, Lee-davis, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Perfect! Will check it out as soon as I am done with my current set of changes.
Good. Yes, I should do something similar to the
dirtyflag in the editor implementation of the ninepatch object. In the ninepatch class provided to the user, maybe it is a strategy the user can implement himself. I think the code is pretty straight forward and you can change the internals. Only the public interface should remain the same.