98 CDialog::DoDataExchange(pDX);
204 owner->ResetContent();
207 name =
TheSidesList->getTeamInfo(i)->getDict()->getAsciiString(TheKey_teamName);
210 owner->AddString(name.
str());
216 name =
m_dictToEdit->getAsciiString(TheKey_originalOwner);
219 i = owner->FindStringExact(-1, name.
str());
233 name =
m_dictToEdit->getAsciiString(TheKey_objectName, &exists);
239 pItem->SetWindowText(name.
str());
255 pCombo->AddString(
"<none>");
259 pCombo->SelectString(-1,
"<none>");
261 pCombo->SelectString(-1, script.
str());
271 static char buf[1024];
272 owner->GetWindowText(buf,
sizeof(buf)-2);
295 owner->GetWindowText(cstr);
317 static char buf[1024];
318 owner->GetWindowText(buf,
sizeof(buf)-2);
350 edit->SetWindowText(cstr);
357 edit->EnableWindow(
false);
362 edit->EnableWindow(
TRUE);
381 pItem->SetCurSel(
value);
396 pItem->SetCurSel(
value);
405 static char buf[1024];
406 int curSel = owner->GetCurSel();
412 newDict.
setInt(TheKey_objectWeather, curSel);
426 static char buf[1024];
427 int curSel = owner->GetCurSel();
433 newDict.
setInt(TheKey_objectTime, curSel);
451 edit->GetWindowText(cstr);
452 if (!cstr.IsEmpty()) {
463 if (off->GetCheck() == 1) {
464 newDict.
remove(TheKey_objectPrototypeScale);
480 static char buff[12];
482 sprintf(buff,
"%0.2f", loc->
z);
484 edit->SetWindowText(buff);
493 edit->GetWindowText(cstr);
494 if (!cstr.IsEmpty()) {
512 static char buff[12];
513 sprintf(buff,
"%0.2f",
m_angle);
515 edit->SetWindowText(buff);
523 static char buff[12];
526 edit->SetWindowText(buff);
536 edit->GetWindowText(cstr);
537 if (!cstr.IsEmpty()) {
560 edit->GetWindowText(cstr);
564 if (!cstr.IsEmpty()) {
565 if (sscanf(cstr,
"%f, %f", &loc.
x, &loc.
y)!=2)
612 DEBUG_CRASH((
"Slider message from unknown control"));
625 static char buff[36];
636 edit->SetWindowText(buff);
646 sprintf(buff,
"%0.2f",
m_angle);
648 edit->SetWindowText(buff);
653 sprintf(buff,
"%0.2f",
m_scale);
655 edit->SetWindowText(buff);
660 DEBUG_CRASH((
"Slider message from unknown control"));
684 DEBUG_CRASH((
"Slider message from unknown control"));
729 }
while (!upgradeString.
isEmpty());
733 Int countOfItems = pBox->GetCount();
734 for (
Int i = 0; i < countOfItems; ++i) {
735 if (pBox->GetSel(i) > 0) {
738 pBox->GetText(i, selTxt);
768 pBox->ResetContent();
774 pBox->AddString(cstr);
789 Bool noUpgrades =
false;
796 pBox->AddString(cstr);
802 Int numBehaviorsWithUpgrades = 0;
804 for (
int i = 0; i < numBehaviorModules; ++i) {
812 if (pBox->FindString(-1, cstr) == LB_ERR) {
813 pBox->AddString(cstr);
814 ++numBehaviorsWithUpgrades;
820 if (numBehaviorsWithUpgrades == 0) {
823 pBox->AddString(cstr);
842 Int selNdx = pBox->FindStringExact(-1, upgradeString.
str());
843 if (selNdx == LB_ERR) {
844 DEBUG_CRASH((
"Object claims '%s', but it wasn't found in the list of possible upgrades.", upgradeString.
str()));
848 pBox->SetSel(selNdx);
851 upgradeString.
clear();
855 }
while (!upgradeString.
isEmpty());
869 if (pItem && pItem2) {
871 pItem->SelectString(-1,
"0%");
872 pItem2->SetWindowText(
"");
873 pItem2->EnableWindow(
FALSE);
874 }
else if (
value == 25) {
875 pItem->SelectString(-1,
"25%");
876 pItem2->SetWindowText(
"");
877 pItem2->EnableWindow(
FALSE);
878 }
else if (
value == 50) {
879 pItem->SelectString(-1,
"50%");
880 pItem2->SetWindowText(
"");
881 pItem2->EnableWindow(
FALSE);
882 }
else if (
value == 75) {
883 pItem->SelectString(-1,
"75%");
884 pItem2->SetWindowText(
"");
885 pItem2->EnableWindow(
FALSE);
886 }
else if (
value == 100) {
887 pItem->SelectString(-1,
"100%");
888 pItem2->SetWindowText(
"");
889 pItem2->EnableWindow(
FALSE);
891 pItem->SelectString(-1,
"Other");
892 static char buff[12];
893 sprintf(buff,
"%d",
value);
894 pItem2->SetWindowText(buff);
895 pItem2->EnableWindow(
TRUE);
913 pItem->ResetContent();
915 str.Format(
"Default For Unit");
916 pItem->InsertString(-1, str);
919 str.Format(
"%d",
value);
920 pItem->InsertString(-1, str);
933 enabled =
m_dictToEdit->getBool(TheKey_objectEnabled, &exists);
938 pItem->SetCheck(enabled);
946 Bool destructible =
true;
949 destructible =
m_dictToEdit->getBool(TheKey_objectIndestructible, &exists);
954 pItem->SetCheck(destructible);
961 Bool unsellable =
false;
964 unsellable =
m_dictToEdit->getBool(TheKey_objectUnsellable, &exists);
969 pItem->SetCheck(unsellable);
976 Bool targetable =
false;
980 targetable =
m_dictToEdit->getBool( TheKey_objectTargetable, &exists );
986 pItem->SetCheck( targetable );
996 powered =
m_dictToEdit->getBool(TheKey_objectPowered, &exists);
1001 pItem->SetCheck(powered);
1018 pItem->SelectString(-1,
"Sleep");
1019 }
else if (
value == -1) {
1020 pItem->SelectString(-1,
"Passive");
1021 }
else if (
value == 0) {
1022 pItem->SelectString(-1,
"Normal");
1023 }
else if (
value == 1) {
1024 pItem->SelectString(-1,
"Alert");
1025 }
else if (
value == 2) {
1026 pItem->SelectString(-1,
"Aggressive");
1037 distance =
m_dictToEdit->getInt(TheKey_objectVisualRange, &exists);
1042 static char buff[12];
1043 sprintf(buff,
"%d", distance);
1044 if (distance == 0) {
1045 pItem->SetWindowText(
"");
1047 pItem->SetWindowText(buff);
1063 pItem->SetCurSel(
value);
1073 distance =
m_dictToEdit->getInt(TheKey_objectShroudClearingDistance, &exists);
1078 static char buff[12];
1079 sprintf(buff,
"%d", distance);
1080 if (distance == 0) {
1081 pItem->SetWindowText(
"");
1083 pItem->SetWindowText(buff);
1091 Bool recruitableAI =
true;
1094 recruitableAI =
m_dictToEdit->getBool(TheKey_objectRecruitableAI, &exists);
1099 pItem->SetCheck(recruitableAI);
1106 Int selectable =
true;
1109 selectable =
m_dictToEdit->getBool(TheKey_objectSelectable, &exists);
1117 pItem->SetCheck(selectable);
1124 Real stoppingDistance = 1.0f;
1125 Bool exists =
false;
1127 stoppingDistance =
m_dictToEdit->getReal(TheKey_objectStoppingDistance, &exists);
1132 static char buff[12];
1133 sprintf(buff,
"%g", stoppingDistance);
1134 pItem->SetWindowText(buff);
1145 static char buf[1024];
1148 owner->GetWindowText(buf,
sizeof(buf)-2);
1149 if (strcmp(buf,
"Dead") == 0) {
1151 }
else if (strcmp(buf,
"25%") == 0) {
1153 }
else if (strcmp(buf,
"50%") == 0) {
1155 }
else if (strcmp(buf,
"75%") == 0) {
1157 }
else if (strcmp(buf,
"100%") == 0) {
1159 }
else if (strcmp(buf,
"Other") == 0) {
1161 edit->EnableWindow(
TRUE);
1163 edit->GetWindowText(cstr);
1164 if (cstr.IsEmpty()) {
1167 value = atoi(cstr.GetBuffer(0));
1173 newDict.
setInt(TheKey_objectInitialHealth,
value);
1188 Bool isChecked = (owner->GetCheck() != 0);
1194 newDict.
setBool(TheKey_objectEnabled, isChecked);
1208 Bool isChecked = (owner->GetCheck() != 0);
1214 newDict.
setBool(TheKey_objectIndestructible, isChecked);
1228 Bool isChecked = (owner->GetCheck() != 0);
1234 newDict.
setBool(TheKey_objectUnsellable, isChecked);
1248 Bool isChecked = owner->GetCheck() != 0;
1254 newDict.
setBool( TheKey_objectTargetable, isChecked );
1269 Bool isChecked = (owner->GetCheck() != 0);
1275 newDict.
setBool(TheKey_objectPowered, isChecked);
1289 static char buf[1024];
1290 owner->GetWindowText(buf,
sizeof(buf)-2);
1293 if (strcmp(buf,
"Sleep") == 0) {
1295 }
else if (strcmp(buf,
"Passive") == 0) {
1297 }
else if (strcmp(buf,
"Normal") == 0) {
1299 }
else if (strcmp(buf,
"Alert") == 0) {
1301 }
else if (strcmp(buf,
"Aggressive") == 0) {
1309 newDict.
setInt(TheKey_objectAggressiveness,
value);
1324 edit->EnableWindow(
TRUE);
1326 edit->GetWindowText(cstr);
1327 if (!cstr.IsEmpty()) {
1328 value = atoi(cstr.GetBuffer(0));
1351 static char buf[1024];
1352 int curSel = owner->GetCurSel();
1377 edit->EnableWindow(
TRUE);
1379 edit->GetWindowText(cstr);
1380 if (!cstr.IsEmpty()) {
1381 value = atoi(cstr.GetBuffer(0));
1389 newDict.
setInt(TheKey_objectShroudClearingDistance,
value);
1404 Bool isChecked = (owner->GetCheck() != 0);
1410 newDict.
setBool(TheKey_objectRecruitableAI, isChecked);
1424 Bool isChecked = (owner->GetCheck() == 1);
1425 Bool isTristate = (owner->GetCheck() == 2);
1432 newDict.
remove(TheKey_objectSelectable);
1434 newDict.
setBool(TheKey_objectSelectable, isChecked);
1449 static char buf[1024];
1452 owner->GetWindowText(buf,
sizeof(buf)-2);
1475 static char buf[1024];
1479 edit->GetWindowText(cstr);
1480 if (cstr.IsEmpty()) {
1483 value = atof(cstr.GetBuffer(0));
1509 PropEdit propDlg(&kstr, &type, &vstr,
true,
this);
1510 if (propDlg.DoModal() == IDOK)
1540 if (propDlg.DoModal() == IDOK)
1590static const Char NO_SOUND_STRING[] =
"(None)";
1591static const Char BASE_DEFAULT_STRING[] =
"Default";
1601 CDialog::OnInitDialog();
1635 if (!pMapObj->isSelected() || pMapObj->isWaypoint() || pMapObj->isLight()) {
1696void MapObjectProps::InitSound(
void)
1701 if ( priorityComboBox !=
NULL )
1707 DEBUG_ASSERTCRASH( index == i, (
"insert string returned %d, expected %d", index, i ) );
1717 if ( soundComboBox !=
NULL )
1723 AudioEventInfoHash::const_iterator it;
1724 for ( it = audioEventHash.begin(); it != audioEventHash.end(); it++ )
1729 soundComboBox->AddString( it->second->m_audioName.str() );
1737 soundComboBox->InsertString( 1, NO_SOUND_STRING );
1790 if ( soundComboBox ==
NULL )
1805 CString selectionText;
1806 soundComboBox->GetLBText( soundComboBox->GetCurSel(), selectionText );
1807 if ( selectionText == NO_SOUND_STRING )
1815 newDict.
setAsciiString(TheKey_objectSoundAmbient,
static_cast< const char *
>( selectionText) );
1837 if ( customizeCheckbox ==
NULL )
1848 if ( customizeCheckbox->GetCheck() == 1 )
1850 newDict.
setBool( TheKey_objectSoundAmbientCustomized,
true );
1871 if ( enabledCheckbox ==
NULL )
1881 newDict.
setBool( TheKey_objectSoundAmbientEnabled, enabledCheckbox->GetCheck() != 0 );
1894 if ( loopingCheckbox ==
NULL )
1904 newDict.
setBool( TheKey_objectSoundAmbientLooping, loopingCheckbox->GetCheck() != 0 );
1917 if ( loopCountEdit ==
NULL )
1927 CString loopCountString;
1928 loopCountEdit->GetWindowText(loopCountString);
1930 newDict.
setInt( TheKey_objectSoundAmbientLoopCount, atoi( loopCountString ) );
1943 if ( minVolumeEdit ==
NULL )
1953 CString minVolumeString;
1954 minVolumeEdit->GetWindowText(minVolumeString);
1957 newDict.
setReal( TheKey_objectSoundAmbientMinVolume,
INT_TO_REAL( atoi( minVolumeString ) ) / 100.0f );
1970 if ( volumeEdit ==
NULL )
1980 CString volumeString;
1981 volumeEdit->GetWindowText(volumeString);
1984 newDict.
setReal( TheKey_objectSoundAmbientVolume,
INT_TO_REAL( atoi( volumeString ) ) / 100.0f );
1998 if ( minRangeEdit ==
NULL )
2008 CString minRangeString;
2009 minRangeEdit->GetWindowText(minRangeString);
2011 newDict.
setReal( TheKey_objectSoundAmbientMinRange,
INT_TO_REAL( atoi( minRangeString ) ) );
2024 if ( maxRangeEdit ==
NULL )
2034 CString maxRangeString;
2035 maxRangeEdit->GetWindowText(maxRangeString);
2037 newDict.
setReal( TheKey_objectSoundAmbientMaxRange,
INT_TO_REAL( atoi( maxRangeString ) ) );
2050 if ( priorityComboBox ==
NULL )
2060 newDict.
setInt( TheKey_objectSoundAmbientPriority, priorityComboBox->GetCurSel() );
2074 if ( soundComboBox ==
NULL )
2087 if ( thingTemplate )
2100 defaultAudioEvent =
NULL;
2103 if ( defaultAudioEvent ==
NULL || defaultAudioEvent ==
TheAudio->getValidSilentAudioEvent() )
2105 string.concat(
" <None>" );
2109 string.concat(
" <" );
2111 string.concat(
'>' );
2124 Bool exists =
false;
2127 sound =
m_dictToEdit->getAsciiString(TheKey_objectSoundAmbient, &exists);
2140 sound = NO_SOUND_STRING;
2144 Int index = soundComboBox->FindStringExact( -1, sound.
str() );
2147 soundComboBox->SetCurSel( index );
2151 DEBUG_CRASH( (
"Could not find existing sound's name %s in combo box", sound.
str() ) );
2160 if ( customizeCheckbox ==
NULL )
2165 if ( soundComboBox ==
NULL )
2168 int index = soundComboBox->GetCurSel();
2169 CString currentString;
2170 soundComboBox->GetLBText( index, currentString );
2171 if ( currentString == NO_SOUND_STRING ||
2174 customizeCheckbox->SetCheck( 0 );
2175 customizeCheckbox->EnableWindow(
false );
2180 customizeCheckbox->EnableWindow(
true );
2182 Bool exists =
false;
2183 Bool customized =
false;
2186 customized =
m_dictToEdit->getBool(TheKey_objectSoundAmbientCustomized, &exists);
2189 customizeCheckbox->SetCheck( exists && customized ? 1 : 0 );
2197 if ( loopingCheckbox ==
NULL )
2202 if ( customizeCheckbox ==
NULL || customizeCheckbox->GetCheck() == 0 )
2204 loopingCheckbox->EnableWindow(
false );
2208 loopingCheckbox->EnableWindow(
true );
2212 Bool exists =
false;
2213 Bool looping =
false;
2216 looping =
m_dictToEdit->getBool(TheKey_objectSoundAmbientLooping, &exists);
2221 loopingCheckbox->SetCheck( looping ? 1 : 0 );
2231 if ( soundComboBox ==
NULL )
2233 loopingCheckbox->SetCheck( 0 );
2236 Int index = soundComboBox->GetCurSel();
2238 CString currentString;
2239 soundComboBox->GetLBText( index, currentString );
2242 loopingCheckbox->SetCheck( 0 );
2252 AudioEventInfo * audioEventInfo =
TheAudio->findAudioEventInfo(
static_cast< const char *
>( currentString ) );
2254 loopingCheckbox->SetCheck( ( audioEventInfo && ( audioEventInfo->
m_control &
AC_LOOP ) ) ? 1 : 0 );
2261 if ( loopCountEdit ==
NULL )
2268 if ( customizeCheckbox ==
NULL || customizeCheckbox->GetCheck() == 0 ||
2269 loopingCheckbox ==
NULL || loopingCheckbox->GetCheck() == 0 )
2271 loopCountEdit->EnableWindow(
false );
2275 loopCountEdit->EnableWindow(
true );
2279 Bool exists =
false;
2283 loopCount =
m_dictToEdit->getInt(TheKey_objectSoundAmbientLoopCount, &exists);
2288 CString loopCountText;
2289 loopCountText.Format(
"%d", loopCount );
2290 loopCountEdit->SetWindowText( loopCountText );
2300 if ( soundComboBox ==
NULL )
2302 loopCountEdit->SetWindowText(
"0" );
2306 Int index = soundComboBox->GetCurSel();
2308 CString currentString;
2309 soundComboBox->GetLBText( index, currentString );
2312 loopCountEdit->SetWindowText(
"0" );
2322 AudioEventInfo * audioEventInfo =
TheAudio->findAudioEventInfo(
static_cast< const char *
>( currentString ) );
2324 if ( audioEventInfo ==
NULL )
2326 loopCountEdit->SetWindowText(
"0" );
2330 CString loopCountText;
2331 loopCountText.Format(
"%d", audioEventInfo->
m_loopCount );
2332 loopCountEdit->SetWindowText( loopCountText );
2339 if ( enableCheckbox ==
NULL )
2345 CString currentString;
2346 if ( soundComboBox ==
NULL )
2348 enableCheckbox->EnableWindow(
false );
2349 enableCheckbox->SetCheck( 0 );
2353 Int soundIndex = soundComboBox->GetCurSel();
2354 soundComboBox->GetLBText( soundIndex, currentString );
2355 if ( currentString == NO_SOUND_STRING ||
2358 enableCheckbox->SetCheck( 0 );
2359 enableCheckbox->EnableWindow(
false );
2364 enableCheckbox->EnableWindow(
true );
2367 Bool exists =
false;
2368 Bool enabled =
false;
2371 enabled =
m_dictToEdit->getBool(TheKey_objectSoundAmbientEnabled, &exists);
2376 enableCheckbox->SetCheck( enabled ? 1 : 0 );
2393 if ( loopingCheckbox && loopCountEdit && loopingCheckbox->GetCheck() == 1 )
2396 loopCountEdit->GetWindowText( loopCount );
2398 if ( atoi(loopCount) == 0 )
2400 enableCheckbox->SetCheck( 1 );
2405 enableCheckbox->SetCheck( 0 );
2413 if ( minVolumeEdit ==
NULL )
2418 if ( customizeCheckbox ==
NULL || customizeCheckbox->GetCheck() == 0 )
2420 minVolumeEdit->EnableWindow(
false );
2424 minVolumeEdit->EnableWindow(
true );
2428 Bool exists =
false;
2429 Real minVolume = 0.0f;
2432 minVolume =
m_dictToEdit->getReal(TheKey_objectSoundAmbientMinVolume, &exists);
2438 CString minVolumeText;
2439 minVolumeText.Format(
"%d",
REAL_TO_INT( ( minVolume * 100.0f ) + 0.5 ) );
2440 minVolumeEdit->SetWindowText( minVolumeText );
2449 if ( soundComboBox ==
NULL )
2451 minVolumeEdit->SetWindowText(
"40" );
2455 Int index = soundComboBox->GetCurSel();
2457 CString currentString;
2458 soundComboBox->GetLBText( index, currentString );
2461 minVolumeEdit->SetWindowText(
"40" );
2471 AudioEventInfo * audioEventInfo =
TheAudio->findAudioEventInfo(
static_cast< const char *
>( currentString ) );
2473 if ( audioEventInfo ==
NULL )
2475 minVolumeEdit->SetWindowText(
"40" );
2480 CString minVolumeText;
2482 minVolumeEdit->SetWindowText( minVolumeText );
2489 if ( volumeEdit ==
NULL )
2494 if ( customizeCheckbox ==
NULL || customizeCheckbox->GetCheck() == 0 )
2496 volumeEdit->EnableWindow(
false );
2500 volumeEdit->EnableWindow(
true );
2504 Bool exists =
false;
2508 volume =
m_dictToEdit->getReal(TheKey_objectSoundAmbientVolume, &exists);
2515 volumeText.Format(
"%d",
REAL_TO_INT( ( volume * 100.0f ) + 0.5 ) );
2516 volumeEdit->SetWindowText( volumeText );
2525 if ( soundComboBox ==
NULL )
2527 volumeEdit->SetWindowText(
"100" );
2531 Int index = soundComboBox->GetCurSel();
2533 CString currentString;
2534 soundComboBox->GetLBText( index, currentString );
2537 volumeEdit->SetWindowText(
"100" );
2547 AudioEventInfo * audioEventInfo =
TheAudio->findAudioEventInfo(
static_cast< const char *
>( currentString ) );
2549 if ( audioEventInfo ==
NULL )
2551 volumeEdit->SetWindowText(
"100" );
2558 volumeEdit->SetWindowText( volumeText );
2566 if ( minRangeEdit ==
NULL )
2571 if ( customizeCheckbox ==
NULL || customizeCheckbox->GetCheck() == 0 )
2573 minRangeEdit->EnableWindow(
false );
2577 minRangeEdit->EnableWindow(
true );
2581 Bool exists =
false;
2582 Real minRange = 0.0f;
2585 minRange =
m_dictToEdit->getReal(TheKey_objectSoundAmbientMinRange, &exists);
2590 CString minRangeText;
2591 minRangeText.Format(
"%d",
REAL_TO_INT(minRange) );
2592 minRangeEdit->SetWindowText( minRangeText );
2601 if ( soundComboBox ==
NULL )
2603 minRangeEdit->SetWindowText(
"175" );
2607 Int index = soundComboBox->GetCurSel();
2609 CString currentString;
2610 soundComboBox->GetLBText( index, currentString );
2613 minRangeEdit->SetWindowText(
"175" );
2623 AudioEventInfo * audioEventInfo =
TheAudio->findAudioEventInfo(
static_cast< const char *
>( currentString ) );
2625 if ( audioEventInfo ==
NULL )
2627 minRangeEdit->SetWindowText(
"175" );
2631 CString minRangeText;
2633 minRangeEdit->SetWindowText( minRangeText );
2641 if ( maxRangeEdit ==
NULL )
2646 if ( customizeCheckbox ==
NULL || customizeCheckbox->GetCheck() == 0 )
2648 maxRangeEdit->EnableWindow(
false );
2652 maxRangeEdit->EnableWindow(
true );
2656 Bool exists =
false;
2657 Real maxRange = 0.0f;
2660 maxRange =
m_dictToEdit->getReal(TheKey_objectSoundAmbientMaxRange, &exists);
2665 CString maxRangeText;
2666 maxRangeText.Format(
"%d",
REAL_TO_INT( maxRange ) );
2667 maxRangeEdit->SetWindowText( maxRangeText );
2676 if ( soundComboBox ==
NULL )
2678 maxRangeEdit->SetWindowText(
"600" );
2682 Int index = soundComboBox->GetCurSel();
2684 CString currentString;
2685 soundComboBox->GetLBText( index, currentString );
2688 maxRangeEdit->SetWindowText(
"600" );
2698 AudioEventInfo * audioEventInfo =
TheAudio->findAudioEventInfo(
static_cast< const char *
>( currentString ) );
2700 if ( audioEventInfo ==
NULL )
2702 maxRangeEdit->SetWindowText(
"600" );
2706 CString maxRangeText;
2708 maxRangeEdit->SetWindowText( maxRangeText );
2715 if ( priorityComboBox ==
NULL )
2720 if ( customizeCheckbox ==
NULL || customizeCheckbox->GetCheck() == 0 )
2722 priorityComboBox->EnableWindow(
false );
2726 priorityComboBox->EnableWindow(
true );
2730 Bool exists =
false;
2734 priorityEnum =
m_dictToEdit->getInt(TheKey_objectSoundAmbientPriority, &exists);
2739 if ( priorityEnum < 0 || priorityEnum >
AP_CRITICAL )
2741 DEBUG_CRASH( (
"Bad soundAmbientPriority key %d", priorityEnum ) );
2746 priorityComboBox->SetCurSel( priorityEnum );
2755 if ( soundComboBox ==
NULL )
2757 priorityComboBox->SetCurSel(
AP_LOWEST );
2761 Int index = soundComboBox->GetCurSel();
2763 CString currentString;
2764 soundComboBox->GetLBText( index, currentString );
2767 priorityComboBox->SetCurSel(
AP_LOWEST );
2777 AudioEventInfo * audioEventInfo =
TheAudio->findAudioEventInfo(
static_cast< const char *
>( currentString ) );
2779 if ( audioEventInfo ==
NULL )
2781 priorityComboBox->SetCurSel(
AP_LOWEST );
2785 priorityComboBox->SetCurSel( audioEventInfo->
m_priority );
2815 theMapObj = pMapObj;
2820 if (selCount==1 && theMapObj) {
2853 if (pMapObj->isSelected() || pMapObj2->
isSelected()) {
2863 if (!pMapObj->isSelected() || pMapObj->isWaypoint() || pMapObj->isLight()) {
char * theAudioPriorityNames[]
char Char
Signed character (ASCII)
int Int
Signed integer value.
std::hash_map< AsciiString, AudioEventInfo *, rts::hash< AsciiString >, rts::equal_to< AsciiString > > AudioEventInfoHash
#define DEBUG_ASSERTLOG(c, m)
#define DEBUG_ASSERTCRASH(c, m)
@ FLAG_BRIDGE_POINT2
If set, is the second point in a bridge.
@ FLAG_BRIDGE_POINT1
If set, is the first point in a bridge.
NameKeyGenerator * TheNameKeyGenerator
just one namespace for now
NameKeyType NAMEKEY(const AsciiString &name)
SidesList * TheSidesList
singleton instance of SidesList
int compareNoCase(const AsciiString &stringSrc) const
void format(AsciiString format,...)
const AsciiString & getEventName(void) const
virtual const AudioEventInfoHash & getAllAudioEvents() const
COptionsPanel(Int dlgid=0, CWnd *pParent=NULL)
static CWorldBuilderDoc * GetActiveDoc()
void AddAndDoUndoable(Undoable *pUndo)
Real getNthReal(Int n) const
AsciiString getNthAsciiString(Int n) const
void setAsciiString(NameKeyType key, const AsciiString &value)
Bool getNthBool(Int n) const
DataType getNthType(Int n) const
void setBool(NameKeyType key, Bool value)
Bool remove(NameKeyType key)
Int getNthInt(Int n) const
UnicodeString getNthUnicodeString(Int n) const
NameKeyType getNthKey(Int n) const
void setInt(NameKeyType key, Int value)
void setReal(NameKeyType key, Real value)
AsciiString getAsciiString(NameKeyType key, Bool *exists=NULL) const
static Dict buildSingleItemDict(AsciiString k, Dict::DataType t, AsciiString v)
static Bool loadScripts(CComboBox *pCombo, Bool subr, AsciiString match=AsciiString::TheEmptyString)
UpgradeMuxData m_upgradeMuxData
const Coord3D * getLocation(void) const
Get the center point.
Dict * getProperties()
return the object's property sheet.
static MapObject * getFirstMapObject(void)
Bool getFlag(Int flag) const
Bool isWaypoint(void) const
MapObject * getNext(void) const
Next map object in the list. Not a copy, don't delete it.
Real getAngle(void) const
Get the angle.
Bool isSelected(void) const
void _DictToPrebuiltUpgrades(void)
Move data from object to dialog controls.
MapObject * m_selectedObject
void ShowZOffset(MapObject *pMapObj)
Move data from object to dialog controls.
afx_msg void OnSelchangeProperties()
afx_msg void minRangeToDict(void)
Move data from dialog controls to object(s)
void dictToAttachedSound(void)
Move data from object to dialog controls.
WBPopupSliderButton m_scaleSlider
afx_msg void _AggressivenessToDict(void)
Move data from dialog controls to object.
void ShowPosition(MapObject *pMapObj)
Move data from object to dialog controls.
void dictToCustomize(void)
Move data from object to dialog controls.
afx_msg void _NameToDict(void)
Move data from dialog controls to object.
virtual void PopSliderFinished(const long sliderID, long theVal)
Slider control.
void dictToPriority(void)
Move data from object to dialog controls.
void _DictToHPs(void)
Move data from object to dialog controls.
void _DictToUnsellable(void)
Move data from object to dialog controls.
ModifyObjectUndoable * m_posUndoable
afx_msg void _RecruitableAIToDict(void)
Move data from dialog controls to object.
afx_msg void _EnabledToDict(void)
Move data from dialog controls to object.
void _DictToTeam(void)
Move data from object to dialog controls.
virtual BOOL OnInitDialog()
Initialize dialog, especially drop down lists.
afx_msg void OnKillfocusMAPOBJECTXYPosition()
Move data from dialog controls to object.
WBPopupSliderButton m_angleSlider
afx_msg void _TeamToDict(void)
Move data from dialog controls to object.
afx_msg void _TimeToDict(void)
Move data from dialog controls to object.
void _DictToDestructible(void)
Move data from object to dialog controls.
afx_msg void OnRemoveprop()
std::vector< Dict * > m_allSelectedDicts
afx_msg void _HPsToDict()
Move data from dialog controls to object.
afx_msg void _PoweredToDict(void)
Move data from dialog controls to object.
afx_msg void attachedSoundToDict(void)
Move data from dialog controls to object(s)
void _DictToEnabled(void)
Move data from object to dialog controls.
void _DictToPowered(void)
Move data from object to dialog controls.
void _DictToTime(void)
Move data from object to dialog controls.
void dictToMinVolume(void)
Move data from object to dialog controls.
afx_msg void _ScaleToDict(void)
Move data from dialog controls to object.
afx_msg void OnScaleOn()
Move data from dialog controls to object.
void _DictToTargetable(void)
Move data from object to dialog controls.
afx_msg void loopCountToDict(void)
Move data from dialog controls to object(s)
static MapObject * getSingleSelectedMapObject(void)
virtual void PopSliderChanged(const long sliderID, long theVal)
Slider control.
afx_msg void SetAngle(void)
Move data from dialog controls to object.
afx_msg void _SelectableToDict(void)
Move data from dialog controls to object.
afx_msg void _VisibilityToDict(void)
Move data from dialog controls to object.
afx_msg void maxRangeToDict(void)
Move data from dialog controls to object(s)
afx_msg void OnEditprop()
void _DictToStoppingDistance(void)
Move data from object to dialog controls.
void _DictToSelectable(void)
Move data from object to dialog controls.
afx_msg void _ShroudClearingDistanceToDict(void)
Move data from dialog controls to object.
void clearCustomizeFlag(CWorldBuilderDoc *pDoc, MultipleUndoable *ownerUndoable)
afx_msg void loopingToDict(void)
Move data from dialog controls to object(s)
afx_msg void _HealthToDict(void)
Move data from dialog controls to object.
void _DictToShroudClearingDistance(void)
Move data from object to dialog controls.
void _DictToVisibilityRange(void)
Move data from object to dialog controls.
afx_msg void _UnsellableToDict(void)
Move data from dialog controls to object.
afx_msg void _StoppingDistanceToDict(void)
Move data from dialog controls to object.
void _DictToScale(void)
Move data from object to dialog controls.
virtual void DoDataExchange(CDataExchange *pDX)
afx_msg void _IndestructibleToDict(void)
Move data from dialog controls to object.
void getAllSelectedDicts(void)
afx_msg void priorityToDict(void)
Move data from dialog controls to object(s)
void dictToEnabled(void)
Move data from object to dialog controls.
void _DictToWeather(void)
Move data from object to dialog controls.
void _DictToHealth(void)
Move data from object to dialog controls.
WBPopupSliderButton m_heightSlider
MapObjectProps(Dict *dictToEdit=NULL, const char *title=NULL, CWnd *pParent=NULL)
void _DictToScript(void)
Move data from object to dialog controls.
afx_msg void SetZOffset(void)
Move data from dialog controls to object.
static MapObjectProps * TheMapObjectProps
void _DictToVeterancy(void)
Move data from object to dialog controls.
void dictToLooping(void)
Move data from object to dialog controls.
afx_msg void _VeterancyToDict(void)
Move data from dialog controls to object.
afx_msg void _WeatherToDict(void)
Move data from dialog controls to object.
void dictToLoopCount(void)
Move data from object to dialog controls.
void _DictToAggressiveness(void)
Move data from object to dialog controls.
afx_msg void _PrebuiltUpgradesToDict(void)
Move data from dialog controls to object.
afx_msg void enabledToDict(void)
Move data from dialog controls to object(s)
afx_msg void volumeToDict(void)
Move data from dialog controls to object(s)
void _DictToName(void)
Move data from object to dialog controls.
void dictToVolume(void)
Move data from object to dialog controls.
afx_msg void customizeToDict(void)
Move data from dialog controls to object(s)
afx_msg void SetPosition(void)
Move data from dialog controls to object.
afx_msg void _TargetableToDict()
Move data from dialog controls to object.
afx_msg void minVolumeToDict(void)
Move data from dialog controls to object(s)
AsciiString m_defaultEntryName
afx_msg void OnDblclkProperties()
void _DictToRecruitableAI()
Move data from object to dialog controls.
void ShowAngle(MapObject *pMapObj)
Move data from object to dialog controls.
afx_msg void _ScriptToDict(void)
Move data from dialog controls to object.
afx_msg void OnScaleOff()
Move data from dialog controls to object.
virtual void GetPopSliderInfo(const long sliderID, long *pMin, long *pMax, long *pLineSize, long *pInitial)
Slider control.
void dictToMaxRange(void)
Move data from object to dialog controls.
void dictToMinRange(void)
Move data from object to dialog controls.
void SetOffset(Real x, Real y)
Sets the offset for all the objects in the move list, and moves them there.
void RotateTo(Real angle)
Set the angle for all objects in the move list.
AsciiString getNthName(Int i) const
const ModuleData * getNthData(Int i) const
void addUndoable(Undoable *undoable)
Bool hasSoundAmbient() const
const ModuleInfo & getBehaviorModuleInfo() const
const AudioEventRTS * getSoundAmbient() const
const WideChar * str() const
std::vector< AsciiString > m_activationUpgradeNames
const Int RESIZE_PAGE_MESSAGE
const char * NEUTRAL_TEAM_INTERNAL_STR
const char * NEUTRAL_TEAM_UI_STR
#define REF_PTR_RELEASE(x)