[Scummvm-devel] New optional OSystem method

Eugene Sandulenko sev at scummvm.org
Sun Oct 28 13:07:29 CET 2007


Hi Team,

I decided to commit one of the patches from our GSoC Backends Lib
project.

It could be quite useful for backend authors.

Basically it is backend-specific theme addition.

One of use cases for it is disabling unneeded GUI elements. Say, on
most platforms we do not have SoundFont support, so that widget could
be disabled without modifications to main theme config.

Another future usage will be defining of backend-specific tab widgets.
This patch was never finished by Serhiy :(.

The method in question is

  Common::String getExtraThemeConfig()

Reference usage:

  Common::String OSystem_SDL::getExtraThemeConfig() {
	 Common::String myConfigINI(""
           "[XxY]\n"
           "mcFontButton.enabled=false\n"
           "mcFontPath.enabled=false\n"
           "mcFontClearButton.enabled=false\n"
           );
	 return myConfigINI;
  }

Thus, those 3 widgets could be disabled.

This string will be treated like a separate config, so you will have to
specify resolution sections in there.


Eugene

PS. Somebody (clone2727 ?), please, put above explanations on Wiki.




More information about the Scummvm-devel mailing list