fix up the property ui a bit

This commit is contained in:
lunarcleint
2024-01-29 19:10:02 -07:00
parent 6497487c1b
commit 3445b196b2
2 changed files with 7 additions and 7 deletions
@@ -97,11 +97,11 @@ class MetaDataScreen extends UISubstateWindow {
add(difficulitesTextBox);
addLabelOn(difficulitesTextBox, "Difficulties");
customPropertiesButtonList = new UIButtonList<PropertyButton>(needsVoicesCheckbox.x + needsVoicesCheckbox.width + 105, needsVoicesCheckbox.y, 290, 310, '', FlxPoint.get(280, 35), null, 5);
customPropertiesButtonList = new UIButtonList<PropertyButton>(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)));
@@ -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);
}
}