summaryrefslogtreecommitdiffstats
path: root/IconDummy.c4d/Script.c
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2018-10-31 16:49:19 +0100
committerMarkus Mittendrein <git@maxmitti.tk>2018-10-31 16:49:19 +0100
commit5426330c7560610843228758684e886d5d672b9c (patch)
tree8b1f8be89abd8f0040ef252487ed3b6cd190b335 /IconDummy.c4d/Script.c
parentc820da04c3653adc43913d567a8e3cfed71cba45 (diff)
downloadDTMenuDebug.c4d-5426330c7560610843228758684e886d5d672b9c.tar.gz
DTMenuDebug.c4d-5426330c7560610843228758684e886d5d672b9c.zip
Add Menu_Closable allows menus to be closed without returning Menu_React_Close in the callbacks (was broken since always setting the native menu to permanent)
Rename Symbol -> Icon, InfoCaption -> Description and Caption to Title or Text (Menu_Title, but Menu_Entry_Text) Add Menu_InstantDescription (shows the description of the current entry instantly in a separate dialog) Fix deletion of object icons (the object was always deleted regardless if specified or not)
Diffstat (limited to 'IconDummy.c4d/Script.c')
-rw-r--r--IconDummy.c4d/Script.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/IconDummy.c4d/Script.c b/IconDummy.c4d/Script.c
new file mode 100644
index 0000000..58e5f2e
--- /dev/null
+++ b/IconDummy.c4d/Script.c
@@ -0,0 +1,16 @@
+#strict 2
+
+static const DT_Menu_IconDummy = ID7I;
+
+func SetIcon(id icon, int nr)
+{
+ SetGraphics(0, this, icon);
+ SetPicture(GetDefCoreVal("Picture", "DefCore", icon, 0) + nr * GetDefCoreVal("Picture", "DefCore", icon, 2), GetDefCoreVal("Picture", "DefCore", icon, 1), GetDefCoreVal("Picture", "DefCore", icon, 2), GetDefCoreVal("Picture", "DefCore", icon, 3));
+ return this;
+}
+
+func SetColor(int color)
+{
+ SetClrModulation(color);
+ return this;
+}