-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scripting: Added tiled.color to create color values
Supported forms are tiled.color(name), which supports for example "red" or "#ff0000" as color names, or tiled.color(r,g,b,a), with values from 0-1. Unfortunately, the similar Qt.color and Qt.rgba functions can't be used because they require the QtQuick module to be loaded (see QQuickColorProvider in src/quick/util/qquickglobal.cpp). They would work only when the Tiled extensions were written in QML and imported the QtQuick module. Tiled could provide its own QQmlColorProvider implementation, but not without relying on private Qt headers. Object.setColorProperty is now no longer necessary and has hence been deprecated.
- Loading branch information
Showing
4 changed files
with
55 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters