This file contains hidden or 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
| # Author: Steven J. Bethard <[email protected]>. | |
| # New maintainer as of 29 August 2019: Raymond Hettinger <[email protected]> | |
| #Command-line parsing library | |
| # | |
| #This module is an optparse-inspired command-line parsing library that: | |
| # | |
| #- handles both optional and positional arguments | |
| #- produces highly informative usage messages | |
| #- supports parsers that dispatch to sub-parsers |
This file contains hidden or 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
| tool | |
| extends Resource | |
| class_name LocaleNameList | |
| var data: Dictionary | |
| func _init() -> void: | |
| for locale in TranslationServer.get_loaded_locales(): | |
| if not locale in data: |
This file contains hidden or 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
| static func int2hex(num: int) -> String: | |
| num &= 0xFFFFFFFF | |
| var s := "0123456789abcdef" | |
| var res := "" | |
| var mask := 0b1111 | |
| while num > 0: | |
| res = res.insert(0, s[num & mask]) | |
| num >>= 4 | |
| return res if res else "0" |