Skip to content

misc bug fixes #2

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
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions source/funkin/editors/charter/ChartDataScreen.hx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ class ChartDataScreen extends UISubstateWindow {
}

public function saveInfo() {
UIUtil.confirmUISelections(this);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be kept

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should it just crashed the game when i made this pull request (i know it was a really bad solution to the problem)


var oldData:{stage:String, speed:Float} = {stage: PlayState.SONG.stage, speed: PlayState.SONG.scrollSpeed};

PlayState.SONG.stage = stageTextBox.label.text;
Expand All @@ -100,4 +98,4 @@ class ChartDataScreen extends UISubstateWindow {
super.destroy();
FlxG.cameras.remove(strumLineCam);
}
}
}
5 changes: 4 additions & 1 deletion source/funkin/editors/charter/CharterStrumlineScreen.hx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ class CharterStrumlineScreen extends UISubstateWindow {

saveButton = new UIButton(windowSpr.x + windowSpr.bWidth - 20 - 125, windowSpr.y + windowSpr.bHeight - 16 - 32, TU.translate("editor.saveClose"), function() {
saveStrumline();
for (grp in [Charter.instance.leftEventsGroup, Charter.instance.rightEventsGroup]) {
for (e in grp.members) e.refreshEventIcons();
}
close();
}, 125);
add(saveButton);
Expand Down Expand Up @@ -284,4 +287,4 @@ class CharacterButton extends UIButton {

super.update(elapsed);
}
}
}
2 changes: 2 additions & 0 deletions source/funkin/editors/stage/StageEditor.hx
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ class StageEditor extends UIState {
char.extra.set(exID("parentNode"), parent);
char.extra.set(exID("highMemory"), parent.name == "highMemory");
char.extra.set(exID("lowMemory"), parent.name == "lowMemory");
char.scale.x = node.has.scalex ? Std.parseFloat(node.att.scalex) : 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no char.scale.y too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason scale y works fine

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im gonna check later whats causing this


chars.push(char);
stage.applyCharStuff(char, charPos.name, 0);
Expand Down Expand Up @@ -540,6 +541,7 @@ class StageEditor extends UIState {
sprite.extra.set(exID("parentNode"), stage.stageXML.x);
sprite.extra.set(exID("highMemory"), false);
sprite.extra.set(exID("lowMemory"), false);
sprite.antialiasing = true;
xmlMap.set(sprite, node);

var button:StageSpriteButton = new StageSpriteButton(0, 0, sprite, node);
Expand Down
19 changes: 12 additions & 7 deletions source/funkin/editors/ui/UIIconColorPicker.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package funkin.editors.ui;

import openfl.display.BitmapData;
import flixel.util.FlxColor;

import flixel.graphics.frames.FlxAtlasFrames;
using funkin.backend.utils.BitmapUtil;

class UIIconColorPicker extends UISliceSprite {
Expand Down Expand Up @@ -41,12 +41,17 @@ class UIIconColorPicker extends UISliceSprite {
if (iconSprite.animation.exists(icon)) return;
@:privateAccess iconSprite.animation.clearAnimations();

var path:String = Paths.image('icons/$icon');
if (!Assets.exists(path)) path = Paths.image('icons/face');
var path:String = Assets.exists(Paths.image('icons/$icon/icon')) ? Paths.image('icons/$icon/icon') : Paths.image('icons/$icon');
if (!Assets.exists(path)) path = Paths.image('icons/face/icon');

iconSprite.loadGraphic(__path = path, true, 150, 150);
iconSprite.animation.add(icon, [0], 0, false);
iconSprite.animation.play(icon);
if(Assets.exists(Paths.getPath('images/icons/$icon/icon.xml'))) {
iconSprite.frames = FlxAtlasFrames.fromSparrow(__path = path, Paths.getPath('images/icons/$icon/icon.xml'));
iconSprite.animation.add("idle", [0], 24, true, false, false);
iconSprite.animation.play("idle");
} else {
iconSprite.loadGraphic(__path = path, true, 150, 150);
}


iconSprite.scale.set(125/150, 125/150);
iconSprite.updateHitbox();
Expand All @@ -70,4 +75,4 @@ class UIIconColorPicker extends UISliceSprite {
colorWheel.updateWheel();
}
}
}
}