From 6f0a104fdd089884659b7b07082a9ef084069414 Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Tue, 6 Jun 2023 00:26:07 -0700 Subject: [PATCH] Fixing Dropdowns --- source/funkin/editors/charter/CharterEventScreen.hx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/funkin/editors/charter/CharterEventScreen.hx b/source/funkin/editors/charter/CharterEventScreen.hx index 65f5d376..3e5b08d4 100644 --- a/source/funkin/editors/charter/CharterEventScreen.hx +++ b/source/funkin/editors/charter/CharterEventScreen.hx @@ -5,6 +5,8 @@ import flixel.group.FlxGroup; import funkin.editors.charter.EventsData; import flixel.util.FlxColor; +using StringTools; + class CharterEventScreen extends UISubstateWindow { public var cam:FlxCamera; public var chartEvent:CharterEvent; @@ -156,7 +158,7 @@ class CharterEventScreen extends UISubstateWindow { paramsFields.push(colorWheel); case TDropDown(options): addLabel(); - var dropdown = new UIDropDown(eventName.x, y, 320, 32, options, cast value); + var dropdown = new UIDropDown(eventName.x, y, 320, 32, options, Std.int(Math.abs(options.indexOf(cast value)))); y += dropdown.height + 30; paramsPanel.add(dropdown); paramsFields.push(dropdown); @@ -201,7 +203,7 @@ class CharterEventScreen extends UISubstateWindow { chartEvent.events[curEvent].params = [ for(p in paramsFields) { if (p is UIDropDown) - cast(p, UIDropDown).index; + cast(p, UIDropDown).label.text.contains("Strumline") ? cast(p, UIDropDown).index : cast(p, UIDropDown).label.text; else if (p is UINumericStepper) { var stepper = cast(p, UINumericStepper); // int