@@ -72,6 +72,9 @@ MAU::MAU(QWidget *parent)
7272 ui->comboEventsType ->addItems (m_knownEventTypes);
7373 ui->comboEventsVarType ->addItems (m_knownVarTypes);
7474 ui->comboEventsVarType ->addItems (m_knownEnumTypes.keys ());
75+ ui->comboEventsAttackHitReaction ->addItems (m_knownEnumTypes[" EHitReactionType" ]);
76+ ui->comboEventsAttackSwingDir ->addItems (m_knownEnumTypes[" EAttackSwingDirection" ]);
77+ ui->comboEventsAttackSwingType ->addItems (m_knownEnumTypes[" EAttackSwingType" ]);
7578 ui->stackEventsValue ->widget (0 )->setProperty (" type" , QString (" Bool" ));
7679 ui->stackEventsValue ->widget (1 )->setProperty (" type" , QString (" Int32" ));
7780 ui->stackEventsValue ->widget (2 )->setProperty (" type" , QString (" Float" ));
@@ -84,11 +87,11 @@ MAU::MAU(QWidget *parent)
8487 addEventsVarControl (ui->checkEventsVarEnumValue , ui->spinEventsEnumValue );
8588 addEventsVarControl (ui->checkEventsVarAttackName , ui->lineEventsAttackName );
8689 addEventsVarControl (ui->checkEventsVarAttackWeaponSlot , ui->lineEventsAttackWeaponSlot );
87- addEventsVarControl (ui->checkEventsVarAttackSwingType , ui->spinEventsAttackSwingType );
88- addEventsVarControl (ui->checkEventsVarAttackSwingDir , ui->spinEventsAttackSwingDir );
90+ addEventsVarControl (ui->checkEventsVarAttackSwingType , ui->comboEventsAttackSwingType );
91+ addEventsVarControl (ui->checkEventsVarAttackSwingDir , ui->comboEventsAttackSwingDir );
8992 addEventsVarControl (ui->checkEventsVarAttackSound , ui->lineEventsAttackSound );
9093 addEventsVarControl (ui->checkEventsVarAttackRange , ui->lineEventsAttackRange );
91- addEventsVarControl (ui->checkEventsVarAttackHitReaction , ui->spinEventsAttackHitReaction );
94+ addEventsVarControl (ui->checkEventsVarAttackHitReaction , ui->comboEventsAttackHitReaction );
9295 addEventsVarControl (ui->checkEventsVarAttackCanParry , ui->checkEventsAttackCanParry );
9396 addEventsVarControl (ui->checkEventsVarAttackCanBeDodged , ui->checkEventsAttackCanBeDodged );
9497 addEventsVarControl (ui->checkEventsVarAttackDamageNeutral , ui->checkEventsAttackDamageNeutral );
@@ -1209,8 +1212,10 @@ void MAU::eventsUpdateContentData(QHash<QString, QVariant>& map, QCheckBox* pCon
12091212 qobject_cast<QDoubleSpinBox*>(pElement)->setValue ( val.toFloat () );
12101213 } else if (type == " StringAnsi" || type == " CName" ) {
12111214 qobject_cast<QLineEdit*>(pElement)->setText ( val.toString () );
1215+ } else if (m_knownEnumTypes.contains (type)) {
1216+ qobject_cast<QComboBox*>(pElement)->setCurrentIndex ( val.toInt () );
12121217 } else {
1213- qDebug () << QString (" eventsUpdateContentData: unknown type %1 for key %2" ).arg (type).arg (key);
1218+ addLog ( QString (" eventsUpdateContentData: unknown type %1 for key %2. " ).arg (type).arg (key), logError );
12141219 }
12151220}
12161221void MAU::eventsLoadContentData (QHash<QString, QVariant>& map, QCheckBox* pController, QString key, QString type) {
@@ -1227,6 +1232,8 @@ void MAU::eventsLoadContentData(QHash<QString, QVariant>& map, QCheckBox* pContr
12271232 map[key] = qobject_cast<QDoubleSpinBox*>(pElement)->value ();
12281233 } else if (type == " StringAnsi" || type == " CName" ) {
12291234 map[key] = qobject_cast<QLineEdit*>(pElement)->text ();
1235+ } else if (m_knownEnumTypes.contains (type)) {
1236+ map[key] = qobject_cast<QComboBox*>(pElement)->currentIndex ();
12301237 } else {
12311238 qDebug () << QString (" eventsLoadContentData: unknown type %1 for key %2" ).arg (type).arg (key);
12321239 }
@@ -1295,16 +1302,16 @@ void MAU::onChanged_eventContentRow(int newRow) {
12951302 eventsUpdateContentData (map, ui->checkEventsVarAttackName , " attackName" , " CName" );
12961303 eventsUpdateContentData (map, ui->checkEventsVarAttackRange , " rangeName" , " CName" );
12971304 eventsUpdateContentData (map, ui->checkEventsVarAttackWeaponSlot , " weaponSlot" , " CName" );
1298- eventsUpdateContentData (map, ui->checkEventsVarAttackHitReaction , " hitReactionType" , " Int32 " );
1305+ eventsUpdateContentData (map, ui->checkEventsVarAttackHitReaction , " hitReactionType" , " EHitReactionType " );
12991306 eventsUpdateContentData (map, ui->checkEventsVarAttackDamageFriendly , " Damage_Friendly" , " Bool" );
13001307 eventsUpdateContentData (map, ui->checkEventsVarAttackDamageNeutral , " Damage_Neutral" , " Bool" );
13011308 eventsUpdateContentData (map, ui->checkEventsVarAttackCanParry , " Can_Parry_Attack" , " Bool" );
13021309 eventsUpdateContentData (map, ui->checkEventsVarAttackHitFx , " hitFX" , " CName" );
13031310 eventsUpdateContentData (map, ui->checkEventsVarAttackHitBackFx , " hitBackFX" , " CName" );
13041311 eventsUpdateContentData (map, ui->checkEventsVarAttackHitParriedFx , " hitParriedFX" , " CName" );
13051312 eventsUpdateContentData (map, ui->checkEventsVarAttackHitBackParriedFx , " hitBackParriedFX" , " CName" );
1306- eventsUpdateContentData (map, ui->checkEventsVarAttackSwingType , " swingType" , " Int32 " );
1307- eventsUpdateContentData (map, ui->checkEventsVarAttackSwingDir , " swingDir" , " Int32 " );
1313+ eventsUpdateContentData (map, ui->checkEventsVarAttackSwingType , " swingType" , " EAttackSwingType " );
1314+ eventsUpdateContentData (map, ui->checkEventsVarAttackSwingDir , " swingDir" , " EAttackSwingDirection " );
13081315 eventsUpdateContentData (map, ui->checkEventsVarAttackSound , " soundAttackType" , " CName" );
13091316 eventsUpdateContentData (map, ui->checkEventsVarAttackCanBeDodged , " canBeDodged" , " Bool" );
13101317 }
@@ -1437,16 +1444,16 @@ void MAU::onChanged_eventsVarAny() {
14371444 eventsLoadContentData (map, ui->checkEventsVarAttackName , " attackName" , " CName" );
14381445 eventsLoadContentData (map, ui->checkEventsVarAttackRange , " rangeName" , " CName" );
14391446 eventsLoadContentData (map, ui->checkEventsVarAttackWeaponSlot , " weaponSlot" , " CName" );
1440- eventsLoadContentData (map, ui->checkEventsVarAttackHitReaction , " hitReactionType" , " Int32 " );
1447+ eventsLoadContentData (map, ui->checkEventsVarAttackHitReaction , " hitReactionType" , " EHitReactionType " );
14411448 eventsLoadContentData (map, ui->checkEventsVarAttackDamageFriendly , " Damage_Friendly" , " Bool" );
14421449 eventsLoadContentData (map, ui->checkEventsVarAttackDamageNeutral , " Damage_Neutral" , " Bool" );
14431450 eventsLoadContentData (map, ui->checkEventsVarAttackCanParry , " Can_Parry_Attack" , " Bool" );
14441451 eventsLoadContentData (map, ui->checkEventsVarAttackHitFx , " hitFX" , " CName" );
14451452 eventsLoadContentData (map, ui->checkEventsVarAttackHitBackFx , " hitBackFX" , " CName" );
14461453 eventsLoadContentData (map, ui->checkEventsVarAttackHitParriedFx , " hitParriedFX" , " CName" );
14471454 eventsLoadContentData (map, ui->checkEventsVarAttackHitBackParriedFx , " hitBackParriedFX" , " CName" );
1448- eventsLoadContentData (map, ui->checkEventsVarAttackSwingType , " swingType" , " Int32 " );
1449- eventsLoadContentData (map, ui->checkEventsVarAttackSwingDir , " swingDir" , " Int32 " );
1455+ eventsLoadContentData (map, ui->checkEventsVarAttackSwingType , " swingType" , " EAttackSwingType " );
1456+ eventsLoadContentData (map, ui->checkEventsVarAttackSwingDir , " swingDir" , " EAttackSwingDirection " );
14501457 eventsLoadContentData (map, ui->checkEventsVarAttackSound , " soundAttackType" , " CName" );
14511458 eventsLoadContentData (map, ui->checkEventsVarAttackCanBeDodged , " canBeDodged" , " Bool" );
14521459 contentEntry = varToEntry ( entryName, QVariant::fromValue (map), entryType );
0 commit comments