Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into tool
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackRam-oss committed Jan 20, 2024
2 parents 07187ef + d85d5d6 commit e9fd57a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions pythonpackages/renpy_utility/renpy_custom_notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

store.notifications = []

DEFAULT_NOTIFY_DELAY = 10.0
DEFAULT_NOTIFY_DELAY = 3.0

__all__ = [
"NotifyEx",
Expand All @@ -21,7 +21,7 @@ class NotifyEx(renpy.python.RevertableObject):
def __init__(
self,
message: Optional[str],
image: Optional[str],
image: Optional[str] = None,
delay: Optional[float] = None,
):
super(NotifyEx, self).__init__()
Expand Down Expand Up @@ -57,7 +57,11 @@ def delay(self, value: Optional[float]):
self._delay = value


def notify_add(message: Optional[str] = None, image: Optional[str] = None, delay: Optional[float] = None):
def notify_add(
message: Optional[str] = None,
image: Optional[str] = None,
delay: Optional[float] = None,
):
store.notifications.append(NotifyEx(message, image, delay))
if len(store.notifications) == 1:
renpy.show_screen("notifyEx")
Expand All @@ -81,6 +85,5 @@ def notify_remove(value: NotifyEx):
def notify(notific: NotifyEx):
"""View defined notifications.6
to use: $ notify(...)"""
store.notifications.append(
NotifyEx(notific.message, notific.image, notific.delay))
store.notifications.append(NotifyEx(notific.message, notific.image, notific.delay))
return

0 comments on commit e9fd57a

Please sign in to comment.