Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow exporting enums from GDScript #12952

Merged
merged 1 commit into from
Nov 20, 2017

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