浏览代码

GUI: Starting to implement the outliner.

Mr.doob 13 年之前
父节点
当前提交
ab3eececc6
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 8 0
      gui/js/UI.js
  2. 4 0
      gui/js/ui/Sidebar.Outliner.js

+ 8 - 0
gui/js/UI.js

@@ -294,6 +294,14 @@ UI.Select = function ( position ) {
 
 UI.Select.prototype = Object.create( UI.Element.prototype );
 
+UI.Select.prototype.setMultiple = function ( boolean ) {
+
+	this.dom.multiple = boolean;
+
+	return this;
+
+};
+
 UI.Select.prototype.setOptions = function ( options ) {
 
 	for ( var i = 0; i < options.length; i ++ ) {

+ 4 - 0
gui/js/ui/Sidebar.Outliner.js

@@ -7,6 +7,10 @@ Sidebar.Outliner = function ( signals ) {
 	container.setBorderTop( '1px solid #ccc' );
 
 	container.add( new UI.Text().setValue( 'SCENE' ).setColor( '#666' ) );
+	container.add( new UI.Break(), new UI.Break() );
+
+	var scene = new UI.Select().setMultiple( true ).setOptions( [ 'test', 'test' ] ).setWidth( '280px' ).setHeight('140px').setColor( '#444' ).setFontSize( '12px' );
+	container.add( scene );
 
 	container.add( new UI.Break(), new UI.Break() );