m_rmbSelected( false ),
m_searchedTags( false ),
m_tags( false ),
- m_uniformTextureSize( 128 ){
+ m_uniformTextureSize( 96 ){
}
};
TextureBrowser_queueDraw( textureBrowser );
}
+void TextureBrowser_setUniformSize( TextureBrowser& textureBrowser, std::size_t scale ){
+ textureBrowser.m_uniformTextureSize = scale;
+
+ TextureBrowser_queueDraw( textureBrowser );
+}
+
void TextureBrowser_MouseWheel( TextureBrowser& textureBrowser, bool bUp ){
int originy = TextureBrowser_getOriginY( textureBrowser );
}
typedef ReferenceCaller1<TextureBrowser, const IntImportCallback&, TextureScaleExport> TextureScaleExportCaller;
+
+void UniformTextureSizeImport( TextureBrowser& textureBrowser, int value ){
+
+ if ( value > 16 )
+ TextureBrowser_setUniformSize( textureBrowser, value );
+}
+typedef ReferenceCaller1<TextureBrowser, int, UniformTextureSizeImport> UniformTextureSizeImportCaller;
+
void TextureBrowser_constructPreferences( PreferencesPage& page ){
page.appendCheckBox(
"", "Texture scrollbar",
IntExportCallback( TextureScaleExportCaller( GlobalTextureBrowser() ) )
);
}
+ page.appendSpinner(
+ "Texture Thumbnail Size",
+ GlobalTextureBrowser().m_uniformTextureSize,
+ GlobalTextureBrowser().m_uniformTextureSize,
+ 16, 8192
+ );
page.appendEntry( "Mousewheel Increment", GlobalTextureBrowser().m_mouseWheelScrollIncrement );
{
const char* startup_shaders[] = { "None", TextureBrowser_getComonShadersName() };
makeSizeStringImportCallback( TextureBrowserSetScaleCaller( g_TextureBrowser ) ),
SizeExportStringCaller( g_TextureBrowser.m_textureScale )
);
+ GlobalPreferenceSystem().registerPreference( "UniformTextureSize",
+ makeIntStringImportCallback(UniformTextureSizeImportCaller(g_TextureBrowser)),
+ IntExportStringCaller(g_TextureBrowser.m_uniformTextureSize) );
GlobalPreferenceSystem().registerPreference( "TextureScrollbar",
makeBoolStringImportCallback( TextureBrowserImportShowScrollbarCaller( g_TextureBrowser ) ),
BoolExportStringCaller( GlobalTextureBrowser().m_showTextureScrollbar )