Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allows you to change the character in the Stage Editor. #909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
g3n-zu wants to merge 1 commit into CodenameCrew:main
base: main
Choose a base branch
Loading
from g3n-zu:patch-1
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion assets/data/editors/layouts/stage/characterEditScreen.xml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@
<exec>
self.windowSpr.bHeight -= 170;
</exec>

</section>

<section>
<label name="curCharLabel" text="Character (XML)" x="col(2)" y="curY - 52" size="15" />
<exec>
import funkin.editors.ui.UIAutoCompleteTextBox;
import funkin.game.Character;

var curCharBox = new UIAutoCompleteTextBox(col(2), curY - 52, char.curCharacter, 148, 32);
curCharBox.suggestItems = Character.getList(false);
self.add(curCharBox);
</exec>
</section>

<exec>
Expand Down Expand Up @@ -121,6 +134,20 @@
}
char.zoomFactor = zoomFactorStepper.value;
char.angle = angleStepper.value;

var newCharName = curCharBox.label.text;
if (newCharName != char.curCharacter) {
char.curCharacter = newCharName;
char.xml = Character.getXMLFromCharName(newCharName);
char.applyXML(char.xml);

var anim = char.getAnimOrder()[0];
char.playAnim(anim, true);
var lastIndx = char.animation.curAnim.numFrames - 1;
char.playAnim(anim, true, null, false, lastIndx);
char.stopAnimation();
}

}
</exec>
</window>
</window>

AltStyle によって変換されたページ (->オリジナル) /