mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-18 00:08:20 +01:00
Comment fixes in example 25
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6318 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
f0c890d3ff
commit
da77810fb5
@ -224,7 +224,7 @@ public:
|
|||||||
// Get setting as string
|
// Get setting as string
|
||||||
stringw getSetting(const stringw& key) const
|
stringw getSetting(const stringw& key) const
|
||||||
{
|
{
|
||||||
//the find function or irrmap returns a pointer to a map Node
|
//the find function of irr::map returns a pointer to a map::Node
|
||||||
//if the key can be found, otherwise it returns null
|
//if the key can be found, otherwise it returns null
|
||||||
//the map node has the function getValue and getKey, as we already know the key, we return node->getValue()
|
//the map node has the function getValue and getKey, as we already know the key, we return node->getValue()
|
||||||
map<stringw, stringw>::Node* n = SettingMap.find(key);
|
map<stringw, stringw>::Node* n = SettingMap.find(key);
|
||||||
@ -263,7 +263,7 @@ private:
|
|||||||
|
|
||||||
map<stringw, stringw> SettingMap; //current config
|
map<stringw, stringw> SettingMap; //current config
|
||||||
|
|
||||||
stringw SettingsFile; // location of the xml, usually the
|
stringw SettingsFile; // filename of the xml
|
||||||
irr::IrrlichtDevice* NullDevice;
|
irr::IrrlichtDevice* NullDevice;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -338,7 +338,7 @@ public:
|
|||||||
|
|
||||||
if (App.Settings->save())
|
if (App.Settings->save())
|
||||||
{
|
{
|
||||||
App.Gui->addMessageBox(L"settings save",L"settings saved, please restart for settings to change effect","",true);
|
App.Gui->addMessageBox(L"Settings saved",L"Settings saved, please restart for settings to change effect","",true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// cancel/exit button clicked, tell the application to exit
|
// cancel/exit button clicked, tell the application to exit
|
||||||
@ -375,7 +375,7 @@ void createSettingsDialog(SAppContext& app)
|
|||||||
app.Gui->getSkin()->setColor((irr::gui::EGUI_DEFAULT_COLOR)i, col);
|
app.Gui->getSkin()->setColor((irr::gui::EGUI_DEFAULT_COLOR)i, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
//create video settings windows
|
//create video settings window
|
||||||
gui::IGUIWindow* windowSettings = app.Gui->addWindow(rect<s32>(10,10,400,400),true,L"Videosettings");
|
gui::IGUIWindow* windowSettings = app.Gui->addWindow(rect<s32>(10,10,400,400),true,L"Videosettings");
|
||||||
app.Gui->addStaticText (L"Select your desired video settings", rect< s32 >(10,20, 200, 40), false, true, windowSettings);
|
app.Gui->addStaticText (L"Select your desired video settings", rect< s32 >(10,20, 200, 40), false, true, windowSettings);
|
||||||
|
|
||||||
@ -434,7 +434,7 @@ int main()
|
|||||||
param.WindowSize.set(640,480);
|
param.WindowSize.set(640,480);
|
||||||
|
|
||||||
// Try to load config.
|
// Try to load config.
|
||||||
// I leave it as an exercise of the reader to store the configuration in the local application data folder,
|
// I leave it as an exercise for the reader to store the configuration in the local application data folder,
|
||||||
// the only logical place to store config data for games. For all other operating systems I redirect to your manuals
|
// the only logical place to store config data for games. For all other operating systems I redirect to your manuals
|
||||||
app.Settings = new SettingManager(getExampleMediaPath() + "settings.xml");
|
app.Settings = new SettingManager(getExampleMediaPath() + "settings.xml");
|
||||||
if ( !app.Settings->load() )
|
if ( !app.Settings->load() )
|
||||||
@ -448,7 +448,7 @@ int main()
|
|||||||
//settings xml loaded from disk,
|
//settings xml loaded from disk,
|
||||||
|
|
||||||
//map driversetting to driver type and test if the setting is valid
|
//map driversetting to driver type and test if the setting is valid
|
||||||
//the DriverOptions map contains string representations mapped to to irrlicht E_DRIVER_TYPE enum
|
//the DriverOptions map contains string representations mapped to to Irrlicht E_DRIVER_TYPE enum
|
||||||
//e.g "direct3d9" will become 4
|
//e.g "direct3d9" will become 4
|
||||||
//see DriverOptions in the settingmanager class for details
|
//see DriverOptions in the settingmanager class for details
|
||||||
map<stringw, s32>::Node* driver = app.Settings->DriverOptions.find( app.Settings->getSetting("driver") );
|
map<stringw, s32>::Node* driver = app.Settings->DriverOptions.find( app.Settings->getSetting("driver") );
|
||||||
|
Loading…
Reference in New Issue
Block a user