Implemented actions widget and editing functionalities

This commit is contained in:
feedc0de committed 2022-01-14 21:21:17 +01:00
1 parent 8d45958d45
commit 0b4c275dfc
464 files changed
+36929 -439

No files matched your search

+23 -2
View File
@@ -77,26 +77,47 @@ struct Font
} range;
};
struct Action {
enum class AppliesTo {
Self,
Other,
Object
};
QString script;
AppliesTo appliesTo{AppliesTo::Self};
};
using ActionsContainer = std::array<Action, 1>;
struct TimeLine
{
using moment_key_t = int;
using moments_container_t = std::map<moment_key_t, ActionsContainer>;
QString name;
moments_container_t moments;
};
struct Object
{
enum class EventType {
Create,
Destroy,
Step,
Destroy
Draw,
};
using events_container_t = std::map<EventType, ActionsContainer>;
QString name;
QString spriteName;
bool visible{true};
bool solid{};
int depth{};
bool persistent{};
std::map<EventType, QString> events;
events_container_t events;
};
struct Room