Add white and black modes.

This commit is contained in:
Sergey Vartanov 2021-11-12 03:32:17 +03:00
parent 7a8f9c49b0
commit b777d7bb4f
3 changed files with 45 additions and 5 deletions

View file

@ -2,9 +2,12 @@
Map drawing configuration.
"""
import argparse
from colour import Color
from dataclasses import dataclass
from enum import Enum
from typing import Optional
__author__ = "Sergey Vartanov"
__email__ = "me@enzet.ru"
@ -15,6 +18,8 @@ class DrawingMode(Enum):
NORMAL = "normal"
AUTHOR = "author"
TIME = "time"
WHITE = "white"
BLACK = "black"
class LabelMode(Enum):
@ -73,3 +78,8 @@ class MapConfiguration:
def is_wireframe(self) -> bool:
"""Whether drawing mode is special."""
return self.drawing_mode != DrawingMode.NORMAL
def backghround_color(self) -> Optional[Color]:
if self.drawing_mode not in (DrawingMode.NORMAL, DrawingMode.BLACK):
return Color("#111111")
return None