From c50dbe8b7295593a5f492675fc29273f2bb14126 Mon Sep 17 00:00:00 2001 From: Eric Lundberg Date: Mon, 5 Apr 2004 23:44:28 +0000 Subject: [PATCH] Allow the field editor to edit arrays of floats. The sword runtime config currently uses them but it wasn't actually possible to edit them. (Not that I'm messing with the values or the sword code, I just noticed it was seemingly borked.) git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2989 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/admin/client/FieldEditor.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/admin/client/FieldEditor.java b/src/java/com/threerings/admin/client/FieldEditor.java index 196f6b723..bdbe801cd 100644 --- a/src/java/com/threerings/admin/client/FieldEditor.java +++ b/src/java/com/threerings/admin/client/FieldEditor.java @@ -1,5 +1,5 @@ // -// $Id: FieldEditor.java,v 1.9 2004/02/25 14:39:14 mdb Exp $ +// $Id: FieldEditor.java,v 1.10 2004/04/05 23:44:28 eric Exp $ package com.threerings.admin.client; @@ -140,7 +140,10 @@ public class FieldEditor extends JPanel } else if (_field.getType().equals(INT_ARRAY_PROTO.getClass())) { value = StringUtil.parseIntArray(_value.getText()); - + + } else if (_field.getType().equals(FLOAT_ARRAY_PROTO.getClass())) { + value = StringUtil.parseFloatArray(_value.getText()); + } else if (_field.getType().equals(Boolean.TYPE)) { value = new Boolean(_value.getText().equalsIgnoreCase("true")); @@ -200,4 +203,5 @@ public class FieldEditor extends JPanel protected static final String[] STRING_ARRAY_PROTO = new String[0]; protected static final int[] INT_ARRAY_PROTO = new int[0]; + protected static final float[] FLOAT_ARRAY_PROTO = new float[0]; }