mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-09-07 14:38:06 +00:00
Compare commits
6 commits
877985eaca
...
abd9af89fc
Author | SHA1 | Date | |
---|---|---|---|
|
abd9af89fc | ||
|
54ad34e5d0 | ||
|
f6fb11de4c | ||
|
83aa45a318 | ||
|
65186a336d | ||
|
a3dbe990a8 |
|
@ -9,6 +9,18 @@
|
||||||
"asset": "asset/shared/images/resultScreen/results-pico/resultsPERFECT/spritemap1.png",
|
"asset": "asset/shared/images/resultScreen/results-pico/resultsPERFECT/spritemap1.png",
|
||||||
"blocksize": "4x4"
|
"blocksize": "4x4"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"asset": "asset/shared/images/resultScreen/results-pico/resultsGREAT/spritemap1.png",
|
||||||
|
"blocksize": "4x4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"asset": "asset/shared/images/resultScreen/results-pico/resultsGOOD/spritemap1.png",
|
||||||
|
"blocksize": "4x4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"asset": "asset/shared/images/resultScreen/results-pico/resultsSHIT/spritemap1.png",
|
||||||
|
"blocksize": "4x4"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"asset": "assets/preload/images/NOTE_assets.png",
|
"asset": "assets/preload/images/NOTE_assets.png",
|
||||||
"blocksize": "4x4"
|
"blocksize": "4x4"
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Project extends HXProject
|
||||||
* The build's number and version code.
|
* The build's number and version code.
|
||||||
* Used when publishing the game to mobile app stores. Should increment with each patch.
|
* Used when publishing the game to mobile app stores. Should increment with each patch.
|
||||||
*/
|
*/
|
||||||
static final BUILD_NUMBER:Int = 2;
|
static final BUILD_NUMBER:Int = 51;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The game's name. Used as the default window title.
|
* The game's name. Used as the default window title.
|
||||||
|
@ -489,7 +489,11 @@ class Project extends HXProject
|
||||||
configureHaxelibs();
|
configureHaxelibs();
|
||||||
configureASTCTextures();
|
configureASTCTextures();
|
||||||
configureAssets();
|
configureAssets();
|
||||||
configureIcons();
|
|
||||||
|
if (!isLinux())
|
||||||
|
{
|
||||||
|
configureIcons();
|
||||||
|
}
|
||||||
|
|
||||||
if (FEATURE_MOBILE_ADVERTISEMENTS.isEnabled(this))
|
if (FEATURE_MOBILE_ADVERTISEMENTS.isEnabled(this))
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,6 +62,7 @@ class Controls extends FlxActionSet
|
||||||
var _freeplay_char_select = new FunkinAction(Action.FREEPLAY_CHAR_SELECT);
|
var _freeplay_char_select = new FunkinAction(Action.FREEPLAY_CHAR_SELECT);
|
||||||
var _freeplay_jump_to_top = new FunkinAction(Action.FREEPLAY_JUMP_TO_TOP);
|
var _freeplay_jump_to_top = new FunkinAction(Action.FREEPLAY_JUMP_TO_TOP);
|
||||||
var _freeplay_jump_to_bottom = new FunkinAction(Action.FREEPLAY_JUMP_TO_BOTTOM);
|
var _freeplay_jump_to_bottom = new FunkinAction(Action.FREEPLAY_JUMP_TO_BOTTOM);
|
||||||
|
var _freeplay_results_screen = new FunkinAction(Action.FREEPLAY_RESULTS_SCREEN);
|
||||||
var _cutscene_advance = new FunkinAction(Action.CUTSCENE_ADVANCE);
|
var _cutscene_advance = new FunkinAction(Action.CUTSCENE_ADVANCE);
|
||||||
#if FEATURE_DEBUG_MENU
|
#if FEATURE_DEBUG_MENU
|
||||||
var _debug_menu = new FunkinAction(Action.DEBUG_MENU);
|
var _debug_menu = new FunkinAction(Action.DEBUG_MENU);
|
||||||
|
@ -283,6 +284,11 @@ class Controls extends FlxActionSet
|
||||||
inline function get_FREEPLAY_JUMP_TO_BOTTOM()
|
inline function get_FREEPLAY_JUMP_TO_BOTTOM()
|
||||||
return _freeplay_jump_to_bottom.check();
|
return _freeplay_jump_to_bottom.check();
|
||||||
|
|
||||||
|
public var FREEPLAY_RESULTS_SCREEN(get, never):Bool;
|
||||||
|
|
||||||
|
inline function get_FREEPLAY_RESULTS_SCREEN()
|
||||||
|
return _freeplay_results_screen.check();
|
||||||
|
|
||||||
public var CUTSCENE_ADVANCE(get, never):Bool;
|
public var CUTSCENE_ADVANCE(get, never):Bool;
|
||||||
|
|
||||||
inline function get_CUTSCENE_ADVANCE()
|
inline function get_CUTSCENE_ADVANCE()
|
||||||
|
@ -348,6 +354,7 @@ class Controls extends FlxActionSet
|
||||||
add(_freeplay_char_select);
|
add(_freeplay_char_select);
|
||||||
add(_freeplay_jump_to_top);
|
add(_freeplay_jump_to_top);
|
||||||
add(_freeplay_jump_to_bottom);
|
add(_freeplay_jump_to_bottom);
|
||||||
|
add(_freeplay_results_screen);
|
||||||
add(_cutscene_advance);
|
add(_cutscene_advance);
|
||||||
#if FEATURE_DEBUG_MENU add(_debug_menu); #end
|
#if FEATURE_DEBUG_MENU add(_debug_menu); #end
|
||||||
#if FEATURE_CHART_EDITOR add(_debug_chart); #end
|
#if FEATURE_CHART_EDITOR add(_debug_chart); #end
|
||||||
|
@ -476,6 +483,7 @@ class Controls extends FlxActionSet
|
||||||
case FREEPLAY_CHAR_SELECT: _freeplay_char_select;
|
case FREEPLAY_CHAR_SELECT: _freeplay_char_select;
|
||||||
case FREEPLAY_JUMP_TO_TOP: _freeplay_jump_to_top;
|
case FREEPLAY_JUMP_TO_TOP: _freeplay_jump_to_top;
|
||||||
case FREEPLAY_JUMP_TO_BOTTOM: _freeplay_jump_to_bottom;
|
case FREEPLAY_JUMP_TO_BOTTOM: _freeplay_jump_to_bottom;
|
||||||
|
case FREEPLAY_RESULTS_SCREEN: _freeplay_results_screen;
|
||||||
case CUTSCENE_ADVANCE: _cutscene_advance;
|
case CUTSCENE_ADVANCE: _cutscene_advance;
|
||||||
#if FEATURE_DEBUG_MENU case DEBUG_MENU: _debug_menu; #end
|
#if FEATURE_DEBUG_MENU case DEBUG_MENU: _debug_menu; #end
|
||||||
#if FEATURE_CHART_EDITOR case DEBUG_CHART: _debug_chart; #end
|
#if FEATURE_CHART_EDITOR case DEBUG_CHART: _debug_chart; #end
|
||||||
|
@ -559,6 +567,8 @@ class Controls extends FlxActionSet
|
||||||
func(_freeplay_jump_to_top, JUST_PRESSED);
|
func(_freeplay_jump_to_top, JUST_PRESSED);
|
||||||
case FREEPLAY_JUMP_TO_BOTTOM:
|
case FREEPLAY_JUMP_TO_BOTTOM:
|
||||||
func(_freeplay_jump_to_bottom, JUST_PRESSED);
|
func(_freeplay_jump_to_bottom, JUST_PRESSED);
|
||||||
|
case FREEPLAY_RESULTS_SCREEN:
|
||||||
|
func(_freeplay_results_screen, JUST_PRESSED);
|
||||||
case CUTSCENE_ADVANCE:
|
case CUTSCENE_ADVANCE:
|
||||||
func(_cutscene_advance, JUST_PRESSED);
|
func(_cutscene_advance, JUST_PRESSED);
|
||||||
#if FEATURE_DEBUG_MENU
|
#if FEATURE_DEBUG_MENU
|
||||||
|
@ -786,6 +796,7 @@ class Controls extends FlxActionSet
|
||||||
bindKeys(Control.FREEPLAY_CHAR_SELECT, getDefaultKeybinds(scheme, Control.FREEPLAY_CHAR_SELECT));
|
bindKeys(Control.FREEPLAY_CHAR_SELECT, getDefaultKeybinds(scheme, Control.FREEPLAY_CHAR_SELECT));
|
||||||
bindKeys(Control.FREEPLAY_JUMP_TO_TOP, getDefaultKeybinds(scheme, Control.FREEPLAY_JUMP_TO_TOP));
|
bindKeys(Control.FREEPLAY_JUMP_TO_TOP, getDefaultKeybinds(scheme, Control.FREEPLAY_JUMP_TO_TOP));
|
||||||
bindKeys(Control.FREEPLAY_JUMP_TO_BOTTOM, getDefaultKeybinds(scheme, Control.FREEPLAY_JUMP_TO_BOTTOM));
|
bindKeys(Control.FREEPLAY_JUMP_TO_BOTTOM, getDefaultKeybinds(scheme, Control.FREEPLAY_JUMP_TO_BOTTOM));
|
||||||
|
bindKeys(Control.FREEPLAY_RESULTS_SCREEN, getDefaultKeybinds(scheme, Control.FREEPLAY_RESULTS_SCREEN));
|
||||||
bindKeys(Control.CUTSCENE_ADVANCE, getDefaultKeybinds(scheme, Control.CUTSCENE_ADVANCE));
|
bindKeys(Control.CUTSCENE_ADVANCE, getDefaultKeybinds(scheme, Control.CUTSCENE_ADVANCE));
|
||||||
#if FEATURE_DEBUG_MENU
|
#if FEATURE_DEBUG_MENU
|
||||||
bindKeys(Control.DEBUG_MENU, getDefaultKeybinds(scheme, Control.DEBUG_MENU));
|
bindKeys(Control.DEBUG_MENU, getDefaultKeybinds(scheme, Control.DEBUG_MENU));
|
||||||
|
@ -828,6 +839,7 @@ class Controls extends FlxActionSet
|
||||||
case Control.FREEPLAY_CHAR_SELECT: return [TAB];
|
case Control.FREEPLAY_CHAR_SELECT: return [TAB];
|
||||||
case Control.FREEPLAY_JUMP_TO_TOP: return [HOME];
|
case Control.FREEPLAY_JUMP_TO_TOP: return [HOME];
|
||||||
case Control.FREEPLAY_JUMP_TO_BOTTOM: return [END];
|
case Control.FREEPLAY_JUMP_TO_BOTTOM: return [END];
|
||||||
|
case Control.FREEPLAY_RESULTS_SCREEN: return [R];
|
||||||
case Control.CUTSCENE_ADVANCE: return [Z, ENTER];
|
case Control.CUTSCENE_ADVANCE: return [Z, ENTER];
|
||||||
#if FEATURE_DEBUG_MENU case Control.DEBUG_MENU: return [GRAVEACCENT]; #end
|
#if FEATURE_DEBUG_MENU case Control.DEBUG_MENU: return [GRAVEACCENT]; #end
|
||||||
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
|
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
|
||||||
|
@ -859,6 +871,7 @@ class Controls extends FlxActionSet
|
||||||
case Control.FREEPLAY_CHAR_SELECT: return [TAB];
|
case Control.FREEPLAY_CHAR_SELECT: return [TAB];
|
||||||
case Control.FREEPLAY_JUMP_TO_TOP: return [HOME];
|
case Control.FREEPLAY_JUMP_TO_TOP: return [HOME];
|
||||||
case Control.FREEPLAY_JUMP_TO_BOTTOM: return [END];
|
case Control.FREEPLAY_JUMP_TO_BOTTOM: return [END];
|
||||||
|
case Control.FREEPLAY_RESULTS_SCREEN: return [R];
|
||||||
case Control.CUTSCENE_ADVANCE: return [G, Z];
|
case Control.CUTSCENE_ADVANCE: return [G, Z];
|
||||||
#if FEATURE_DEBUG_MENU case Control.DEBUG_MENU: return [GRAVEACCENT]; #end
|
#if FEATURE_DEBUG_MENU case Control.DEBUG_MENU: return [GRAVEACCENT]; #end
|
||||||
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
|
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
|
||||||
|
@ -890,6 +903,7 @@ class Controls extends FlxActionSet
|
||||||
case Control.FREEPLAY_CHAR_SELECT: return [];
|
case Control.FREEPLAY_CHAR_SELECT: return [];
|
||||||
case Control.FREEPLAY_JUMP_TO_TOP: return [];
|
case Control.FREEPLAY_JUMP_TO_TOP: return [];
|
||||||
case Control.FREEPLAY_JUMP_TO_BOTTOM: return [];
|
case Control.FREEPLAY_JUMP_TO_BOTTOM: return [];
|
||||||
|
case Control.FREEPLAY_RESULTS_SCREEN: return [];
|
||||||
case Control.CUTSCENE_ADVANCE: return [ENTER];
|
case Control.CUTSCENE_ADVANCE: return [ENTER];
|
||||||
#if FEATURE_DEBUG_MENU case Control.DEBUG_MENU: return []; #end
|
#if FEATURE_DEBUG_MENU case Control.DEBUG_MENU: return []; #end
|
||||||
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
|
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
|
||||||
|
@ -984,6 +998,7 @@ class Controls extends FlxActionSet
|
||||||
Control.FREEPLAY_CHAR_SELECT => getDefaultGamepadBinds(Control.FREEPLAY_CHAR_SELECT),
|
Control.FREEPLAY_CHAR_SELECT => getDefaultGamepadBinds(Control.FREEPLAY_CHAR_SELECT),
|
||||||
Control.FREEPLAY_JUMP_TO_TOP => getDefaultGamepadBinds(Control.FREEPLAY_JUMP_TO_TOP),
|
Control.FREEPLAY_JUMP_TO_TOP => getDefaultGamepadBinds(Control.FREEPLAY_JUMP_TO_TOP),
|
||||||
Control.FREEPLAY_JUMP_TO_BOTTOM => getDefaultGamepadBinds(Control.FREEPLAY_JUMP_TO_BOTTOM),
|
Control.FREEPLAY_JUMP_TO_BOTTOM => getDefaultGamepadBinds(Control.FREEPLAY_JUMP_TO_BOTTOM),
|
||||||
|
Control.FREEPLAY_RESULTS_SCREEN => getDefaultGamepadBinds(Control.FREEPLAY_RESULTS_SCREEN),
|
||||||
Control.VOLUME_UP => getDefaultGamepadBinds(Control.VOLUME_UP),
|
Control.VOLUME_UP => getDefaultGamepadBinds(Control.VOLUME_UP),
|
||||||
Control.VOLUME_DOWN => getDefaultGamepadBinds(Control.VOLUME_DOWN),
|
Control.VOLUME_DOWN => getDefaultGamepadBinds(Control.VOLUME_DOWN),
|
||||||
Control.VOLUME_MUTE => getDefaultGamepadBinds(Control.VOLUME_MUTE),
|
Control.VOLUME_MUTE => getDefaultGamepadBinds(Control.VOLUME_MUTE),
|
||||||
|
@ -1047,6 +1062,8 @@ class Controls extends FlxActionSet
|
||||||
return [RIGHT_STICK_DIGITAL_UP];
|
return [RIGHT_STICK_DIGITAL_UP];
|
||||||
case Control.FREEPLAY_JUMP_TO_BOTTOM:
|
case Control.FREEPLAY_JUMP_TO_BOTTOM:
|
||||||
return [RIGHT_STICK_DIGITAL_DOWN];
|
return [RIGHT_STICK_DIGITAL_DOWN];
|
||||||
|
case Control.FREEPLAY_RESULTS_SCREEN:
|
||||||
|
return [];
|
||||||
case Control.VOLUME_UP:
|
case Control.VOLUME_UP:
|
||||||
[];
|
[];
|
||||||
case Control.VOLUME_DOWN:
|
case Control.VOLUME_DOWN:
|
||||||
|
@ -1471,6 +1488,7 @@ enum Control
|
||||||
FREEPLAY_CHAR_SELECT;
|
FREEPLAY_CHAR_SELECT;
|
||||||
FREEPLAY_JUMP_TO_TOP;
|
FREEPLAY_JUMP_TO_TOP;
|
||||||
FREEPLAY_JUMP_TO_BOTTOM;
|
FREEPLAY_JUMP_TO_BOTTOM;
|
||||||
|
FREEPLAY_RESULTS_SCREEN;
|
||||||
// WINDOW
|
// WINDOW
|
||||||
#if FEATURE_SCREENSHOTS WINDOW_SCREENSHOT; #end
|
#if FEATURE_SCREENSHOTS WINDOW_SCREENSHOT; #end
|
||||||
WINDOW_FULLSCREEN;
|
WINDOW_FULLSCREEN;
|
||||||
|
@ -1530,6 +1548,7 @@ enum abstract Action(String) to String from String
|
||||||
var FREEPLAY_CHAR_SELECT = "freeplay_char_select";
|
var FREEPLAY_CHAR_SELECT = "freeplay_char_select";
|
||||||
var FREEPLAY_JUMP_TO_TOP = "freeplay_jump_to_top";
|
var FREEPLAY_JUMP_TO_TOP = "freeplay_jump_to_top";
|
||||||
var FREEPLAY_JUMP_TO_BOTTOM = "freeplay_jump_to_bottom";
|
var FREEPLAY_JUMP_TO_BOTTOM = "freeplay_jump_to_bottom";
|
||||||
|
var FREEPLAY_RESULTS_SCREEN = "freeplay_results_screen";
|
||||||
// VOLUME
|
// VOLUME
|
||||||
var VOLUME_UP = "volume_up";
|
var VOLUME_UP = "volume_up";
|
||||||
var VOLUME_DOWN = "volume_down";
|
var VOLUME_DOWN = "volume_down";
|
||||||
|
|
|
@ -1718,6 +1718,12 @@ class FreeplayState extends MusicBeatSubState
|
||||||
{
|
{
|
||||||
currentCapsule.onConfirm();
|
currentCapsule.onConfirm();
|
||||||
}
|
}
|
||||||
|
if (intendedScore > 0 && controls.FREEPLAY_RESULTS_SCREEN && controls.active)
|
||||||
|
{
|
||||||
|
controls.active = false;
|
||||||
|
moveToResultsScreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDirectionalInput(elapsed:Float):Void
|
function handleDirectionalInput(elapsed:Float):Void
|
||||||
|
@ -2851,6 +2857,53 @@ class FreeplayState extends MusicBeatSubState
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@:nullSafety(Off) // This shouldn't cause any issues, right?
|
||||||
|
function moveToResultsScreen():Void
|
||||||
|
{
|
||||||
|
var save = Save.instance;
|
||||||
|
var song = save.getSongScore(rememberedSongId, currentDifficulty);
|
||||||
|
if (song != null)
|
||||||
|
{
|
||||||
|
// Ok, so there's actually a score for this song on this difficulty
|
||||||
|
var songEntry = SongRegistry.instance.fetchEntry(rememberedSongId);
|
||||||
|
var songName = songEntry.songName;
|
||||||
|
var songArtist = songEntry.songArtist;
|
||||||
|
var songScore = song.score;
|
||||||
|
// persistentUpdate = false;
|
||||||
|
|
||||||
|
var talliesToUse = song.tallies;
|
||||||
|
|
||||||
|
var res:funkin.play.ResultState = new funkin.play.ResultState(
|
||||||
|
{
|
||||||
|
storyMode: false,
|
||||||
|
songId: rememberedSongId,
|
||||||
|
difficultyId: currentDifficulty,
|
||||||
|
characterId: rememberedCharacterId,
|
||||||
|
title: ('${songName} by ${songArtist}'),
|
||||||
|
prevScoreData: song,
|
||||||
|
scoreData:
|
||||||
|
{
|
||||||
|
score: songScore,
|
||||||
|
tallies:
|
||||||
|
{
|
||||||
|
sick: talliesToUse.sick,
|
||||||
|
good: talliesToUse.good,
|
||||||
|
bad: talliesToUse.bad,
|
||||||
|
shit: talliesToUse.shit,
|
||||||
|
missed: talliesToUse.missed,
|
||||||
|
combo: talliesToUse.combo,
|
||||||
|
maxCombo: talliesToUse.maxCombo,
|
||||||
|
totalNotesHit: talliesToUse.totalNotesHit,
|
||||||
|
totalNotes: talliesToUse.totalNotes,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
isNewHighscore: false
|
||||||
|
});
|
||||||
|
// this.persistentDraw = false;
|
||||||
|
openSubState(res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function favoriteSong():Void
|
function favoriteSong():Void
|
||||||
{
|
{
|
||||||
var selectedCapsule = currentCapsule;
|
var selectedCapsule = currentCapsule;
|
||||||
|
|
|
@ -250,7 +250,7 @@ class FunkinPreloader extends FlxBasePreloader
|
||||||
touchHereToPlay = createBitmap(TouchHereToPlayImage, function(bmp:Bitmap) {
|
touchHereToPlay = createBitmap(TouchHereToPlayImage, function(bmp:Bitmap) {
|
||||||
// Scale and center the touch to start image.
|
// Scale and center the touch to start image.
|
||||||
// We have to do this inside the async call, after the image size is known.
|
// We have to do this inside the async call, after the image size is known.
|
||||||
bmp.scaleX = bmp.scaleY = ratio;
|
bmp.scaleX = bmp.scaleY = ratio * 0.5;
|
||||||
bmp.x = (this._width - bmp.width) / 2;
|
bmp.x = (this._width - bmp.width) / 2;
|
||||||
bmp.y = (this._height - bmp.height) / 2;
|
bmp.y = (this._height - bmp.height) / 2;
|
||||||
});
|
});
|
||||||
|
@ -803,16 +803,12 @@ class FunkinPreloader extends FlxBasePreloader
|
||||||
#if FEATURE_TOUCH_HERE_TO_PLAY
|
#if FEATURE_TOUCH_HERE_TO_PLAY
|
||||||
function overTouchHereToPlay(e:MouseEvent):Void
|
function overTouchHereToPlay(e:MouseEvent):Void
|
||||||
{
|
{
|
||||||
touchHereToPlay.scaleX = touchHereToPlay.scaleY = ratio * 1.1;
|
scaleAndCenter(touchHereToPlay, ratio * 1.1 * 0.5);
|
||||||
touchHereToPlay.x = (this._width - touchHereToPlay.width) / 2;
|
|
||||||
touchHereToPlay.y = (this._height - touchHereToPlay.height) / 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function outTouchHereToPlay(e:MouseEvent):Void
|
function outTouchHereToPlay(e:MouseEvent):Void
|
||||||
{
|
{
|
||||||
touchHereToPlay.scaleX = touchHereToPlay.scaleY = ratio * 1;
|
scaleAndCenter(touchHereToPlay, ratio * 0.5);
|
||||||
touchHereToPlay.x = (this._width - touchHereToPlay.width) / 2;
|
|
||||||
touchHereToPlay.y = (this._height - touchHereToPlay.height) / 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mouseDownTouchHereToPlay(e:MouseEvent):Void
|
function mouseDownTouchHereToPlay(e:MouseEvent):Void
|
||||||
|
@ -822,8 +818,7 @@ class FunkinPreloader extends FlxBasePreloader
|
||||||
|
|
||||||
function onTouchHereToPlay(e:MouseEvent):Void
|
function onTouchHereToPlay(e:MouseEvent):Void
|
||||||
{
|
{
|
||||||
touchHereToPlay.x = (this._width - touchHereToPlay.width) / 2;
|
scaleAndCenter(touchHereToPlay, ratio * 0.5);
|
||||||
touchHereToPlay.y = (this._height - touchHereToPlay.height) / 2;
|
|
||||||
|
|
||||||
removeEventListener(MouseEvent.CLICK, onTouchHereToPlay);
|
removeEventListener(MouseEvent.CLICK, onTouchHereToPlay);
|
||||||
touchHereSprite.removeEventListener(MouseEvent.MOUSE_OVER, overTouchHereToPlay);
|
touchHereSprite.removeEventListener(MouseEvent.MOUSE_OVER, overTouchHereToPlay);
|
||||||
|
@ -833,6 +828,13 @@ class FunkinPreloader extends FlxBasePreloader
|
||||||
// This is the actual thing that makes the game load.
|
// This is the actual thing that makes the game load.
|
||||||
immediatelyStartGame();
|
immediatelyStartGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function scaleAndCenter(bmp:Bitmap, scale:Float)
|
||||||
|
{
|
||||||
|
bmp.scaleX = bmp.scaleY = scale;
|
||||||
|
bmp.x = (this._width - bmp.width) / 2;
|
||||||
|
bmp.y = (this._height - bmp.height) / 2;
|
||||||
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
public static final TOTAL_STEPS:Int = 11;
|
public static final TOTAL_STEPS:Int = 11;
|
||||||
|
|
|
@ -6,6 +6,11 @@ import haxe.macro.Context;
|
||||||
import haxe.macro.Expr;
|
import haxe.macro.Expr;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
#if (linux && !macro)
|
||||||
|
@:image('art/icons/iconOG.png')
|
||||||
|
class ApplicationIcon extends lime.graphics.Image {}
|
||||||
|
#end
|
||||||
|
|
||||||
@:access(lime.app.Application)
|
@:access(lime.app.Application)
|
||||||
@:access(lime.system.System)
|
@:access(lime.system.System)
|
||||||
@:access(openfl.display.Stage)
|
@:access(openfl.display.Stage)
|
||||||
|
@ -31,6 +36,13 @@ class ApplicationMain
|
||||||
{
|
{
|
||||||
var app = new openfl.display.Application();
|
var app = new openfl.display.Application();
|
||||||
|
|
||||||
|
#if linux
|
||||||
|
app.onCreateWindow.add(function(window:lime.ui.Window):Void
|
||||||
|
{
|
||||||
|
window.setIcon(new ApplicationIcon());
|
||||||
|
});
|
||||||
|
#end
|
||||||
|
|
||||||
#if !disable_preloader_assets
|
#if !disable_preloader_assets
|
||||||
ManifestResources.init(config);
|
ManifestResources.init(config);
|
||||||
#end
|
#end
|
||||||
|
|
Loading…
Reference in a new issue