from scene import Color from ..scenefont import Font from . import _utils _black = lambda a=1: \ Color(0, 0, 0, a) _white = lambda a=1: \ Color(1, 1, 1, a) _grayf = lambda w, b, a=1: \ _utils.wavg_color((w, _white(a)), (b, _black(a))) _gray = lambda a=1: \ _grayf(1, 1, a) _red = lambda a=1: \ Color(1, 0, 0, a) _green = lambda a=1: \ Color(0, 1, 0, a) _blue = lambda a=1: \ Color(0.15, 0.3, 1, a) _REGULAR_FONT = 'AvenirNext-Regular' _MONO_FONT = 'DejaVuSansMono' _CONDENSED_FONT = 'AvenirNextCondensed-Regular' _TITLE_FONT = 'AvenirNext-BoldItalic' _TITLE_ALT_FONT = 'AvenirNextCondensed-Bold' _WIDE_FONT = 'AvenirNext-Heavy' BG_COLOR = _black() REFRESH_PULL_COLOR = _red()
def score_text(s, x, y): tinted_text(s, x, y, Color(1.0, 1.0, 0.4, 0))
def __init__(self, rect=Rect(), parent=None): super(self.__class__, self).__init__(rect, parent, 'Alien_Monster') self.tint = Color(1, 0, 1, 0)
def shadow_text(s, x, y): tinted_text(s, x, y, Color(0.0, 0.5, 1.0, 0))
def tinted_text(s, x, y, tint_color=Color(0, 0, 1, 0)): tint(0, 0, 0) text(s, GAME_FONT, 48, x + 2, y - 2) tint(*tint_color) text(s, GAME_FONT, 48, x, y)
from ._default import * from scene import Color from ..scenefont import Font BG_COLOR = Color(0, 0, 0) REFRESH_PULL_COLOR = Color(1, 0.45, 0.15, 0.75) REFRESH_RELEASE_COLOR = Color(0.15, 0.9, 0.3, 0.75) REFRESH_PULL_TEXT = 'pull to refresh' REFRESH_RELEASE_TEXT = 'release to refresh' REFRESH_TIME_PREFIX = 'last refreshed: ' REFRESH_TEXT_FONT = Font('AvenirNext-Heavy', 16) REFRESH_TIME_FONT = Font('AvenirNextCondensed-Bold', 16) REFRESH_TINT = Color(1, 1, 1) REFRESH_HILITE_TINT = Color(0, 0, 0) NFB_FONT = Font('AvenirNextCondensed-Bold', 32) LOADING_BG_COLOR = Color(0.25, 0.25, 0.25, 0.48) LOADING_TEXT = 'Loading' LOADING_FONT = Font('SnellRoundhand-Black', 32) LOADING_TINT = Color(0.22, 0.12, 0.12) LOADING_HILITE_TINT = Color(0.8, 0.8, 0.8) SCROLLBAR_BG_COLOR = Color(0.1, 0.9, 0.6) SCROLLBAR_STROKE_COLOR = Color() SCROLLBAR_STROKE_WEIGHT = 0 END_STOP_BG_COLOR = Color(0.2, 0.4, 0.8) FPS_FONT = Font('Courier', 24)
from scene import Color Font = lambda x, y: (x, y) _black = lambda a=1: \ Color(0, 0, 0, a) _red = lambda a=1: \ Color(0, 0, 0, a) _green = lambda a=1: \ Color(0, 0, 0, a) _TITLE_ALT_FONT = 'AvenirNextCondensed-Bold' _WIDE_FONT = 'AvenirNext-Heavy' NFB_FONT = Font(_TITLE_ALT_FONT, 32) LOADING_BG_COLOR = _black(0) LOADING_TEXT = 'Loading' LOADING_FONT = Font(_WIDE_FONT, 32) LOADING_TINT = _red() LOADING_HILITE_TINT = _black(0) SCROLLBAR_BG_COLOR = _green()
from ._default import * from scene import Color from ..scenefont import Font from . import _utils _black = lambda a=1: \ Color(0, 0, 0, a) _white = lambda a=1: \ Color(1, 1, 1, a) _grayf = lambda w, b, a=1: \ _utils.wavg_color((w, _white(a)), (b, _black(a))) _gray = lambda a=1: \ _grayf(1, 1, a) _dark_gray = lambda a=1: \ _grayf(1, 3, a) _light_gray = lambda a=1: \ _grayf(4, 1, a) _red = lambda a=1: \ Color(1, 0.2, 0.2, a) _dark_red = lambda a=1: \ _utils.wavg_color((1, _red(a)), (4, _grayf(1, 7, a))) _orange = lambda a=1: \ Color(1, 0.45, 0.15, a) _green = lambda a=1: \ Color(0.15, 1, 0.3, a) _blue = lambda a=1: \ Color(0.15, 0.3, 1, a) _dark_blue = lambda a=1: \ _utils.wavg_color((1, _blue(a)), (3, _black(a)))