コード例 #1
0
ファイル: locations.py プロジェクト: austinseol/datingsim
 def __init__(self, on_click, text, color=(30, 130, 180), **style):
     L2 = LocButton2
     x = L2.m_start_pos_r[0]
     y = L2.m_start_pos_r[1] + L2.j * (L2.b2_h + L2.m_spacing)
     pos = (x, y)
     size = (L2.b2_w, L2.b2_h)
     BlockButton.__init__(self, on_click, color, size, pos, text, **style)
     L2.j += 1
コード例 #2
0
ファイル: locations.py プロジェクト: austinseol/datingsim
    def __init__(self, on_click=None, color=(50, 20, 120), **style):
        assert hasattr(BackToMap, "containers"), "no containers... DERRRRRRRR HUURRRRRRR"
        B = BackToMap

        def go_back():
            return Location.STATUS_END_SCENE

        BlockButton.__init__(self, on_click or go_back, color, B.size, B.pos, "Go back!", **style)
コード例 #3
0
ファイル: locations.py プロジェクト: austinseol/datingsim
 def __init__(self, on_click, text, color=(100, 130, 180), **style):
     L = LocButton
     x = L.b_start_pos[0]
     y = L.b_start_pos[1] + L.i * (L.b_h + L.b_spacing)
     pos = (x, y)
     size = (L.b_w, L.b_h)
     BlockButton.__init__(self, on_click, color, size, pos, text, **style)
     L.i += 1
コード例 #4
0
ファイル: locations.py プロジェクト: austinseol/datingsim
    def __init__(self, color=(40, 120, 20), **style):
        Q = QuickSleepButton

        def do_nap():
            p = datingsim.player
            p.hp = p.max_hp
            p.day += 1
            text = ("HP restored!\n" "It is now day {}.").format(p.day)
            CoolDialogue(text).main_loop()

        BlockButton.__init__(self, do_nap, color, Q.size, Q.pos, "Quick Sleep")