Hi !
I know it's an old post, but I'm in need for some help.
I'm trying to add saguaro message system in a 'computer like' imagebutton screen. It should be easy but I'v some issues.
I have a background image for my computer desktop. The player can click on a "Mail" button. And saguaro message system appear (the Inbox). For now it's just fine.
But when I want to draft a new message, or reply to one, I can't see the reply or draft 'screens'. And I know why, it's because the background image is on a superior layer than saguaro message system.
So, ok, I'm trying to fix this by moving saguaro message system on another layer. I'v managed to move the 'contact' screen in the layer that I want.
Code: Select all
screen mailbox_commands:
hbox:
if available_drafts:
textbutton "New Draft" action Show("contacts", _layer="scrmenu2") ######## HERE
Who's calling this on:
Code: Select all
screen contacts:
modal True
frame:
style_group "mailbox"
xsize 200
vbox:
label "Contacts"
for name in contacts:
if name.draft_label:
textbutton name.name action [name.draft, Hide("contacts")] ###### HERE
Who's calling (I think):
Code: Select all
class Contact(store.object):
def __init__(self, name, draft_label):
self.name = name
self.draft_label = draft_label
self.add_contact()
def add_contact(self):
contacts.append(self)
def draft(self):
global draft_screen
draft_screen = True
renpy.call_in_new_context(self.draft_label,contact=self) ###### HERE
draft_screen = False
And that's my problem, I don't know how to send this "renpy.call_in_new_context..." in a layer.
I don't know if I was clear. But if someone know how to fix this, it will be a great help !
Oh, and I've fixed this:
LyannaCore wrote: ↑Wed Jun 21, 2017 2:03 pm
I realize this systems is a bit old now, so it's probably just something that has changed with Renpy updates, but trying to use it messes up my existing menus.
With the messages.rpy included and integrated as required, they are aligned to the left and have no change when moused over:
The #updated choice screen of the script replace the choice screen of Ren'py. So I'v juste changed the values of #updated choice screen to be the same of my version of Ren'py.
Like this:
Code: Select all
# updated choice screen
screen choice:
if reply_screen or draft_screen:
# this is the menu for message replies and drafts
frame:
style_group "mailbox"
vbox:
label "Ecrire"
if reply_screen:
text ("To: " + current_message.sender)
text ("Subject: Re: " + current_message.subject)
else:
text ("To: " + contact.name)
text ("Subject: " + message_title)
null height 30
for caption, action, chosen in items:
if action:
button:#boutton choix réponse
action action
style "choice_button" xalign 0.5
text caption text_align 0.5
else:
text caption style "menu_caption"
else:
# this is the default choice menu
window:
style "choice" ####################### # PREVIOUSLY "menu_widow"
xalign 0.5
yalign 0.5
vbox:
style "menu"
xalign 0.5 ####################### # ADDED THIS VALUES
yalign 0.5
yanchor 0.5
spacing gui.choice_spacing ####################### # PREVIOUSLY "spacing 2"
for caption, action, chosen in items:
if action:
button:
action action
style "choice_button" xalign 0.5 ####################### # PREVIOUSLY "menu_choice_button"
text caption style "menu_choice" xalign 0.5
else:
text caption style "menu_caption" xalign 0.5
With those modifications, it will fix your problem.