@@ -13,7 +13,7 @@ import * as events from './events'
1313
1414export interface IAnimatedJavaProjectSettings {
1515 project_namespace : Settings . InlineTextSetting
16- // texture_size : Settings.DropdownSetting<number>
16+ project_resolution : Settings . DoubleNumberSetting
1717 rig_item : Settings . InlineTextSetting
1818 rig_item_model : Settings . InlineTextSetting
1919 rig_export_folder : Settings . FolderSetting
@@ -34,12 +34,12 @@ const TRANSLATIONS = {
3434 unset : translate ( 'animated_java.project_settings.project_namespace.error.unset' ) ,
3535 } ,
3636 } ,
37- // texture_size : {
38- // displayName: translate('animated_java.project_settings.texture_size '),
39- // description: translate('animated_java.project_settings.texture_size.description').split (
40- // '\n '
41- // ),
42- // },
37+ project_resolution : {
38+ displayName : translate ( 'animated_java.project_settings.project_resolution ' ) ,
39+ description : translate (
40+ 'animated_java.project_settings.project_resolution.description '
41+ ) . split ( '\n' ) ,
42+ } ,
4343 rig_item : {
4444 displayName : translate ( 'animated_java.project_settings.rig_item' ) ,
4545 description : translate ( 'animated_java.project_settings.rig_item.description' ) . split ( '\n' ) ,
@@ -148,6 +148,26 @@ export function getDefaultProjectSettings(): IAnimatedJavaProjectSettings {
148148 }
149149 ) ,
150150
151+ project_resolution : new Settings . DoubleNumberSetting (
152+ {
153+ id : 'animated_java:project_settings/project_resolution' ,
154+ displayName : TRANSLATIONS . project_resolution . displayName ,
155+ description : TRANSLATIONS . project_resolution . description ,
156+ get defaultValue ( ) : [ number , number ] {
157+ return [ Project ! . texture_width , Project ! . texture_height ]
158+ } ,
159+ min : 1 ,
160+ secondNumberLabel : 'x' ,
161+ docsLink : 'page:project_settings#project_resolution' ,
162+ } ,
163+ function onUpdate ( setting ) {
164+ Project ! . texture_width = setting . numberA
165+ Project ! . texture_height = setting . numberB
166+ console . log ( 'Project resolution changed to' , setting . value )
167+ Canvas . updateAllUVs ( )
168+ }
169+ ) ,
170+
151171 rig_item : new Settings . InlineTextSetting (
152172 {
153173 id : 'animated_java:project_settings/rig_item' ,
@@ -365,10 +385,10 @@ export const projectSettingStructure: GUIStructure = [
365385 type : 'setting' ,
366386 settingId : _ . project_namespace . id ,
367387 } ,
368- // {
369- // type: 'setting',
370- // settingId: _.texture_size .id,
371- // },
388+ {
389+ type : 'setting' ,
390+ settingId : _ . project_resolution . id ,
391+ } ,
372392 ] ,
373393 } ,
374394 {
0 commit comments