mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-27 07:27:12 +00:00
char input haxeUI stuff
This commit is contained in:
parent
e15815afa8
commit
43b952b321
|
@ -56,8 +56,6 @@ class DebugBoundingState extends FlxState
|
||||||
|
|
||||||
var hudCam:FlxCamera;
|
var hudCam:FlxCamera;
|
||||||
|
|
||||||
var charInput:FlxUIDropDownMenu;
|
|
||||||
|
|
||||||
var curView:ANIMDEBUGVIEW = SPRITESHEET;
|
var curView:ANIMDEBUGVIEW = SPRITESHEET;
|
||||||
|
|
||||||
var spriteSheetView:FlxGroup;
|
var spriteSheetView:FlxGroup;
|
||||||
|
@ -113,11 +111,6 @@ class DebugBoundingState extends FlxState
|
||||||
initSpritesheetView();
|
initSpritesheetView();
|
||||||
initOffsetView();
|
initOffsetView();
|
||||||
|
|
||||||
// charInput = new FlxInputText(300, 10, 150, "bf", 16);
|
|
||||||
// charInput.focusCam = hudCam;
|
|
||||||
// charInput.cameras = [hudCam];
|
|
||||||
// charInput.scrollFactor.set();
|
|
||||||
|
|
||||||
uiStuff.cameras = [hudCam];
|
uiStuff.cameras = [hudCam];
|
||||||
|
|
||||||
add(uiStuff);
|
add(uiStuff);
|
||||||
|
@ -258,15 +251,16 @@ class DebugBoundingState extends FlxState
|
||||||
|
|
||||||
var characters:Array<String> = CoolUtil.coolTextFile(Paths.txt('characterList'));
|
var characters:Array<String> = CoolUtil.coolTextFile(Paths.txt('characterList'));
|
||||||
|
|
||||||
// charInput isnt only exclusive to offsetView shit now
|
var charDropdown:DropDown = cast uiStuff.findComponent('characterDropdown');
|
||||||
charInput = new FlxUIDropDownMenu(500, 20, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(str:String)
|
for (char in characters)
|
||||||
{
|
{
|
||||||
loadAnimShit(characters[Std.parseInt(str)]);
|
charDropdown.dataSource.add({text: char});
|
||||||
// trace();
|
}
|
||||||
});
|
|
||||||
// charInput.
|
charDropdown.onChange = function(e:UIEvent)
|
||||||
charInput.cameras = [hudCam];
|
{
|
||||||
add(charInput);
|
loadAnimShit(e.data.text);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public var mouseOffset:FlxPoint = FlxPoint.get(0, 0);
|
public var mouseOffset:FlxPoint = FlxPoint.get(0, 0);
|
||||||
|
@ -361,11 +355,6 @@ class DebugBoundingState extends FlxState
|
||||||
if (FlxG.keys.justPressed.H)
|
if (FlxG.keys.justPressed.H)
|
||||||
hudCam.visible = !hudCam.visible;
|
hudCam.visible = !hudCam.visible;
|
||||||
|
|
||||||
/* if (charInput.hasFocus && FlxG.keys.justPressed.ENTER)
|
|
||||||
{
|
|
||||||
loadAnimShit();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
CoolUtil.mouseCamDrag();
|
CoolUtil.mouseCamDrag();
|
||||||
CoolUtil.mouseWheelZoom();
|
CoolUtil.mouseWheelZoom();
|
||||||
|
|
||||||
|
@ -480,6 +469,9 @@ class DebugBoundingState extends FlxState
|
||||||
|
|
||||||
var swagChar:BaseCharacter;
|
var swagChar:BaseCharacter;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Called when animation dropdown is changed!
|
||||||
|
*/
|
||||||
function loadAnimShit(char:String)
|
function loadAnimShit(char:String)
|
||||||
{
|
{
|
||||||
if (swagChar != null)
|
if (swagChar != null)
|
||||||
|
|
Loading…
Reference in a new issue