Skip to content

Allow exporting enums from GDScript#12952

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
bojidar-bg:12392-export-enums
Nov 20, 2017
Merged

Allow exporting enums from GDScript#12952
akien-mga merged 1 commit intogodotengine:masterfrom
bojidar-bg:12392-export-enums

Conversation

@bojidar-bg
Copy link
Contributor

Examples:

enum Tile {TILE_AIR = 0, TILE_BLOCK, TILE_ICE}
export(Tile) var tile_type = TILE_AIR

export({user = 0, moderator = 50, admin = 100}) var role = 100
export({"user": 0, "moderator": 50, "admin": 100}) var role_alt = 100

const Utils = {"Util 1": 0, "Util 2": 1, "Util 3": 10}
export(Utils) var util

Closes #12392

@akien-mga
Copy link
Member

MSVC doesn't like those:

scene\gui\tree.cpp(158): error C2065: 'INT32_MAX': undeclared identifier
scene\gui\tree.cpp(159): error C2065: 'INT32_MIN': undeclared identifier

@bojidar-bg
Copy link
Contributor Author

Eh? Just don't use MSVC 😉

@akien-mga
Copy link
Member

Needs rebase after #12969, sorry :)

@akien-mga akien-mga merged commit 7b5c447 into godotengine:master Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants