Changeset 521:61e3e5d28a05


Ignore:
Timestamp:
Sep 7, 2013, 6:23:17 PM (7 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Message:

Sligthly pinker ephemeral notes

Location:
nagslang
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nagslang/game_object.py

    r520 r521  
    302302
    303303class EphemeralNote(GameObject):
    304     def __init__(self, message, timeout):
     304    def __init__(self, message, timeout, **kwargs):
     305        kwargs.setdefault('bg_colour', (255, 180, 180, 192))
    305306        super(EphemeralNote, self).__init__(
    306307            None,
    307308            render.NullRenderer(),
    308309            puzzle.YesPuzzler(),
    309             render.TextOverlay(message),
     310            render.TextOverlay(message, **kwargs),
    310311        )
    311312        self.add_timer('timeout', timeout)
  • nagslang/render.py

    r488 r521  
    200200
    201201class TextOverlay(Overlay):
    202     def __init__(self, text):
     202    def __init__(self, text, **kwargs):
    203203        self.text = text
    204         self.widget = LabelWidget((20, 20), self.text)
     204        self.widget = LabelWidget((20, 20), self.text, **kwargs)
    205205
    206206    def render(self, surface, display_offset, max_width):
Note: See TracChangeset for help on using the changeset viewer.