Divona wrote:I don't see why
hbox is being use. It's for display things side by side. There also nothing showing on history screen that indicating the
use of "game_menu" screen, so why does it still being used by history screen?
The way to adjusting the position of your history frame (vpgrid) is not in "screen history" but in "screen game_menu" vpgrid itself because you're still attached the game_menu in this history screen.
Personally, I would get rid the use of game_menu screen and do the independent
vpgrid within history screen itself. But then, I don't know how your other screens are like.
I tried adding hbox because they give me an error when I just put ysize without the hbox
I've read and tried the vpgrid thingy, but I couldn't figure out how to do it ><
If I remove the "use game_menu(_("")", the game will give me an error instead
My other screens, do you mean my Credit and Preference page? Or do you mean all my other pages like my main screen and my dialogue screen?
Saltome wrote:Can't really tell. Your history screen looks perfectly normal.
I assume you have changed various style settings, because this sure as hell doesn't look anywhere close to my history menu.
In which case I would need to see your screens.rpy and your gui.rpy files.
Here's my history part in the gui.rpy if it helps~
Code: Select all
## History #####################################################################
##
## The history screen displays dialogue that the player has already dismissed.
## The number of blocks of dialogue history Ren'Py will keep.
define config.history_length = 10
## The height of a history screen entry, or None to make the height variable at
## the cost of performance.
define gui.history_height = None
## The position, width, and alignment of the label giving the name of the
## speaking character.
define gui.history_name_xpos = 180
define gui.history_name_ypos = 15
define gui.history_name_width = 80
define gui.history_name_xalign = 1.0
## The position, width, and alignment of the dialogue text.
define gui.history_text_xpos = 200
define gui.history_text_ypos = 15
define gui.history_text_width = 700
define gui.history_text_xalign = 0.0
define _game_menu_screen = None
and the whole section of my history part in the screens.rpy
Code: Select all
## History screen ##############################################################
##
## This is a screen that displays the dialogue history to the player. While
## there isn't anything special about this screen, it does have to access the
## dialogue history stored in _history_list.
##
## https://www.renpy.org/doc/html/history.html
screen history():
tag menu
## Avoid predicting this screen, as it can be very large.
predict False
use game_menu(_(""), scroll=("vpgrid2" if gui.history_height else "viewport2")):
style_prefix "history"
for h in _history_list:
window:
## This lays things out properly if history_height is None.
has fixed:
yfit True
if h.who:
label h.who:
style "history_name"
## Take the color of the who text from the Character, if
## set.
if "color" in h.who_args:
text_color h.who_args["color"]
text h.what
if not _history_list:
label _("The dialogue history is empty.")
add "gui/history_img.png":
xalign 0.5
yalign 0.2
style history_window is empty
style history_name is gui_label
style history_name_text is gui_label_text
style history_text is gui_text
style history_text is gui_text
style history_label is gui_label
style history_label_text is gui_label_text
style history_window:
xfill True
ysize gui.history_height
style history_name:
xpos gui.history_name_xpos
xanchor gui.history_name_xalign
ypos gui.history_name_ypos
xsize gui.history_name_width
style history_name_text:
min_width gui.history_name_width
text_align gui.history_name_xalign
style history_text:
xpos gui.history_text_xpos
ypos gui.history_text_ypos
xanchor gui.history_text_xalign
xsize gui.history_text_width
min_width gui.history_text_width
text_align gui.history_text_xalign
layout ("subtitle" if gui.history_text_xalign else "tex")
style history_label:
xfill True
style history_label_text:
xalign 0.5
and my game menu part in the screens.rpy
Code: Select all
## Game Menu screen ############################################################
##
## This lays out the basic common structure of a game menu screen. It's called
## with the screen title, and displays the background, title, and navigation.
##
## The scroll parameter can be None, or one of "viewport" or "vpgrid". When this
## screen is intended to be used with one or more children, which are
## transcluded (placed) inside it.
screen game_menu(title, scroll=None):
# Add the backgrounds.
if main_menu:
add gui.main_menu_background
else:
add gui.game_menu_background
style_prefix "game_menu"
frame:
style "game_menu_outer_frame"
hbox:
# Reserve space for the navigation section.
#frame:
#style "game_menu_navigation_frame"
null width 100
frame:
style "game_menu_content_frame"
ysize 0.6
if scroll == "viewport":
viewport:
scrollbars "vertical"
mousewheel True
draggable True
side_yfill True
vbox:
transclude
elif scroll == "viewport2":
viewport:
yinitial 1.0
scrollbars "vertical"
mousewheel True
draggable True
side_yfill True
vbox:
transclude
elif scroll == "vpgrid":
vpgrid:
cols 1
yinitial 1.0
scrollbars "vertical"
mousewheel True
draggable True
side_yfill True
transclude
else:
transclude
# use navigation
imagebutton auto "gui/menu/return_%s.png":
style "return_button"
ypos 0.8
xpos 600
action Return() activate_sound "sfx/click.wav" hover_sound "sfx/hover.wav"
label title
if main_menu:
key "game_menu" action ShowMenu("main_menu")
style game_menu_outer_frame is empty
style game_menu_navigation_frame is empty
style game_menu_content_frame is empty
style game_menu_viewport is gui_viewport
style game_menu_side is gui_side
style game_menu_scrollbar is gui_vscrollbar
style game_menu_label is gui_label
style game_menu_label_text is gui_label_text
style return_button is navigation_button
style return_button_text is navigation_button_text
style game_menu_outer_frame:
bottom_padding 30
top_padding 120
background "gui/game_menu.jpg"
style game_menu_navigation_frame:
xsize 280
yfill True
style game_menu_content_frame:
left_margin 40
right_margin 20
top_margin 10
style game_menu_viewport:
xsize 920
style game_menu_vscrollbar:
unscrollable gui.unscrollable
style game_menu_side:
spacing 10
style game_menu_label:
xpos 50
ysize 120
style game_menu_label_text:
size gui.title_text_size
color gui.accent_color
yalign 0.5
style return_button:
xpos gui.navigation_xpos
yalign 1.0
yoffset -30
Let me know if there's anything else you need!