1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Cosmetic fixes for map editor

This commit is contained in:
nordsoft 2023-10-11 23:28:10 +02:00
parent 14b030d2eb
commit 3199b7261f
2 changed files with 16 additions and 0 deletions

View File

@ -410,6 +410,14 @@ void Inspector::updateProperties(CGSeerHut * o)
} }
} }
void Inspector::updateProperties(CGQuestGuard * o)
{
if(!o || !o->quest) return;
addProperty("Reward", PropertyEditorPlaceholder(), nullptr, true);
addProperty("Repeat quest", o->quest->repeatedQuest, true);
}
void Inspector::updateProperties() void Inspector::updateProperties()
{ {
if(!obj) if(!obj)
@ -452,6 +460,7 @@ void Inspector::updateProperties()
UPDATE_OBJ_PROPERTIES(CGPandoraBox); UPDATE_OBJ_PROPERTIES(CGPandoraBox);
UPDATE_OBJ_PROPERTIES(CGEvent); UPDATE_OBJ_PROPERTIES(CGEvent);
UPDATE_OBJ_PROPERTIES(CGSeerHut); UPDATE_OBJ_PROPERTIES(CGSeerHut);
UPDATE_OBJ_PROPERTIES(CGQuestGuard);
table->show(); table->show();
} }
@ -498,6 +507,7 @@ void Inspector::setProperty(const QString & key, const QVariant & value)
SET_PROPERTIES(CGPandoraBox); SET_PROPERTIES(CGPandoraBox);
SET_PROPERTIES(CGEvent); SET_PROPERTIES(CGEvent);
SET_PROPERTIES(CGSeerHut); SET_PROPERTIES(CGSeerHut);
SET_PROPERTIES(CGQuestGuard);
} }
void Inspector::setProperty(CArmedInstance * o, const QString & key, const QVariant & value) void Inspector::setProperty(CArmedInstance * o, const QString & key, const QVariant & value)
@ -681,6 +691,11 @@ void Inspector::setProperty(CGSeerHut * o, const QString & key, const QVariant &
o->quest->lastDay = value.toString().toInt(); o->quest->lastDay = value.toString().toInt();
} }
void Inspector::setProperty(CGQuestGuard * o, const QString & key, const QVariant & value)
{
if(!o) return;
}
//===============IMPLEMENT PROPERTY VALUE TYPE============================ //===============IMPLEMENT PROPERTY VALUE TYPE============================
QTableWidgetItem * Inspector::addProperty(CGObjectInstance * value) QTableWidgetItem * Inspector::addProperty(CGObjectInstance * value)

View File

@ -82,6 +82,7 @@ protected:
DECLARE_OBJ_PROPERTY_METHODS(CGPandoraBox); DECLARE_OBJ_PROPERTY_METHODS(CGPandoraBox);
DECLARE_OBJ_PROPERTY_METHODS(CGEvent); DECLARE_OBJ_PROPERTY_METHODS(CGEvent);
DECLARE_OBJ_PROPERTY_METHODS(CGSeerHut); DECLARE_OBJ_PROPERTY_METHODS(CGSeerHut);
DECLARE_OBJ_PROPERTY_METHODS(CGQuestGuard);
//===============DECLARE PROPERTY VALUE TYPE============================== //===============DECLARE PROPERTY VALUE TYPE==============================
QTableWidgetItem * addProperty(unsigned int value); QTableWidgetItem * addProperty(unsigned int value);