fix up the property ui a bit
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user