Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual fixes #19

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Source/mas/theme/comfy_ui/calendar.rpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
################################################################################
#
# Copyright (c) 2020–2021 Dominus Iniquitatis <[email protected]>
#
# See LICENSE file for the licensing information
#
################################################################################

# MASFIX: monkey patch for calendar close button
init 999 python in comfy_ui.calendar:
from renpy.text.text import Text
from store import MASCalendar

old_init = MASCalendar.__init__

def monkey_init(self, *args, **kwargs):
old_init(self, *args, **kwargs)

empty_text = Text("")

btn = self.button_exit
btn._button_states = {k: (empty_text, v[1]) for k, v in btn._button_states.items()}

MASCalendar.__init__ = monkey_init
46 changes: 46 additions & 0 deletions Source/mas/theme/comfy_ui/categories.rpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
################################################################################
#
# Copyright (c) 2020–2021 Dominus Iniquitatis <[email protected]>
#
# See LICENSE file for the licensing information
#
################################################################################
label comfy_ui_category_fix:
python:
unlocked_events = Event.filterEvents(
evhand.event_database,
unlocked = True,
pool = pool,
aff = mas_curr_affection,
flag_ban = EV_FLAG_HFM
)

main_cat_list = list()
no_cat_list = list()

for key in unlocked_events:
event = unlocked_events[key]

if event.category:
evhand.addIfNew(event.category, main_cat_list)
else:
no_cat_list.append(event)

main_cat_list.sort()
no_cat_list.sort(key = Event.getSortPrompt)

# MASFIX: map category IDs to the actual human-readable names
cat_names = {
"ddlc": "DDLC",
}
dis_cat_list = [(cat_names.get(x, x.capitalize()) + "...", x) for x in main_cat_list]

no_cat_list = [(x.prompt, x.eventlabel) for x in no_cat_list]

dis_cat_list.extend(no_cat_list)

cat_lists.append(evhand._NT_CAT_PANE(dis_cat_list, main_cat_list))

init 999 python:
namemap = renpy.game.script.namemap
namemap["prompts_categories"].block[4].code = namemap["comfy_ui_category_fix"].block[0].code
22 changes: 6 additions & 16 deletions Source/mas/theme/comfy_ui/definitions.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,12 @@ define comfy_ui.option_button_text.dark.hover_color = "CUI_SCD_COLOR(230,
define comfy_ui.option_button_text.dark.selected_color = "CUI_SCD_COLOR(209, 123, 157)"
define comfy_ui.option_button_text.dark.insensitive_color = "CUI_SCD_COLOR(115, 115, 115, 127)"

define comfy_ui.fancy_check_button.light.idle_background_color = "CUI_PRM_COLOR(0, 0, 0, 0)"
define comfy_ui.fancy_check_button.light.hover_background_color = "CUI_PRM_COLOR(255, 189, 225)"
define comfy_ui.fancy_check_button.light.selected_background_color = "CUI_PRM_COLOR(255, 189, 225)"
define comfy_ui.fancy_check_button.dark.idle_background_color = "CUI_PRM_COLOR(0, 0, 0, 0)"
define comfy_ui.fancy_check_button.dark.hover_background_color = "CUI_PRM_COLOR(206, 126, 160)"
define comfy_ui.fancy_check_button.dark.selected_background_color = "CUI_PRM_COLOR(206, 126, 160)"

define comfy_ui.fancy_check_button_text.font = "CUI_OPTION_FONT()"
define comfy_ui.fancy_check_button_text.font_kerning = 0.0
define comfy_ui.fancy_check_button_text.font_size = 24
define comfy_ui.fancy_check_button_text.light.idle_color = "CUI_PRM_COLOR(191, 191, 191)"
define comfy_ui.fancy_check_button_text.light.hover_color = "CUI_PRM_COLOR(56, 56, 56)"
define comfy_ui.fancy_check_button_text.light.selected_color = "CUI_PRM_COLOR(56, 56, 56)"
define comfy_ui.fancy_check_button_text.dark.idle_color = "CUI_PRM_COLOR(191, 191, 191)"
define comfy_ui.fancy_check_button_text.dark.hover_color = "CUI_PRM_COLOR(235, 173, 185)"
define comfy_ui.fancy_check_button_text.dark.selected_color = "CUI_PRM_COLOR(235, 173, 185)"
define comfy_ui.fancy_check_button_text.light.idle_color = "CUI_PRM_COLOR(191, 191, 191)"
define comfy_ui.fancy_check_button_text.light.hover_color = "CUI_PRM_COLOR(56, 56, 56)"
define comfy_ui.fancy_check_button_text.light.selected_color = "CUI_PRM_COLOR(56, 56, 56)"
define comfy_ui.fancy_check_button_text.dark.idle_color = "CUI_PRM_COLOR(191, 191, 191)"
define comfy_ui.fancy_check_button_text.dark.hover_color = "CUI_PRM_COLOR(56, 56, 56)"
define comfy_ui.fancy_check_button_text.dark.selected_color = "CUI_PRM_COLOR(56, 56, 56)"

define comfy_ui.scrollable_menu_button_spacing = 6
define comfy_ui.choice_button_spacing = 12
Expand Down
13 changes: 13 additions & 0 deletions Source/mas/theme/comfy_ui/fonts.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ init 999 style radio_button_text_dark:
kerning comfy_ui.option_button_text.font_kerning
size comfy_ui.option_button_text.font_size

# Fancy check button
init 999 style generic_fancy_check_button_text:
yoffset comfy_ui.button_text.vertical_offset
font comfy_ui.common.font
kerning comfy_ui.common.font_kerning
size comfy_ui.common.font_size

init 999 style generic_fancy_check_button_text_dark:
yoffset comfy_ui.button_text.vertical_offset
font comfy_ui.common.font
kerning comfy_ui.common.font_kerning
size comfy_ui.common.font_size



################################################################################
Expand Down
26 changes: 26 additions & 0 deletions Source/mas/theme/comfy_ui/hangman.rpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
################################################################################
#
# Copyright (c) 2020–2021 Dominus Iniquitatis <[email protected]>
#
# See LICENSE file for the licensing information
#
################################################################################
init 999 transform hangman_board:
xanchor 0
yanchor 0
xpos 675
ypos 100
alpha 1.0

init 999 transform hangman_hangman:
xanchor 0
yanchor 0
# MASFIX: hangman sensitive mode image
xpos (880 if not persistent._mas_sensitive_mode else 836)
ypos 125

init 999 python in mas_hangman:
WORD_FONT = "mod_assets/font/m1_fixed.ttf"
WORD_SIZE = 36
WORD_COLOR = "#202020"
WORD_COLOR_GET = "#000000"
23 changes: 23 additions & 0 deletions Source/mas/theme/comfy_ui/islands_event.rpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
################################################################################
#
# Copyright (c) 2020–2021 Dominus Iniquitatis <[email protected]>
#
# See LICENSE file for the licensing information
#
################################################################################
screen comfy_ui_islands_event_button_fix:
hbox:
xalign 0.96
yalign 0.98

# MASFIX: using ToggleVariable turns normal button into a "checkbox"
if _mas_island_window_open:
textbutton "Close Window" action SetVariable("_mas_island_window_open", False)
else:
textbutton "Open Window" action SetVariable("_mas_island_window_open", True)

textbutton "Go Back" action Return(False)

init 999 python:
screens = renpy.display.screen.screens
screens[("mas_show_islands", None)].ast.children[2] = screens[("comfy_ui_islands_event_button_fix", None)].ast.children[0]
25 changes: 25 additions & 0 deletions Source/mas/theme/comfy_ui/pref_screen.rpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
################################################################################
#
# Copyright (c) 2020–2021 Dominus Iniquitatis <[email protected]>
#
# See LICENSE file for the licensing information
#
################################################################################
screen comfy_ui_pref_labels:
hbox:
label _("Sunrise: ")
label _(sr_display)

hbox:
label _("Sunset: ")
label _(ss_display)

hbox:
label _("Random Chatter: ")
label _(rc_display)

init 999 python:
screens = renpy.display.screen.screens
screens[("preferences", None)].ast.children[2].block.children[0].children[2].children[1].children[0] = screens[("comfy_ui_pref_labels", None)].ast.children[0]
screens[("preferences", None)].ast.children[2].block.children[0].children[2].children[1].children[2] = screens[("comfy_ui_pref_labels", None)].ast.children[1]
screens[("preferences", None)].ast.children[2].block.children[0].children[2].children[2].children[0] = screens[("comfy_ui_pref_labels", None)].ast.children[2]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions Source/mas/theme/comfy_ui/search_bar.rpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
################################################################################
#
# Copyright (c) 2020–2021 Dominus Iniquitatis <[email protected]>
#
# See LICENSE file for the licensing information
#
################################################################################
init 999 python:
# MASFIX: replace basic search bar Solid() by an actual image
screens = renpy.display.screen.screens
screens[("twopane_scrollable_menu", None)].ast.children[3].keyword[4] = (
"background", "Frame('mod_assets/frames/search_bar.png', Borders(5, 5, 5, 5))"
)
screens[("mas_selector_sidebar", None)].ast.children[2].keyword[4] = (
"background", "Frame('mod_assets/frames/search_bar.png', Borders(5, 5, 5, 5))"
)
Loading