Exemple #1
0
def _open_settings_import_export_menu():
    export_option = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        1,
        128859011,
        1330537389,
        icon=get_action_icon(),
        tag=_export_current_settings)
    import_option = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        2,
        3126397785,
        543237095,
        icon=get_arrow_icon(),
        tag=_import_settings_menu)
    delete_option = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        3,
        4268061051,
        645194174,
        icon=get_arrow_icon(),
        tag=_delete_settings_menu)

    def import_export_menu_callback(dialog):
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            from wickedwhims.main.settings.main_settings import open_main_settings
            open_main_settings()
            return False
        result_option = TurboUIUtil.ObjectPickerDialog.get_tag_result(dialog)
        result_option()
        clear_menu_sim()
        return True

    display_picker_list_dialog(title=237356084,
                               picker_rows=(export_option, import_option,
                                            delete_option),
                               sim=get_menu_sim(),
                               callback=import_export_menu_callback)
 def get_window_picker_row(self):
     return TurboUIUtil.ObjectPickerDialog.ListPickerRow(
         self.window_id,
         self.window_title,
         self.window_description,
         icon=get_arrow_icon(),
         tag=self.open_window)
Exemple #3
0
def _get_settings_import_export_picker_row():
    return TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        4,
        237356084,
        2464205507,
        icon=get_arrow_icon(),
        tag=_open_settings_import_export_menu)
def open_change_sex_animations_category_picker_dialog(active_sex_handler):
    @exception_watch()
    def animation_categories_picker_callback(dialog):
        if active_sex_handler is None:
            return False
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            return False
        result_sex_category_type = TurboUIUtil.ObjectPickerDialog.get_tag_result(
            dialog)
        open_change_sex_animations_picker_dialog(active_sex_handler,
                                                 result_sex_category_type)
        return True

    genders_list = list()
    for sim_info in active_sex_handler.get_actors_sim_info_gen():
        genders_list.append(get_sim_sex_gender(sim_info))
    category_picker_rows = list()
    animation_categories = ((0, SexCategoryType.TEASING, 77458156),
                            (1, SexCategoryType.HANDJOB, 1425559843),
                            (3, SexCategoryType.FOOTJOB, 223939754),
                            (4, SexCategoryType.ORALJOB, 2747124438),
                            (5, SexCategoryType.VAGINAL,
                             574589211), (6, SexCategoryType.ANAL, 1610085053),
                            (7, SexCategoryType.CLIMAX, 3986970407))
    for (index, animation_sex_category_type,
         animation_sex_category_name) in animation_categories:
        if not active_sex_handler.is_at_climax and animation_sex_category_type == SexCategoryType.CLIMAX:
            pass
        if not has_animations_with_params(
                animation_sex_category_type,
                active_sex_handler.get_object_identifier(), genders_list):
            pass
        animations_list = get_animations_with_params(
            animation_sex_category_type,
            active_sex_handler.get_object_identifier(), genders_list)
        if not animations_list:
            pass
        picker_row = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
            index,
            animation_sex_category_name,
            TurboL18NUtil.get_localized_string(3166569584,
                                               tokens=(str(
                                                   len(animations_list)), )),
            skip_tooltip=True,
            icon=get_arrow_icon(),
            tag=animation_sex_category_type)
        category_picker_rows.append(picker_row)
    if len(category_picker_rows) <= 1:
        return
    display_picker_list_dialog(title=2301874612,
                               picker_rows=category_picker_rows,
                               callback=animation_categories_picker_callback)
def open_start_sex_animations_category_picker_dialog(pre_sex_handler):
    @exception_watch()
    def animation_categories_picker_callback(dialog):
        if pre_sex_handler is None:
            return False
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            clear_sims_sex_extra_data(
                tuple(pre_sex_handler.get_actors_sim_info_gen()))
            return False
        result_sex_category_type = TurboUIUtil.ObjectPickerDialog.get_tag_result(
            dialog)
        pre_sex_handler.set_interaction_type(result_sex_category_type)
        open_start_sex_animations_picker_dialog(pre_sex_handler)
        return True

    genders_list = list()
    for sim_info in pre_sex_handler.get_actors_sim_info_gen():
        genders_list.append(get_sim_sex_gender(sim_info))
    category_picker_rows = list()
    animation_categories = ((0, SexCategoryType.TEASING, 77458156),
                            (1, SexCategoryType.HANDJOB, 1425559843),
                            (3, SexCategoryType.FOOTJOB, 223939754),
                            (4, SexCategoryType.ORALJOB, 2747124438),
                            (5, SexCategoryType.VAGINAL,
                             574589211), (6, SexCategoryType.ANAL, 1610085053))
    for (index, animation_sex_category_type,
         animation_sex_category_name) in animation_categories:
        animations_list = get_animations_with_params(
            animation_sex_category_type,
            pre_sex_handler.get_object_identifier(), genders_list)
        if not animations_list:
            continue
        picker_row = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
            index,
            animation_sex_category_name,
            TurboL18NUtil.get_localized_string(3166569584,
                                               tokens=(str(
                                                   len(animations_list)), )),
            skip_tooltip=True,
            icon=get_arrow_icon(),
            tag=animation_sex_category_type)
        category_picker_rows.append(picker_row)
    display_picker_list_dialog(title=2301874612,
                               picker_rows=category_picker_rows,
                               callback=animation_categories_picker_callback)
Exemple #6
0
def open_penis_settings(sim_identifier):
    sim_info = TurboManagerUtil.Sim.get_sim_info(sim_identifier)
    sim_soft_penis = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        10,
        TurboL18NUtil.get_localized_string(2898758693),
        TurboL18NUtil.get_localized_string(0),
        icon=get_arrow_icon())
    sim_hard_penis = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        11,
        TurboL18NUtil.get_localized_string(1072923186),
        TurboL18NUtil.get_localized_string(0),
        icon=get_arrow_icon())
    all_sims_soft_penis = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        20,
        TurboL18NUtil.get_localized_string(2966523311),
        TurboL18NUtil.get_localized_string(0),
        icon=get_arrow_icon())
    all_sims_hard_penis = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        21,
        TurboL18NUtil.get_localized_string(4002037116),
        TurboL18NUtil.get_localized_string(0),
        icon=get_arrow_icon())
    randomize_all_sims_penis = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        30,
        TurboL18NUtil.get_localized_string(1952075710),
        TurboL18NUtil.get_localized_string(0),
        icon=get_selected_icon() if PENIS_SETTING_RANDOM is True
        and PENIS_SETTING_RANDOM_INCLUDE_DEFAULT is True else
        get_unselected_icon())
    randomize_all_sims_penis_non_default = TurboUIUtil.ObjectPickerDialog.ListPickerRow(
        31,
        TurboL18NUtil.get_localized_string(1952075710),
        TurboL18NUtil.get_localized_string(1490222904),
        icon=get_selected_icon() if PENIS_SETTING_RANDOM is True
        and PENIS_SETTING_RANDOM_INCLUDE_DEFAULT is False else
        get_unselected_icon())

    @exception_watch()
    def set_callback(dialog):
        if not dialog.accepted:
            return
        result = dialog.get_result_tags()[-1]
        if result == 10:
            open_sim_soft_penis_picker(sim_info)
        elif result == 11:
            open_sim_hard_penis_picker(sim_info)
        elif result == 20:
            open_all_sims_soft_penis_picker(sim_info)
        elif result == 21:
            open_all_sims_hard_penis_picker(sim_info)
        elif result == 30:
            randomized_all_sims_penis_models(sim_info,
                                             include_default_penis=True)
        elif result == 31:
            randomized_all_sims_penis_models(sim_info)

    display_picker_list_dialog(title=253781263,
                               picker_rows=[
                                   sim_soft_penis, sim_hard_penis,
                                   all_sims_soft_penis, all_sims_hard_penis,
                                   randomize_all_sims_penis,
                                   randomize_all_sims_penis_non_default
                               ],
                               callback=set_callback)
 def select_picker_row(self, picker_row_id):
     return TurboUIUtil.ObjectPickerDialog.ListPickerRow(
         picker_row_id,
         self.option_name,
         self.option_description,
         icon=get_arrow_icon())
def _open_animation_category_picker(author_name, autonomy=False):
    global _CURRENT_AUTHOR_NAME
    _CURRENT_AUTHOR_NAME = author_name

    @exception_watch()
    def animation_categories_callback(dialog):
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            _open_animation_authors_picker(autonomy=autonomy)
            return False
        (result_author_name, result_category_type) = TurboUIUtil.ObjectPickerDialog.get_tag_result(dialog)
        _open_animations_picker(result_author_name, result_category_type, autonomy=autonomy)
        return True

    category_picker_rows = list()
    animation_categories = ((0, SexCategoryType.TEASING, 1782200665), (1, SexCategoryType.HANDJOB, 2036049244), (3, SexCategoryType.FOOTJOB, 122220731), (4, SexCategoryType.ORALJOB, 1133298919), (5, SexCategoryType.VAGINAL, 2874903428), (6, SexCategoryType.ANAL, 3553429146), (7, SexCategoryType.CLIMAX, 1579105152))
    for (index, animation_category_type, animation_category_name) in animation_categories:
        overall_animations_count = 0
        enabled_animations_count = 0
        for animation_instance in get_all_sex_animations():
            while animation_instance.get_sex_category() == animation_category_type and animation_instance.get_author() == author_name:
                overall_animations_count += 1
                if not is_sex_animation_disabled(animation_instance.get_identifier(), autonomy=autonomy):
                    enabled_animations_count += 1
        if overall_animations_count <= 0:
            pass
        picker_row = TurboUIUtil.ObjectPickerDialog.ListPickerRow(index, animation_category_name, TurboL18NUtil.get_localized_string(583685786, (str(enabled_animations_count) + '/' + str(overall_animations_count), author_name)), skip_tooltip=True, icon=get_arrow_icon(), tag=(author_name, animation_category_type))
        category_picker_rows.append(picker_row)
    if autonomy is False:
        title = TurboL18NUtil.get_localized_string(2380367292, (author_name,))
    else:
        title = TurboL18NUtil.get_localized_string(3773354670, (author_name,))
    display_picker_list_dialog(title=title, picker_rows=category_picker_rows, sim=get_menu_sim(), callback=animation_categories_callback)
def _open_animation_authors_picker(autonomy=False):
    global _CURRENT_AUTHOR_NAME
    _CURRENT_AUTHOR_NAME = None

    @exception_watch()
    def animation_authors_callback(dialog):
        if not TurboUIUtil.ObjectPickerDialog.get_response_result(dialog):
            update_disabled_sex_animation_data()
            recollect_sex_animation_packages()
            from wickedwhims.sex.settings.sex_settings import _open_sex_settings, _open_sex_autonomy_settings
            if autonomy is False:
                _open_sex_settings()
            else:
                _open_sex_autonomy_settings()
            return False
        result_author_name = str(TurboUIUtil.ObjectPickerDialog.get_tag_result(dialog))
        _open_animation_category_picker(result_author_name, autonomy=autonomy)
        return True

    animation_author_picker_rows = list()
    animation_authors = OrderedDict()
    for animation_instance in get_all_sex_animations():
        is_enabled = not is_sex_animation_disabled(animation_instance.get_identifier(), autonomy=autonomy)
        if animation_instance.get_author() not in animation_authors:
            animation_authors[animation_instance.get_author()] = (1, 1 if is_enabled else 0)
        else:
            (overall_animations, enabled_animations) = animation_authors[animation_instance.get_author()]
            animation_authors[animation_instance.get_author()] = (overall_animations + 1, enabled_animations + (1 if is_enabled else 0))
    index = 0
    for (animation_author_name, (overall_animations_count, enabled_animations_count)) in animation_authors.items():
        picker_row = TurboUIUtil.ObjectPickerDialog.ListPickerRow(index, animation_author_name, TurboL18NUtil.get_localized_string(2223654951, (str(enabled_animations_count) + '/' + str(overall_animations_count),)), skip_tooltip=True, icon=get_arrow_icon(), tag=animation_author_name)
        animation_author_picker_rows.append(picker_row)
        index += 1
    display_picker_list_dialog(text=4285227430, title=1853900111 if autonomy is False else 2284702213, picker_rows=animation_author_picker_rows, sim=get_menu_sim(), callback=animation_authors_callback)