PhaserEditor2D / PhaserEditor

A friendly IDE to develop HTML5 games based on the Phaser framework.
https://phasereditor2d.com
Eclipse Public License 1.0
327 stars 45 forks source link

Renaming a scene doesn't copy user code #157

Closed DeanoC closed 2 years ago

DeanoC commented 3 years ago

Version

Description

When you rename a scene (I use F2 but I presume same from a menu) it creates a new scene with the new name and the widgets but doesn't copy the any user code.

In my case, the means no custom imports at the top of the file and any custom functions assigned in the scene class.

I'm using Typescript if that relevant.

Possible solution

For now I just manually cut and paste them from the non-renamed .ts file thats still in the folder after the rename.

PhaserEditor2D commented 3 years ago

Hi @DeanoC!

When you rename a .scene file you also has to rename the .ts file. Maybe the IDE can perform certain refactoring and rename the .ts file for you, but yet I'm not to convinced to start implementing refactoring tools.