diff options
author | hwc487 | 2012-04-19 13:01:43 -0700 |
---|---|---|
committer | hwc487 | 2012-04-19 13:01:43 -0700 |
commit | e6a20fe64574763483dc602bd759278ccf5e5e68 (patch) | |
tree | 69defe7200206f0257fe90697136fadef59d521e /js/panels/properties.reel/sections/custom.reel | |
parent | ae7eb87564632ce7c676bd728b8ff2710ff0bb83 (diff) | |
parent | 9284c19f076dec3b47ece7dc7bcd22d74e4246c3 (diff) | |
download | ninja-e6a20fe64574763483dc602bd759278ccf5e5e68.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts:
js/lib/drawing/world.js
js/lib/geom/geom-obj.js
js/lib/rdge/materials/cloud-material.js
js/lib/rdge/materials/deform-material.js
js/lib/rdge/materials/flat-material.js
js/lib/rdge/materials/material.js
js/lib/rdge/materials/pulse-material.js
js/lib/rdge/materials/relief-tunnel-material.js
js/lib/rdge/materials/square-tunnel-material.js
js/lib/rdge/materials/star-material.js
js/lib/rdge/materials/taper-material.js
js/lib/rdge/materials/tunnel-material.js
js/lib/rdge/materials/twist-material.js
js/lib/rdge/materials/twist-vert-material.js
js/lib/rdge/materials/uber-material.js
js/lib/rdge/materials/water-material.js
js/lib/rdge/materials/z-invert-material.js
Diffstat (limited to 'js/panels/properties.reel/sections/custom.reel')
-rwxr-xr-x | js/panels/properties.reel/sections/custom.reel/custom.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js index ac316907..876fe110 100755 --- a/js/panels/properties.reel/sections/custom.reel/custom.js +++ b/js/panels/properties.reel/sections/custom.reel/custom.js | |||
@@ -15,6 +15,7 @@ var ColorSelect = require("js/panels/properties.reel/sections/custom-rows/color- | |||
15 | 15 | ||
16 | // Components Needed to make this work | 16 | // Components Needed to make this work |
17 | var Hottext = require("js/components/hottextunit.reel").HotTextUnit; | 17 | var Hottext = require("js/components/hottextunit.reel").HotTextUnit; |
18 | var HT = require("js/components/hottext.reel").HotText; | ||
18 | var Dropdown = require("js/components/combobox.reel").Combobox; | 19 | var Dropdown = require("js/components/combobox.reel").Combobox; |
19 | var TextField = require("js/components/textfield.reel").TextField; | 20 | var TextField = require("js/components/textfield.reel").TextField; |
20 | var FileInput = require("js/components/ui/file-input.reel").FileInput; | 21 | var FileInput = require("js/components/ui/file-input.reel").FileInput; |
@@ -168,6 +169,7 @@ exports.CustomSection = Montage.create(Component, { | |||
168 | value: function(fields) { | 169 | value: function(fields) { |
169 | switch(fields.type) { | 170 | switch(fields.type) { |
170 | case "hottext" : return this.createHottext(fields); | 171 | case "hottext" : return this.createHottext(fields); |
172 | case "ht" : return this.createHT(fields); | ||
171 | case "dropdown" : return this.createDropdown(fields); | 173 | case "dropdown" : return this.createDropdown(fields); |
172 | case "textbox" : return this.createTextField(fields); | 174 | case "textbox" : return this.createTextField(fields); |
173 | case "file" : return this.createFileInput(fields); | 175 | case "file" : return this.createFileInput(fields); |
@@ -178,6 +180,33 @@ exports.CustomSection = Montage.create(Component, { | |||
178 | } | 180 | } |
179 | }, | 181 | }, |
180 | 182 | ||
183 | createHT: { | ||
184 | value: function(aField) { | ||
185 | |||
186 | // Generate Hottext | ||
187 | var obj = HT.create(); | ||
188 | |||
189 | // Set Values for HottextRow | ||
190 | if (aField.id) obj.id = aField.id; | ||
191 | if (aField.value) obj.value = aField.value; | ||
192 | if (aField.min) obj._minValue = aField.min; | ||
193 | if (aField.max) obj._maxValue = aField.max; | ||
194 | if (aField.prop) obj.prop = aField.prop; | ||
195 | |||
196 | //Initiate onChange Events | ||
197 | obj.addEventListener("change", this, false); | ||
198 | obj.addEventListener("changing", this, false); | ||
199 | |||
200 | //Bind object value to controls list so it can be manipulated | ||
201 | Object.defineBinding(this.controls, aField.id, { | ||
202 | boundObject: obj, | ||
203 | boundObjectPropertyPath: "value" | ||
204 | }); | ||
205 | |||
206 | return obj; | ||
207 | } | ||
208 | }, | ||
209 | |||
181 | //Breaking Up Switch Case Statement to functions to return a row | 210 | //Breaking Up Switch Case Statement to functions to return a row |
182 | createHottext: { | 211 | createHottext: { |
183 | value: function(aField) { | 212 | value: function(aField) { |