1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
  
     | 
    
      /**
 * @author mrdoob / http://mrdoob.com/
 */
Sidebar.Settings = function ( editor ) {
	var config = editor.config;
	var signals = editor.signals;
	var strings = editor.strings;
	var container = new UI.Panel();
	container.setBorderTop( '0' );
	container.setPaddingTop( '20px' );
	container.setPaddingBottom( '20px' );
	// language
	var options = {
		en: 'English',
		zh: '中文'
	};
	var languageRow = new UI.Row();
	var language = new UI.Select().setWidth( '150px' );
	language.setOptions( options );
	if ( config.getKey( 'language' ) !== undefined ) {
		language.setValue( config.getKey( 'language' ) );
	}
	language.onChange( function () {
		var value = this.getValue();
		editor.config.setKey( 'language', value );
	} );
	languageRow.add( new UI.Text( strings.getKey( 'sidebar/settings/language' ) ).setWidth( '90px' ) );
	languageRow.add( language );
	container.add( languageRow );
	container.add( new Sidebar.Settings.Shortcuts( editor ) );
	container.add( new Sidebar.Settings.Viewport( editor ) );
	return container;
};
 
     |