本文整理汇总了C++中gd::Project::GetVariables方法的典型用法代码示例。如果您正苦于以下问题:C++ Project::GetVariables方法的具体用法?C++ Project::GetVariables怎么用?C++ Project::GetVariables使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gd::Project
的用法示例。
在下文中一共展示了Project::GetVariables方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadFromProject
void RuntimeGame::LoadFromProject(const gd::Project& project) {
// Copy inherited project
gd::Project::operator=(project);
variables.Merge(project.GetVariables());
soundManager.SetResourcesManager(&GetResourcesManager());
}
示例2: LaunchEditor
//.........这里部分代码省略.........
if ( retour == 3 )
editCtrl->ChangeValue("-");
if ( retour == 4 )
editCtrl->ChangeValue("*");
if ( retour == 5 )
editCtrl->ChangeValue("/");
return;
}
else if ( metadata.GetType() == "password" )
{
GeneratePassword dialog(parent);
if ( dialog.ShowModal() == 1 )
editCtrl->ChangeValue(dialog.mdp);
return;
}
else if ( metadata.GetType() == "trueorfalse" )
{
TrueOrFalse dialog(parent, _("Choose True or False to fill the parameter"), _("True or False"));
if ( dialog.ShowModal() == 1 )
editCtrl->ChangeValue(_("True"));
else
editCtrl->ChangeValue(_("False"));
}
else if ( metadata.GetType() == "yesorno" )
{
if (wxMessageBox(_("Choose yes or no to fullfil parent parameter:"), _("Yes or no") ,wxYES_NO ) == wxYES)
editCtrl->ChangeValue(_("yes"));
else
editCtrl->ChangeValue(_("no"));
return;
}
else if ( metadata.GetType() == "layer" )
{
gd::ChooseLayerDialog dialog(parent, layout);
if( dialog.ShowModal() == 1 )
editCtrl->ChangeValue(dialog.GetChosenLayer());
return;
}
else if ( metadata.GetType() == "joyaxis" )
{
ChoiceJoyAxis dialog(parent, editCtrl->GetValue(), project, layout);
if( dialog.ShowModal() == 1 )
editCtrl->ChangeValue(dialog.joyaxis);
return;
}
else if ( metadata.GetType() == "file" )
{
ChoiceFile dialog(parent, editCtrl->GetValue(), project, layout);
if ( dialog.ShowModal() == 1 )
editCtrl->ChangeValue(dialog.file);
return;
}
else if ( metadata.GetType() == "objectvar" )
{
if ( paramEdits.empty() ) return;
gd::String objectWanted = paramEdits[0]->GetValue();
gd::Object * object = NULL;
if ( layout.HasObjectNamed(objectWanted) )
object = &layout.GetObject(objectWanted);
else if ( project.HasObjectNamed(objectWanted) )
object = &project.GetObject(objectWanted);
else
return;
gd::ChooseVariableDialog dialog(parent, object->GetVariables());
dialog.SetAssociatedObject(&project, &layout, object);
if ( dialog.ShowModal() == 1 )
editCtrl->ChangeValue(dialog.GetSelectedVariable());
return;
}
else if ( metadata.GetType() == "scenevar" )
{
gd::ChooseVariableDialog dialog(parent, layout.GetVariables());
dialog.SetAssociatedLayout(&project, &layout);
if ( dialog.ShowModal() == 1 )
editCtrl->ChangeValue(dialog.GetSelectedVariable());
return;
}
else if ( metadata.GetType() == "globalvar" )
{
gd::ChooseVariableDialog dialog(parent, project.GetVariables());
dialog.SetAssociatedProject(&project);
if ( dialog.ShowModal() == 1 )
editCtrl->ChangeValue(dialog.GetSelectedVariable());
return;
}
}