mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 10:05:41 -05:00
more ui work
This commit is contained in:
parent
0ed0093fdd
commit
34cb7f9982
3 changed files with 15 additions and 21 deletions
|
@ -48,10 +48,10 @@ class MainMenuState extends MusicBeatState
|
||||||
|
|
||||||
persistentUpdate = persistentDraw = true;
|
persistentUpdate = persistentDraw = true;
|
||||||
|
|
||||||
var bg:FlxSprite = new FlxSprite(-80).loadGraphic(Paths.image('menuBG'));
|
var bg:FlxSprite = new FlxSprite(Paths.image('menuBG'));
|
||||||
bg.scrollFactor.x = 0;
|
bg.scrollFactor.x = 0;
|
||||||
bg.scrollFactor.y = 0.18;
|
bg.scrollFactor.y = 0.18;
|
||||||
bg.setGraphicSize(Std.int(bg.width * 1.1));
|
bg.setGraphicSize(Std.int(bg.width * 1.3));
|
||||||
bg.updateHitbox();
|
bg.updateHitbox();
|
||||||
bg.screenCenter();
|
bg.screenCenter();
|
||||||
bg.antialiasing = true;
|
bg.antialiasing = true;
|
||||||
|
@ -60,12 +60,13 @@ class MainMenuState extends MusicBeatState
|
||||||
camFollow = new FlxObject(0, 0, 1, 1);
|
camFollow = new FlxObject(0, 0, 1, 1);
|
||||||
add(camFollow);
|
add(camFollow);
|
||||||
|
|
||||||
magenta = new FlxSprite(-80).loadGraphic(Paths.image('menuDesat'));
|
magenta = new FlxSprite(Paths.image('menuDesat'));
|
||||||
magenta.scrollFactor.x = 0;
|
magenta.scrollFactor.x = bg.scrollFactor.x;
|
||||||
magenta.scrollFactor.y = 0.18;
|
magenta.scrollFactor.y = bg.scrollFactor.y;
|
||||||
magenta.setGraphicSize(Std.int(magenta.width * 1.1));
|
magenta.setGraphicSize(Std.int(bg.width));
|
||||||
magenta.updateHitbox();
|
magenta.updateHitbox();
|
||||||
magenta.screenCenter();
|
magenta.x = bg.x;
|
||||||
|
magenta.y = bg.y;
|
||||||
magenta.visible = false;
|
magenta.visible = false;
|
||||||
magenta.antialiasing = true;
|
magenta.antialiasing = true;
|
||||||
magenta.color = 0xFFfd719b;
|
magenta.color = 0xFFfd719b;
|
||||||
|
@ -109,6 +110,7 @@ class MainMenuState extends MusicBeatState
|
||||||
}
|
}
|
||||||
|
|
||||||
FlxG.camera.follow(camFollow, null, 0.06);
|
FlxG.camera.follow(camFollow, null, 0.06);
|
||||||
|
FlxG.camera.setScrollBounds(bg.x, bg.x + bg.width, bg.y, bg.y + bg.height * 1.2);
|
||||||
|
|
||||||
var versionShit:FlxText = new FlxText(5, FlxG.height - 18, 0, "v" + Application.current.meta.get('version'), 12);
|
var versionShit:FlxText = new FlxText(5, FlxG.height - 18, 0, "v" + Application.current.meta.get('version'), 12);
|
||||||
versionShit.scrollFactor.set();
|
versionShit.scrollFactor.set();
|
||||||
|
|
|
@ -14,21 +14,12 @@ class PlayerSettings
|
||||||
static public var player1(default, null):PlayerSettings;
|
static public var player1(default, null):PlayerSettings;
|
||||||
static public var player2(default, null):PlayerSettings;
|
static public var player2(default, null):PlayerSettings;
|
||||||
|
|
||||||
#if (haxe >= "4.0.0")
|
static public var onAvatarAdd(default, null) = new FlxTypedSignal<PlayerSettings->Void>();
|
||||||
static public final onAvatarAdd = new FlxTypedSignal<PlayerSettings->Void>();
|
static public var onAvatarRemove(default, null) = new FlxTypedSignal<PlayerSettings->Void>();
|
||||||
static public final onAvatarRemove = new FlxTypedSignal<PlayerSettings->Void>();
|
|
||||||
#else
|
|
||||||
static public var onAvatarAdd = new FlxTypedSignal<PlayerSettings->Void>();
|
|
||||||
static public var onAvatarRemove = new FlxTypedSignal<PlayerSettings->Void>();
|
|
||||||
#end
|
|
||||||
|
|
||||||
public var id(default, null):Int;
|
public var id(default, null):Int;
|
||||||
|
|
||||||
#if (haxe >= "4.0.0")
|
public var controls(default, null):Controls;
|
||||||
public final controls:Controls;
|
|
||||||
#else
|
|
||||||
public var controls:Controls;
|
|
||||||
#end
|
|
||||||
|
|
||||||
// public var avatar:Player;
|
// public var avatar:Player;
|
||||||
// public var camera(get, never):PlayCamera;
|
// public var camera(get, never):PlayCamera;
|
||||||
|
|
|
@ -65,7 +65,7 @@ class ControlsMenu extends ui.OptionsState.Page
|
||||||
if (FlxG.gamepads.numActiveGamepads > 0)
|
if (FlxG.gamepads.numActiveGamepads > 0)
|
||||||
{
|
{
|
||||||
var devicesBg = new FlxSprite();
|
var devicesBg = new FlxSprite();
|
||||||
devicesBg.makeGraphic(FlxG.width, 100, 0xFF808080);
|
devicesBg.makeGraphic(FlxG.width, 100, 0xFFfafd6d);
|
||||||
add(devicesBg);
|
add(devicesBg);
|
||||||
deviceList = new TextMenuList(Horizontal, None);
|
deviceList = new TextMenuList(Horizontal, None);
|
||||||
add(deviceList);
|
add(deviceList);
|
||||||
|
@ -120,6 +120,7 @@ class ControlsMenu extends ui.OptionsState.Page
|
||||||
{
|
{
|
||||||
camFollow.y = deviceList.selectedItem.y;
|
camFollow.y = deviceList.selectedItem.y;
|
||||||
controlGrid.selectedItem.idle();
|
controlGrid.selectedItem.idle();
|
||||||
|
controlGrid.enabled = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
camFollow.y = controlGrid.selectedItem.y;
|
camFollow.y = controlGrid.selectedItem.y;
|
||||||
|
@ -138,7 +139,7 @@ class ControlsMenu extends ui.OptionsState.Page
|
||||||
|
|
||||||
prompt = new Prompt("\nPress any key to rebind\n\n\n\n Escape to cancel", None);
|
prompt = new Prompt("\nPress any key to rebind\n\n\n\n Escape to cancel", None);
|
||||||
prompt.create();
|
prompt.create();
|
||||||
prompt.createBgFromMargin();
|
prompt.createBgFromMargin(100, 0xFFfafd6d);
|
||||||
prompt.back.scrollFactor.set(0, 0);
|
prompt.back.scrollFactor.set(0, 0);
|
||||||
prompt.exists = false;
|
prompt.exists = false;
|
||||||
add(prompt);
|
add(prompt);
|
||||||
|
|
Loading…
Reference in a new issue