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 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)
|
||||
|
|
Loading…
Reference in a new issue