How can I display only the bg of the mainframe?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Ryue
Miko-Class Veteran
Posts: 745
Joined: Fri Nov 02, 2012 8:41 am
Projects: Red eyes in the darkness
Contact:

How can I display only the bg of the mainframe?

#1 Post by Ryue »

I've got a problem with a generic choices screen where I'm trying to display a background and then have choices above it.

The problem is as this:
Image
The background (brown box) is shown but then a grayish overlay is shown from the other frames above it. I'm trying to disable this "overlay". The question is how?
(as no background is given for those frames anyway).

In essence (code below) the mainframe has a background set, the subframes not.

Code: Select all

screen ChoiceLarge(title, choice1, choice2, choice3 = None, choice4 = None, choicesHiddenByDefault = True):
    default choiceToolTip = Tooltip("")
    default choice1Text = Tooltip(" \n \n ")
    default choice2Text = Tooltip(" \n \n ")
    default choice3Text = Tooltip(" \n \n ")
    default choice4Text = Tooltip(" \n \n ")

    
    if (choicesHiddenByDefault == False):
        $choice1Text = Tooltip(choice1._ChoiceText)
        $choice2Text = Tooltip(choice2._ChoiceText)
        
        if (choice3 <> None):
            $choice3Text = Tooltip(choice3._ChoiceText)
            
        if (choice4 <> None):
            $choice4Text = Tooltip(choice4._ChoiceText)
    frame:
        xalign 0.5
        yalign 0.5
        background "Graphics/GUI/choicebox.png"
        
        frame:
            #background "#333333"

            vbox:
                text title size 24 xalign 0.5 color "#FEEEEE"
                text "" size 8
                
                vbox:
                    xalign 0.5
                    
                    hbox:
                        xsize 1300

                        frame:
                            background choice1._ChoiceImage
                            xysize 64, 64
                            xalign 0
                            yalign 0.5

                            imagebutton:
                                idle "Graphics/GUI/ChoiceIdle.png"
                                hover "Graphics/GUI/ChoiceHover.png"
                                selected_idle "Graphics/GUI/ChoiceSelected.png"
                                selected_hover "Graphics/GUI/ChoiceSelected.png"
                                hovered [choiceToolTip.Action(choice1._ToolTip), choice1Text.Action(choice1._ChoiceText)]
                                action Return(ChoicesDTO("", "", "", "Choose1", choice1._ChoiceText))
                        frame:
                            yalign 0.5
                            ysize 115
                            xsize 1200
                            #text choice1Text.value yalign 0.5
                            text choice1._ChoiceText yalign 0.5
                            
                    hbox:
                        xsize 1300

                        frame:
                            background choice2._ChoiceImage
                            xysize 64, 64
                            xalign 0
                            yalign 0.5

                            imagebutton:
                                idle "Graphics/GUI/ChoiceIdle.png"
                                hover "Graphics/GUI/ChoiceHover.png"
                                selected_idle "Graphics/GUI/ChoiceSelected.png"
                                selected_hover "Graphics/GUI/ChoiceSelected.png"
                                hovered [choiceToolTip.Action(choice2._ToolTip), choice2Text.Action(choice2._ChoiceText)]
                                action Return(ChoicesDTO("", "", "", "Choose2", choice2._ChoiceText))
                        frame:
                            yalign 0.5
                            xsize 1200
                            ysize 115
                            #text choice2Text.value yalign 0.5
                            text choice2._ChoiceText yalign 0.5
                            
                    if (choice3 <> None):
                         hbox:
                            xsize 1300
                            yalign 0.5

                            frame:
                                background choice3._ChoiceImage
                                xysize 64, 64
                                xalign 0

                                imagebutton:
                                    idle "Graphics/GUI/ChoiceIdle.png"
                                    hover "Graphics/GUI/ChoiceHover.png"
                                    selected_idle "Graphics/GUI/ChoiceSelected.png"
                                    selected_hover "Graphics/GUI/ChoiceSelected.png"
                                    hovered [choiceToolTip.Action(choice3._ToolTip), choice3Text.Action(choice3._ChoiceText)]
                                    action Return(ChoicesDTO("", "", "", "Choose3", choice3._ChoiceText))
                            frame:
                                yalign 0.5
                                xsize 1200
                                ysize 115
                                #text choice3Text.value yalign 0.5    
                                text choice3._ChoiceText yalign 0.5
                            
                    if (choice4 <> None):
                         hbox:
                            xsize 1300
                            yalign 0.5

                            frame:
                                background choice4._ChoiceImage
                                xysize 64, 64
                                xalign 0

                                imagebutton:
                                    idle "Graphics/GUI/ChoiceIdle.png"
                                    hover "Graphics/GUI/ChoiceHover.png"
                                    selected_idle "Graphics/GUI/ChoiceSelected.png"
                                    selected_hover "Graphics/GUI/ChoiceSelected.png"
                                    hovered [choiceToolTip.Action(choice4._ToolTip), choice4Text.Action(choice4._ChoiceText)]
                                    action Return(ChoicesDTO("", "", "", "Choose4", choice4._ChoiceText))
                            frame:
                                yalign 0.5
                                xsize 1200
                                ysize 115
                                #text choice4Text.value yalign 0.5       
                                text choice4._ChoiceText yalign 0.5

                    text choiceToolTip.value xalign 0.5 color "#EE0000"  size 18 italic True

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: How can I display only the bg of the mainframe?

#2 Post by trooper6 »

if you want a frame to have no background, then you must specify background None
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Ryue
Miko-Class Veteran
Posts: 745
Joined: Fri Nov 02, 2012 8:41 am
Projects: Red eyes in the darkness
Contact:

Re: How can I display only the bg of the mainframe?

#3 Post by Ryue »

Tnx that was it (always the easy things to overlook)

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: How can I display only the bg of the mainframe?

#4 Post by trooper6 »

No prob!
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: Alex, BBN_VN, Bing [Bot], Google [Bot]