question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 2 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jrabekcommented, Oct 21, 2021

Perfect! Will check it out as soon as I am done with my current set of changes.

1reaction
PhaserEditor2Dcommented, Oct 20, 2021

Good. Yes, I should do something similar to the dirty flag 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found