diff --git a/source/funkin/editors/charter/MetaDataScreen.hx b/source/funkin/editors/charter/MetaDataScreen.hx index 806a57c4..0ed13325 100644 --- a/source/funkin/editors/charter/MetaDataScreen.hx +++ b/source/funkin/editors/charter/MetaDataScreen.hx @@ -97,11 +97,11 @@ class MetaDataScreen extends UISubstateWindow { add(difficulitesTextBox); addLabelOn(difficulitesTextBox, "Difficulties"); - customPropertiesButtonList = new UIButtonList(needsVoicesCheckbox.x + needsVoicesCheckbox.width + 105, needsVoicesCheckbox.y, 290, 310, '', FlxPoint.get(280, 35), null, 5); + customPropertiesButtonList = new UIButtonList(needsVoicesCheckbox.x + needsVoicesCheckbox.width + 105, songNameTextBox.y, 290, 316, '', FlxPoint.get(280, 35), null, 5); customPropertiesButtonList.frames = Paths.getFrames('editors/ui/inputbox'); customPropertiesButtonList.cameraSpacing = 0; customPropertiesButtonList.addButton.callback = function() { - customPropertiesButtonList.add(new PropertyButton("New Property", "Value Here")); + customPropertiesButtonList.add(new PropertyButton("Property", "Value Here")); } for (val in Reflect.fields(metadata.customValues)) customPropertiesButtonList.add(new PropertyButton(val, Reflect.field(metadata.customValues, val))); diff --git a/source/funkin/editors/extra/PropertyButton.hx b/source/funkin/editors/extra/PropertyButton.hx index 1dfa78c1..ff76f93f 100644 --- a/source/funkin/editors/extra/PropertyButton.hx +++ b/source/funkin/editors/extra/PropertyButton.hx @@ -3,16 +3,16 @@ package funkin.editors.extra; class PropertyButton extends UIButton { public var propertyText:UITextBox; public var valueText:UITextBox; + public function new(property, value) { super(0, 0, '', function () {}, 280, 35); - propertyText = new UITextBox(5, 5, property, 125, 25); - valueText = new UITextBox(135, 5, value, 125, 25); - members.push(propertyText); - members.push(valueText); + members.push(propertyText = new UITextBox(5, 5, property, 100, 25)); + members.push(valueText = new UITextBox(propertyText.x + propertyText.bWidth + 10, 5, value, 165, 25)); } + public override function update(elapsed) { super.update(elapsed); propertyText.follow(this, 5, 5); - valueText.follow(this, 135, 5); + valueText.follow(this, propertyText.x + propertyText.bWidth, 5); } } \ No newline at end of file