i've some questions about scheme files.
(1) why do scheme files exist, since there are looknfeel, imageset and font files already to indicate the appearance of the user interface.
(2) i've opened a scheme files in the sample enclosed in the cegui sdk, however i can only find a set of names without the filename of other resources files like the looknfeel files. so how does the cegui find the looknfeel of the components?
here is the source code:
Code: Select all
CEGUI::SchemeManager::getSingleton().loadScheme("../datafiles/schemes/TaharezLookWidgets.scheme");
CEGUI::Imageset* taharezImages = CEGUI::ImagesetManager::getSingleton().createImageset("../datafiles/imagesets/TaharezLook.imageset");
CEGUI::FontManager::getSingleton().createFont("../datafiles/fonts/Commonwealth-10.font");
CEGUI::System::getSingleton().setDefaultFont("Commonwealth-10");
CEGUI::System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");
CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
CEGUI::DefaultWindow* root = (CEGUI::DefaultWindow*)winMgr.createWindow("DefaultWindow", "Root");
CEGUI::System::getSingleton().setGUISheet(root);
CEGUI::FrameWindow* wnd = (CEGUI::FrameWindow*)winMgr.createWindow("TaharezLook/FrameWindow", "Demo Window");
root->addChildWindow(wnd);
wnd->setPosition(CEGUI::Point(0.35f, 0.25f));
wnd->setSize(CEGUI::Size(0.25f, 0.25f));
wnd->setMaximumSize(CEGUI::Size(1.0f, 1.0f));
wnd->setMinimumSize(CEGUI::Size(0.1f, 0.1f));
wnd->setText("Hello World!");
CEGUI::PushButton* btn = static_cast<CEGUI::PushButton*>(winMgr.createWindow("TaharezLook/Button", "QuitButton"));
root->addChildWindow(btn);
btn->setText("Quit!");
btn->setPosition(CEGUI::Point(0.0f, 0.1f));
btn->setSize(CEGUI::Size(0.1f, 0.036f));
btn->setAlwaysOnTop(true);
in this code, i do not specify the looknfeel but a scheme file, and in the scheme file, there is no path that indicates the looknfeel. the scheme file is like this:
Code: Select all
<?xml version="1.0" ?>
<GUIScheme Name="TaharezLookWidgets">
<WindowSet Filename="CEGUITaharezLook">
<WindowFactory Name="TaharezLook/AlternateProgressBar" />
<WindowFactory Name="TaharezLook/Button" />
<WindowFactory Name="TaharezLook/Checkbox" />
<WindowFactory Name="TaharezLook/CloseButton" />
<WindowFactory Name="TaharezLook/Combobox" />
<WindowFactory Name="TaharezLook/ComboDropList" />
<WindowFactory Name="TaharezLook/ComboEditbox" />
<WindowFactory Name="TaharezLook/Editbox" />
<WindowFactory Name="TaharezLook/FrameWindow" />
<WindowFactory Name="TaharezLook/LargeVerticalScrollbar" />
<WindowFactory Name="TaharezLook/LargeVerticalScrollbarThumb" />
<WindowFactory Name="TaharezLook/Listbox" />
<WindowFactory Name="TaharezLook/ListHeader" />
<WindowFactory Name="TaharezLook/ListHeaderSegment" />
<WindowFactory Name="TaharezLook/HorizontalScrollbar" />
<WindowFactory Name="TaharezLook/HorizontalScrollbarThumb" />
<WindowFactory Name="TaharezLook/MultiColumnList" />
<WindowFactory Name="TaharezLook/MultiLineEditbox" />
<WindowFactory Name="TaharezLook/ProgressBar" />
<WindowFactory Name="TaharezLook/RadioButton" />
<WindowFactory Name="TaharezLook/ScrollablePane" />
<WindowFactory Name="TaharezLook/Slider" />
<WindowFactory Name="TaharezLook/SliderThumb" />
<WindowFactory Name="TaharezLook/Spinner" />
<WindowFactory Name="TaharezLook/StaticImage" />
<WindowFactory Name="TaharezLook/StaticText" />
<WindowFactory Name="TaharezLook/TabButton" />
<WindowFactory Name="TaharezLook/TabControl" />
<WindowFactory Name="TaharezLook/TabPane" />
<WindowFactory Name="TaharezLook/Titlebar" />
<WindowFactory Name="TaharezLook/Tooltip" />
<WindowFactory Name="TaharezLook/VerticalScrollbar" />
<WindowFactory Name="TaharezLook/VerticalScrollbarThumb" />
<WindowFactory Name="TaharezLook/VUMeter" />
</WindowSet>
</GUIScheme>
and i delete the looknfeel files in the looknfeel folder, still my program can run perfectly. so why?