Lohre wrote: ↑Fri May 10, 2024 4:59 pm
Basically, how can I make this drop shadow effect and make the dialogue box resizeable?
The default style for the dialogue box (textbox) is this I believe:
Code: Select all
style window:
xalign 0.5
xfill True
yalign gui.textbox_yalign
ysize gui.textbox_height
background Image("gui/textbox.png", xalign=0.5, yalign=2)
There doesn't seem to be much I can customize when it comes to the textbox itself, only the text position and length. Also, since I'm using low resolution pixel sprite the box looks extremely small...
As you can prolly guess I am new to Ren'py so I apologize if this is all to simple, I just didn't know how to "search" it.
Please read documentation here:
https://renpy.org/doc/html/
Start with "Quickstart" to get understanding of various design opportunities offered by Ren'Py.
(There is also a Search box).
Then read "GUI Customization Guide" which should answer your question.
To make the dialogue box resizeable, see "Borders". Note how we can apply Borders to Frame(), e.g.
Code: Select all
style window:
background Frame("gui/my_textbox.png", 50, 50)
where
gui/my_textbox.png means the filename of your background picture (or however you name that file). The picture will be used (in this example) for borders 50 px wide, and that blue area in the middle will be stretched to the desired size of the text box.
Actually there are tons of possible options for
style window:
https://renpy.org/doc/html/style_proper ... properties
To set dialog text style, use
style say_dialogue. Text shadow can be set using
outlines
https://renpy.org/doc/html/style_proper ... y-outlines
For example, to add 4 px black shadow, shifted 1 px to the right and 2 px down:
Code: Select all
style say_dialogue:
outlines [(4, "#000", 1, 2)]
The square brackets are there for the option to add several shadows / outlines simultaneously, e.g. 2 shadows here:
Code: Select all
style say_dialogue:
outlines [(6, "#9008", 0, 0), (4, "#000", 1, 2)]
That means 6 pixel wide semi-transparent red shadow ("#9008") added before adding the same black shadow as in the previous example.
Of course instead of using Frame() for the text box, you can still use Image(), just scale your background image to the size you need, using any graphical editor, like paint.net (Windows) or GIMP (free cross-platform editor). (Also you could use scaling by Ren'Py, but it's always best to scale all pictures beforehand, for best performance and visual quality).