Merge remote-tracking branch 'upstream/main' into new-editors-main
# Conflicts: # commandline/commands/Compiler.hx # source/funkin/backend/FunkinSprite.hx # source/funkin/backend/MusicBeatState.hx # source/funkin/backend/MusicBeatSubstate.hx # source/funkin/backend/chart/Chart.hx # source/funkin/backend/chart/EventsData.hx # source/funkin/backend/scripting/GlobalScript.hx # source/funkin/backend/system/Controls.hx # source/funkin/backend/system/MainState.hx # source/funkin/backend/utils/AudioAnalyzer.hx # source/funkin/backend/utils/CoolUtil.hx # source/funkin/editors/character/CharacterInfoScreen.hx # source/funkin/editors/charter/Charter.hx # source/funkin/editors/charter/CharterSelection.hx # source/funkin/editors/charter/CharterStrumline.hx # source/funkin/editors/charter/CharterStrumlineButton.hx # source/funkin/editors/charter/SongCreationScreen.hx # source/funkin/editors/ui/UIDropDown.hx # source/funkin/editors/ui/UIFileExplorer.hx # source/funkin/game/Note.hx # source/funkin/game/PlayState.hx # source/funkin/game/SplashGroup.hx # source/funkin/game/Stage.hx # source/funkin/game/Strum.hx # source/funkin/menus/FreeplayState.hx # source/funkin/options/Options.hx # source/funkin/options/keybinds/KeybindsOptions.hx
This commit is contained in:
@@ -54,6 +54,7 @@ class UIAudioPlayer extends UIButton {
|
||||
timeBarPlayer = new FlxSprite(timeBar.x, timeBar.y).loadGraphic(Paths.image('editors/ui/audio-time-empty'));
|
||||
timeBarPlayer.colorTransform.color = 0x440364;
|
||||
timeBarPlayer.scale.y = (timeBarPlayer.frameHeight + 2) / timeBarPlayer.frameHeight;
|
||||
timeBarPlayer.pixelPerfectRender = true;
|
||||
members.push(timeBarPlayer);
|
||||
|
||||
timeBarSpr = cast new UISprite(timeBar.x, timeBar.y).makeSolid(timeBar.barWidth, timeBar.barHeight, 0x00FFFFFF);
|
||||
@@ -87,13 +88,13 @@ class UIAudioPlayer extends UIButton {
|
||||
playingSprite.animation.play(sound.playing ? "playing" : "paused");
|
||||
timeText.text = '${FlxStringUtil.formatTime(sound.time/1000, true)} / ${FlxStringUtil.formatTime(sound.length/1000)}';
|
||||
|
||||
if(timeBarPlayer.clipRect == null)
|
||||
timeBarPlayer.clipRect = new FlxRect(0, 0, timeBarPlayer.frameWidth, timeBarPlayer.frameHeight);
|
||||
if(timeBarPlayer.rawClipRect == null)
|
||||
timeBarPlayer.rawClipRect = new FlxRect(0, 0, timeBarPlayer.frameWidth, timeBarPlayer.frameHeight);
|
||||
|
||||
timeBarPlayer.clipRect.x = timeBarPlayer.frameWidth * (sound.time/sound.length);
|
||||
timeBarPlayer.clipRect.width = 2;
|
||||
timeBarPlayer.rawClipRect.x = timeBarPlayer.frameWidth * (sound.time/sound.length);
|
||||
timeBarPlayer.rawClipRect.width = 2;
|
||||
|
||||
timeBarPlayer.clipRect = timeBarPlayer.clipRect;
|
||||
timeBarPlayer.rawClipRect = timeBarPlayer.rawClipRect;
|
||||
|
||||
nextPlayerColor = sound.playing ? 0x732D95 : 0x440364;
|
||||
timeBarPlayer.colorTransform.color = FlxColor.interpolate(timeBarPlayer.colorTransform.color, nextPlayerColor, 1/14);
|
||||
|
||||
@@ -15,16 +15,19 @@ class UIFileExplorer extends UISliceSprite {
|
||||
public var onFile:(String, Bytes)->Void;
|
||||
|
||||
public var uiElement:FlxSprite;
|
||||
|
||||
public var fileType:String = "txt";
|
||||
|
||||
public function new(x:Float, y:Float, ?w:Int, ?h:Int, fileType:String = "txt", ?onFile:(String, Bytes)->Void) {
|
||||
super(x, y, (w != null ? w : 320), (h != null ? h : 58), 'editors/ui/inputbox');
|
||||
this.fileType = fileType;
|
||||
|
||||
if (onFile != null) this.onFile = onFile;
|
||||
|
||||
uploadButton = new UIButton(x + 8, y+ 8, null, function () {
|
||||
var fileDialog = new FileDialog();
|
||||
fileDialog.onSelect.add(loadFile);
|
||||
fileDialog.browse(OPEN, fileType);
|
||||
fileDialog.browse(OPEN, this.fileType);
|
||||
}, bWidth - 16, bHeight - 16);
|
||||
members.push(uploadButton);
|
||||
|
||||
@@ -66,6 +69,7 @@ class UIFileExplorer extends UISliceSprite {
|
||||
}
|
||||
|
||||
public function removeFile() {
|
||||
if (!selectable) return;
|
||||
if (uiElement != null) {
|
||||
members.remove(uiElement);
|
||||
uiElement.destroy();
|
||||
|
||||
Reference in New Issue
Block a user