mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Add British flags to the Flag effect (#1264)
* add britisch flags to flag.py adding the flags of England, Scotland and the United Kingdom to flag.py * adding British flags to flag.schema.json adding the flag of Great Britain (gb), England (gb-eng) and Scotland (gb-sct) to the GUI * added flag updates to CHANGELOG.md mentioning the Britisch flags as well as Cameroon and Russia
This commit is contained in:
@@ -184,6 +184,32 @@ def printFlag(country):
|
||||
hyperion.imageSolidFill(0, int(iH*0.33), iW, int(iH*0.33), 0, 57, 166)
|
||||
hyperion.imageSolidFill(0, int(iH*0.66), iW, iH, 213, 43, 30)
|
||||
|
||||
# gb-eng flag (England)
|
||||
if country == "gb-eng":
|
||||
hyperion.imageSolidFill(255, 255, 255)
|
||||
hyperion.imageDrawLine(0, int(iH*0.50), iW, int(iH*0.50), int(iW*0.10), 255, 0, 0)
|
||||
hyperion.imageDrawLine(int(iW*0.50), 0, int(iW*0.50), iH, int(iW*0.10), 255, 0, 0)
|
||||
|
||||
# gb-sct flag (Scotland)
|
||||
if country == "gb-sct":
|
||||
hyperion.imageSolidFill(0, 0, 255)
|
||||
hyperion.imageDrawLine(0, 0, iW, iH, int(iW*0.15), 255, 255, 255)
|
||||
hyperion.imageDrawLine(0, iH, iW, 0, int(iW*0.15), 255, 255, 255)
|
||||
|
||||
# gb flag (United Kingdom)
|
||||
if country == "gb":
|
||||
hyperion.imageSolidFill(0, 0, 255)
|
||||
hyperion.imageDrawLine(0, int(iH*0.50), iW, int(iH*0.50), int(iW*0.25), 255, 255, 255)
|
||||
hyperion.imageDrawLine(int(iW*0.50), 0, int(iW*0.50), iH, int(iW*0.25), 255, 255, 255)
|
||||
hyperion.imageDrawLine(0, 0, iW, iH, int(iH*0.25), 255, 255, 255)
|
||||
hyperion.imageDrawLine(0, iH, iW, 0, int(iH*0.25), 255, 255, 255)
|
||||
hyperion.imageDrawLine(0, int(iH*0.50), iW, int(iH*0.50), int(iW*0.15), 255, 0, 0)
|
||||
hyperion.imageDrawLine(int(iW*0.50), 0, int(iW*0.50), iH, int(iW*0.15), 255, 0, 0)
|
||||
hyperion.imageDrawLine(int(iW*0.95), 0, int(iW*0.475), int(iH*0.50), int(iH*0.10), 255, 0, 0)
|
||||
hyperion.imageDrawLine(int(iW*0.05), iH, int(iW*0.525), int(iH*0.50), int(iH*0.10), 255, 0, 0)
|
||||
hyperion.imageDrawLine(int(-iW*0.05), 0, int(iW*0.475), int(iH*0.50), int(iH*0.10), 255, 0, 0)
|
||||
hyperion.imageDrawLine(int(iW*1.05), iH, int(iW*0.475), int(iH*0.50), int(iH*0.10), 255, 0, 0)
|
||||
|
||||
#prepare wanted flags
|
||||
for cf in countries:
|
||||
printFlag(cf)
|
||||
|
Reference in New Issue
Block a user