From 12cb1b9cf9a448811b551e1bc40abfc2d928cdeb Mon Sep 17 00:00:00 2001 From: Yuxiao Mao Date: Wed, 24 Apr 2024 11:25:37 +0200 Subject: [PATCH] Haxe: fix deprecated @:enum abstract --- libs/golden/Config.hx | 2 +- libs/monaco/KeyCode.hx | 3 +-- libs/nw/Clipboard.hx | 2 +- libs/nw/Menu.hx | 2 +- libs/nw/MenuItem.hx | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/libs/golden/Config.hx b/libs/golden/Config.hx index 891fc9e24..23283e867 100644 --- a/libs/golden/Config.hx +++ b/libs/golden/Config.hx @@ -31,7 +31,7 @@ typedef Config = { @:optional var content: Array; }; -@:enum abstract ItemType(String) { +enum abstract ItemType(String) { var Row = "row"; var Column = "column"; var Stack = "stack"; diff --git a/libs/monaco/KeyCode.hx b/libs/monaco/KeyCode.hx index 8fb37cac4..a87e210fe 100644 --- a/libs/monaco/KeyCode.hx +++ b/libs/monaco/KeyCode.hx @@ -1,7 +1,6 @@ package monaco; -@:enum -abstract KeyCode(Int) from Int to Int { +enum abstract KeyCode(Int) from Int to Int { var Unknown = 0; var Backspace = 1; var Tab = 2; diff --git a/libs/nw/Clipboard.hx b/libs/nw/Clipboard.hx index e20991983..a4149b4d2 100644 --- a/libs/nw/Clipboard.hx +++ b/libs/nw/Clipboard.hx @@ -1,6 +1,6 @@ package nw; -@:enum abstract ClipboardType(String) { +enum abstract ClipboardType(String) { var Text = "text"; var Png = "png"; var Jpeg = "jpeg"; diff --git a/libs/nw/Menu.hx b/libs/nw/Menu.hx index a09428352..ec3a1663d 100644 --- a/libs/nw/Menu.hx +++ b/libs/nw/Menu.hx @@ -1,6 +1,6 @@ package nw; -@:enum abstract MenuType(String) { +enum abstract MenuType(String) { var Menubar = "menubar"; var ContextMenu = "contextmenu"; } diff --git a/libs/nw/MenuItem.hx b/libs/nw/MenuItem.hx index 2430da215..ad05ee054 100644 --- a/libs/nw/MenuItem.hx +++ b/libs/nw/MenuItem.hx @@ -1,6 +1,6 @@ package nw; -@:enum abstract MenuItemType(String) { +enum abstract MenuItemType(String) { var Normal = "normal"; var Checkbox = "checkbox"; var Separator = "separator";