refactor enums: CursorShape, InterpolationType, ParticleSpawnShape

This commit is contained in:
MihailRis
2025-04-13 14:18:50 +03:00
parent 7749675a61
commit 3be8546bf4
9 changed files with 44 additions and 91 deletions
+4 -2
View File
@@ -1,3 +1,4 @@
#define VC_ENABLE_REFLECTION
#include "gui_xml.hpp"
#include <stdexcept>
@@ -168,8 +169,9 @@ static void read_uinode(
node.setTooltipDelay(element.attr("tooltip-delay").asFloat());
}
if (element.has("cursor")) {
if (auto cursor = CursorShape_from(element.attr("cursor").getText())) {
node.setCursor(*cursor);
CursorShape cursor;
if (CursorShapeMeta.getItem(element.attr("cursor").getText(), cursor)) {
node.setCursor(cursor);
}
}