Beispiel #1
0
def name_modified(props, prop, *args, **kwargs):
    racer_name = obs.obs_data_get_string(args[0], lp.ladder_name)
    p = obs.obs_properties_get(props, lp.ladder_name)
    if ladder_timer.update_settings(racer_name):
        obs.obs_property_set_description(p, _("Ladder Name ✅"))
    else:
        obs.obs_property_set_description(p, _("Ladder Name ❌"))
    return True
Beispiel #2
0
def b_stop(props, prop, *arg, **kwargs):
    p = obs.obs_properties_get(props, "b1")
    obs.obs_property_set_description(p, "Start")
    obs.obs_property_set_modified_callback(p, b_start) 
    
    visible_prop(props, "wf", True)
    visible_prop(props, "rf", True)
    visible_prop(props, "cb", True)
    visible_prop(props, "df", True)
    visible_prop(props, "af", True)
    visible_prop(props, "al", True)
    
    global run 
    run = False
    
    return True
Beispiel #3
0
def b_start(props, prop, *arg, **kwargs):
    p = obs.obs_properties_get(props, "b1")
    obs.obs_property_set_description(p, "Stop")
    obs.obs_property_set_modified_callback(p, b_stop) 
    
    visible_prop(props, "wf", False)
    visible_prop(props, "rf", False)
    visible_prop(props, "cb", False)
    visible_prop(props, "df", False)
    visible_prop(props, "af", False)
    visible_prop(props, "al", False)

    global run
    run = True
    t = threading.Thread(target=busy_thread)
    t.start()
    return True
def callback(props, prop, *args, **kwargs):  # pass settings implicitly
    p = obs.obs_properties_get(props, "button")
    n = next(counter)
    obs.obs_property_set_description(p, f"refresh pressed {n} times")
    return True