Exemplo n.º 1
0
    void DrawSingleData()
    {
        if (singleData != null)
        {
            Indent();

            // Draw string_field
            DrawLabel("string_field:");
            singleData.string_field = DrawString(singleData.string_field);
            Indent();
            if (DrawButton(SetDataSceneStrings.Reset))
            {
                singleData.Reset_string_field();
            }

            NewLine();
            Indent();

            // Draw bool_field
            DrawLabel("bool_field:");
            singleData.bool_field = DrawBool(singleData.bool_field);
            Indent();
            if (DrawButton(SetDataSceneStrings.Reset))
            {
                singleData.Reset_bool_field();
            }

            NewLine();
            Indent();

            // Draw float_field
            DrawLabel("float_field:");
            singleData.float_field = DrawFloat(singleData.float_field);
            Indent();
            if (DrawButton(SetDataSceneStrings.Reset))
            {
                singleData.Reset_float_field();
            }

            NewLine();
            Indent();

            // Draw int_field
            DrawLabel("int_field:");
            singleData.int_field = DrawInt(singleData.int_field);
            Indent();
            if (DrawButton(SetDataSceneStrings.Reset))
            {
                singleData.Reset_int_field();
            }

            NewLine();
            Indent();

            // Draw vector2_field
            DrawLabel("vector2_field:");
            singleData.vector2_field = DrawVector2(singleData.vector2_field);
            Indent();
            if (DrawButton(SetDataSceneStrings.Reset))
            {
                singleData.Reset_vector2_field();
            }

            NewLine();
            Indent();

            // Draw vector3_field
            DrawLabel("vector3_field:");
            singleData.vector3_field = DrawVector3(singleData.vector3_field);
            Indent();
            if (DrawButton(SetDataSceneStrings.Reset))
            {
                singleData.Reset_vector3_field();
            }

            NewLine();
            Indent();

            // Draw vector4_field
            DrawLabel("vector4_field:");
            singleData.vector4_field = DrawVector4(singleData.vector4_field);
            Indent();
            if (DrawButton(SetDataSceneStrings.Reset))
            {
                singleData.Reset_vector4_field();
            }

            NewLine();
            Indent();


            // Draw custom_field
            DrawLabel("custom_field");

            Indent();
            if (DrawButton(SetDataSceneStrings.Reset))
            {
                singleData.Reset_custom_field();
            }

            DrawLabel(singleData.custom_field.Key + ":");

            string oldKey = singleData.custom_field.Key;
            newKey = DrawString(newKey);

            singleData.custom_field.description = DrawString(singleData.custom_field.description);
            if (oldKey != newKey && DrawButton(SetDataSceneStrings.SetRefBtn))
            {
                singleData.custom_field = new GDESetCustomData(newKey);
            }
        }
    }