Trouble with namebox
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.
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.
Trouble with namebox
I'm having trouble positioning the name of my characters. Instead of using another box to put their names in it, I just want to move their name (in this case ???) into the blue box in the picture. I've been searching for over 30 minutes and I'm still lost :/
- NoahSindri
- Regular
- Posts: 69
- Joined: Tue May 07, 2013 1:05 pm
- Projects: Truculence, Noraska:The cats valley
- Organization: Sunset Productions
- Location: Cyprus
- Contact:
Re: Trouble with namebox
You need to put the name on a window on it's own, to do this, place (show_two_window=True) behind the character's name in the defining like this:AznGreen wrote:I'm having trouble positioning the name of my characters. Instead of using another box to put their names in it, I just want to move their name (in this case ???) into the blue box in the picture. I've been searching for over 30 minutes and I'm still lost :/
Code: Select all
define R = Character('Zaniega', color ="#463E3F", show_two_window=True)Also after you do this, go to the *screens* screen you will find this at the beginning:
Code: Select all
# Defaults for side_image and two_window
default side_image = ""
default two_window = FalseThis shall work ^^
My project...please tell me your opinion
http://lemmasoft.renai.us/forums/viewto ... 43&t=22253

Website : http://sunsetproductions.webstarts.com/
Website : http://sunsetproductions.webstarts.com/
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: Trouble with namebox
Okay, I was able to achieve this, in an 800x600 game: First by saving the textbox image to 800 px wide, then...AznGreen wrote:I'm having trouble positioning the name of my characters. Instead of using another box to put their names in it, I just want to move their name (in this case ???) into the blue box in the picture. I've been searching for over 30 minutes and I'm still lost :/
In script.rpy:
Code: Select all
define a= Character('Arthur',
color="99ccff",
ctc="ctc_blink",)
Code: Select all
#########################################
## -------------- Text box ----------------------
## Frame ------------------------
style.window.background = Frame("ui/textbox modern.png", 0, 0)
## Margin is space surrounding the window, where the background
## is NOT drawn.
style.window.left_margin = 0
style.window.right_margin = 80
style.window.top_margin = 0
style.window.bottom_margin = -20
## Padding is space inside the window, where the background is
## drawn.
style.window.left_padding = 75
style.window.right_padding = 85
style.window.top_padding = 10
style.window.bottom_padding = 20
## This is the minimum height of the window, including the margins
## and padding.
style.window.yminimum = 175
## ---------- Name Box ---------------------
style.say_label.font = "LHFmisterkookyREG_0.TTF"
style.say_label.size = 30
style.say_label.bold = False
style.say_label.outlines = [(1, "#330000", 0, 0)]
Code: Select all
##############################################################################
# Quick Menu
#
# A screen that's included by the default say screen, and adds quick access to
# several useful functions.
screen quick_menu:
# Add an in-game quick menu.
hbox:
style_group "quick"
xalign 0.98 # To the \<\ Left from the Right.
yalign 1.0 # Up from the bottom.
# textbutton _("Q.Save") action QuickSave()
# textbutton _("Q.Load") action QuickLoad()
textbutton _("Main Menu") action MainMenu()
textbutton _("Save") action ShowMenu('save')
textbutton _("Load") action ShowMenu('load')
textbutton _("Skip") action Skip()
textbutton _("Auto") action Preference("auto-forward", "toggle")
################################
init -2 python:
style.quick_button.set_parent('default')
style.quick_button.background = None
# To move whole set, use xalign, above.
style.quick_button.right_padding = 5
style.quick_button.bottom_padding = 3
style.quick_button.top_padding = 3
## --------------------------------------
style.quick_button_text.set_parent('default')
# style.quick_button_text.font = "ALMAGRO_.TTF"
style.quick_button_text.size = 16
style.quick_button_text.idle_color = "#8888"
style.quick_button_text.hover_color = "#ccc"
style.quick_button_text.selected_idle_color = "#cc08"
style.quick_button_text.selected_hover_color = "#cc0"
style.quick_button_text.insensitive_color = "#4448"
style.quick_button_text.drop_shadow = [(2, 2)]
style.quick_button_text.drop_shadow_color = "#000"
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Re: Trouble with namebox
Oh thank you very much, guys. I messed around with the style.window's margin and padding for a bit and I managed to get it to work. Thank you again!
Who is online
Users browsing this forum: Bing [Bot], nyeowmi