Code: Select all
frame:
xalign 0.5
yalign 0.5
background "Graphics/GUI/choicebox.png"
My question is: Is it possible to tell the background to be of a specific height? (thus scale it inside the screen)?
Code: Select all
frame:
xalign 0.5
yalign 0.5
background "Graphics/GUI/choicebox.png"
If I use xsize, ysize or xysize directly on the background it gets used on the frame instead.....cutting it off in the end.NialGrenville wrote:I believe you can use x/y size. depending on which direction you want it to grow/shrink.
While I've never used it on a bg image, I've used it on my text/narration boxes.
Here:https://www.renpy.org/doc/html/screens. ... properties
I'll see if I can find a thread on it too.
Not sure how I can do it differently.NialGrenville wrote:If that's the case, don't use a frame. Use scene and adjust the photo via image editor. I've never dealt with issues like this. I'd definitely never consider putting a background in a frame. Maybe that's just me, but I have no clue.
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 (choice4 <> None and choice3 == None):
$choice3 = choice4
$choice4 = None
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"
background None
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/choiceboxoptions.png"
hover "Graphics/GUI/options_hover.png"
selected_idle "Graphics/GUI/options_hover.png"
selected_hover "Graphics/GUI/options_hover.png"
hovered [choiceToolTip.Action(choice1._ToolTip), choice1Text.Action(choice1._ChoiceText)]
action Return(ChoicesDTO("", "", "", "Choose1", choice1._ChoiceText))
frame:
background None
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/choiceboxoptions.png"
hover "Graphics/GUI/options_hover.png"
selected_idle "Graphics/GUI/options_hover.png"
selected_hover "Graphics/GUI/options_hover.png"
hovered [choiceToolTip.Action(choice2._ToolTip), choice2Text.Action(choice2._ChoiceText)]
action Return(ChoicesDTO("", "", "", "Choose2", choice2._ChoiceText))
frame:
background None
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/choiceboxoptions.png"
hover "Graphics/GUI/options_hover.png"
selected_idle "Graphics/GUI/options_hover.png"
selected_hover "Graphics/GUI/options_hover.png"
hovered [choiceToolTip.Action(choice3._ToolTip), choice3Text.Action(choice3._ChoiceText)]
action Return(ChoicesDTO("", "", "", "Choose3", choice3._ChoiceText))
frame:
background None
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/choiceboxoptions.png"
hover "Graphics/GUI/options_hover.png"
selected_idle "Graphics/GUI/options_hover.png"
selected_hover "Graphics/GUI/options_hover.png"
hovered [choiceToolTip.Action(choice4._ToolTip), choice4Text.Action(choice4._ChoiceText)]
action Return(ChoicesDTO("", "", "", "Choose4", choice4._ChoiceText))
frame:
background None
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
Look there, should help i guess https://www.renpy.org/doc/html/displayables.html#FrameRyue wrote:My question is: Is it possible to tell the background to be of a specific height? (thus scale it inside the screen)?
its the "python" Frame you are refering to. Isn't that though the equivalent for the Frame I'm using?drKlauz wrote:Look there, should help i guess https://www.renpy.org/doc/html/displayables.html#FrameRyue wrote:My question is: Is it possible to tell the background to be of a specific height? (thus scale it inside the screen)?
How is it used inside the screen?xela wrote:No, it's completely different, it's also what you need here
Code: Select all
screen xyz:
test = Frame("choices.png", 500, 100)
.....
frame:
background test
No, the "500, 100" arguments are not realistic values, those are boarders and not dimensions.Ryue wrote:How is it used inside the screen?xela wrote:No, it's completely different, it's also what you need here
Code: Select all
screen xyz: test = Frame("choices.png", 500, 100) ..... frame: background test
Code: Select all
frame:
blackground Frame("choices.png")
Users browsing this forum: No registered users