mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-07 05:11:53 +02:00
Add white and black modes.
This commit is contained in:
parent
7a8f9c49b0
commit
b777d7bb4f
3 changed files with 45 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue