From feaa5908b56e62bdcc228b253544ebd6a47e55f8 Mon Sep 17 00:00:00 2001 From: Legalo Date: Mon, 22 Apr 2024 15:16:13 -0300 Subject: [PATCH] Fix saves most saves, fix phone being fukd --- game/00src/definitions/other.rpy | 36 +++++++++++++++++++ .../apps/discussion/discussion_screens.rpy | 5 ++- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/game/00src/definitions/other.rpy b/game/00src/definitions/other.rpy index abcfe9c..dc320b1 100644 --- a/game/00src/definitions/other.rpy +++ b/game/00src/definitions/other.rpy @@ -867,3 +867,39 @@ label end_of_demo: # This is so fucking stupid image nothing = Transform("#000000", alpha=0) + +python early: + # RoundedFrame by pseurae + # https://gist.github.com/Pseurae/661e6084f756fc917b2889a386b16664 + # modified by yours truly (i don't know shit about OpenGL) + class RoundedFrame(renpy.display.image.Frame): + def __init__(self, image, *args, **kwargs): + radius = kwargs.pop("radius", 0.0) + outline_width = kwargs.pop("outline_width", 0.0) + outline_color = kwargs.pop("outline_color", "#fff") + + super(RoundedFrame, self).__init__(image, *args, **kwargs) + + if not isinstance(radius, tuple): radius = (radius,) * 4 + self.radius = radius + + self.outline_width = outline_width + self.outline_color = normalize_color(Color(outline_color)) + + def render(self, w, h, st, at): + rv = super(RoundedFrame, self).render(w, h, st, at) + + if self.radius: + rv.mesh = True + rv.add_property("gl_pixel_perfect", True) + rv.add_property("gl_mipmap", False) + rv.add_property("texture_scaling", "nearest") + rv.add_shader("shader.rounded_corners") + rv.add_uniform("u_radius", self.radius) + rv.add_uniform("u_outline_width", self.outline_width) + rv.add_uniform("u_outline_color", self.outline_color) + + return rv + +init python: + config.developer = True \ No newline at end of file diff --git a/game/00src/phone/phone/apps/discussion/discussion_screens.rpy b/game/00src/phone/phone/apps/discussion/discussion_screens.rpy index a618c95..5a3d665 100644 --- a/game/00src/phone/phone/apps/discussion/discussion_screens.rpy +++ b/game/00src/phone/phone/apps/discussion/discussion_screens.rpy @@ -200,9 +200,8 @@ screen _chat_messages(): if i != phone.discussion._group_chat.number_of_messages-1 or renpy.get_screen("say"): text p.data alt "" else: - $ sender = __(phone.character.character(p.source).short_name) - text p.data alt sender + ": " + p.data - # $print(dir(phone.discussion._group_chat)) + $ sender = phone.character.character(str(p.source)) + text p.data alt str(sender.name) + ": " + __(p.data) elif p.type == phone.discussion._PayloadTypes.IMAGE: use _chat_message(p):