1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-26 15:07:14 +00:00

char input haxeUI stuff

This commit is contained in:
Cameron Taylor 2022-09-08 16:39:31 -04:00
parent e15815afa8
commit 43b952b321

View file

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