1
# This file contains the old day planner, the one used in the
4
# Used in the old day planner to show the date.
7
$ dp_date = "No Date Set"
10
# This is the old day planner, as found in the demo code,
11
# reimplemented to be compatible with the new day planner.
13
# This isn't as well tested as the real one, given above.
14
label old_day_planner:
16
# This is None to indicate that nothing is being edited, or
17
# a name, var tuple to give the period that is being edited.
20
label old_day_planner_cycle:
22
call dp_callback from _call_dp_callback_2
26
renpy.choice_for_skipping()
28
# Period Selection Window.
37
ui.vbox(xpos=0.5, xanchor='center')
38
ui.text(dp_date, xpos=0.5, xanchor='center', textalign=0.5)
41
cannot_continue = False
43
for name, var in zip(dp_period_names, dp_period_vars):
45
def period_clicked(name=name, var=var):
46
store.dp_editing = (name, var)
49
value = getattr(store, var)
52
for n, v in dp_period_acts[name]:
58
cannot_continue = True
60
face = name + ": " + valname
65
_button_factory(face, "dp",
66
selected = dp_editing == (name, var),
67
clicked = period_clicked)
73
_button_factory("Continue", "dp")
75
_button_factory("Continue", "dp", clicked=ui.returns(False))
84
name, var = dp_editing
96
_label_factory("What will you do in the %s?" %
100
for label, value in dp_period_acts[name]:
102
def clicked(var=var, value=value):
103
setattr(store, var, value)
104
store.dp_editing = None
109
_button_factory(label, "dp",
110
selected = getattr(store, var) == value,
117
jump old_day_planner_cycle