focus_mask = True
init python:
gui.init(1920, 1080)
## Choice Buttons ##############################################################
##
## Choice buttons are used in the in-game menus.
define gui.choice_button_width = 1185
define gui.choice_button_height = None
define gui.choice_button_tile = False
define gui.choice_button_borders = Borders(150, 8, 150, 8)
define gui.choice_button_text_font = gui.default_font
define gui.choice_button_text_size = gui.text_size
define gui.choice_button_text_xalign = 0.5
define gui.choice_button_text_idle_color = "#cccccc"
define gui.choice_button_text_hover_color = "#ffffff"
Stop, what did you just said ? I really need to find some times to sleep, I miss the obviousUhm... your borders, and the width of the buttons exceed the width of your viewport...
imagebutton auto "gui/new_%s.png" xpos 117 ypos 880 action Start()
screen navigation():
imagebutton auto "gui/back_%s.png" xpos 925 ypos 925 action Return()
imagebutton auto "gui/load_%s.png" xpos 150 ypos 150 action ShowMenu("load")
imagebutton auto "gui/pref_%s.png" xpos 350 ypos 150 action ShowMenu("preferences")
imagebutton auto "gui/help_%s.png" xpos 550 ypos 550 action Help()
imagebutton auto "gui/patr_%s.png" xpos 750 ypos 150 action OpenURL("https://www.patreon.com/")
screen main_menu():
## This ensures that any other menu screen is replaced.
tag menu
style_prefix "main_menu"
add "gui/main_menu.png"
imagebutton auto "gui/new_%s.png" xpos 117 ypos 880 action Start()
imagebutton auto "gui/load_%s.png" xpos 317 ypos 880 action ShowMenu("load")
imagebutton auto "gui/pref_%s.png" xpos 507 ypos 880 action ShowMenu("preferences")
imagebutton auto "gui/help_%s.png" xpos 1500 ypos 880 action Help()
imagebutton auto "gui/quit_%s.png" xpos 1700 ypos 880 action Quit(confirm=True)
imagebutton auto "gui/cred_%s.png" xpos 1300 ypos 900 action ShowMenu("about")
imagebutton auto "gui/patr_%s.png" xpos 1700 ypos 50 action OpenURL("https://www.patreon.com/")
I'm sorry, but an uncaught exception occurred.
After initialization, but before game start.
File "renpy/common/00start.rpy", line 76, in _init_language
renpy.change_language(language)
File "game/screens.rpy", line 154, in <module>
xpos gui.dialogue_xpos
AttributeError: 'StoreModule' object has no attribute 'dialogue_xpos'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "H:\renpy-6.99.12.4-sdk\renpy\bootstrap.py", line 295, in bootstrap
renpy.main.main()
File "H:\renpy-6.99.12.4-sdk\renpy\main.py", line 487, in main
run(restart)
File "H:\renpy-6.99.12.4-sdk\renpy\main.py", line 69, in run
renpy.translation.init_translation()
File "H:\renpy-6.99.12.4-sdk\renpy\translation\__init__.py", line 506, in init_translation
renpy.store._init_language() # @UndefinedVariable
File "renpy/common/00start.rpy", line 76, in _init_language
renpy.change_language(language)
File "H:\renpy-6.99.12.4-sdk\renpy\translation\__init__.py", line 583, in change_language
new_change_language(tl, language)
File "H:\renpy-6.99.12.4-sdk\renpy\translation\__init__.py", line 553, in new_change_language
i.apply()
File "H:\renpy-6.99.12.4-sdk\renpy\ast.py", line 2224, in apply
value = renpy.python.py_eval(expr)
File "H:\renpy-6.99.12.4-sdk\renpy\python.py", line 1749, in py_eval
return py_eval_bytecode(code, globals, locals)
File "H:\renpy-6.99.12.4-sdk\renpy\python.py", line 1743, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/screens.rpy", line 154, in <module>
xpos gui.dialogue_xpos
AttributeError: 'StoreModule' object has no attribute 'dialogue_xpos'
Windows-7-6.1.7601-SP1
Ren'Py 6.99.12.4.2187
The Unconventional Love Triangle 0.1
The variables gui.dialogue_xpos and gui.dialogue_ypos are usually defined in gui.rpy. Look fot a larger section called "Dialogue".Ok i did some tinkering but now im getting an error:
Any assistance, i can not find where and how i should place this attribute.Code:I'm sorry, but an uncaught exception occurred. After initialization, but before game start. File "renpy/common/00start.rpy", line 76, in _init_language renpy.change_language(language) File "game/screens.rpy", line 154, in <module> xpos gui.dialogue_xpos AttributeError: 'StoreModule' object has no attribute 'dialogue_xpos' -- Full Traceback ------------------------------------------------------------ Full traceback: File "H:\renpy-6.99.12.4-sdk\renpy\bootstrap.py", line 295, in bootstrap renpy.main.main() File "H:\renpy-6.99.12.4-sdk\renpy\main.py", line 487, in main run(restart) File "H:\renpy-6.99.12.4-sdk\renpy\main.py", line 69, in run renpy.translation.init_translation() File "H:\renpy-6.99.12.4-sdk\renpy\translation\__init__.py", line 506, in init_translation renpy.store._init_language() # @UndefinedVariable File "renpy/common/00start.rpy", line 76, in _init_language renpy.change_language(language) File "H:\renpy-6.99.12.4-sdk\renpy\translation\__init__.py", line 583, in change_language new_change_language(tl, language) File "H:\renpy-6.99.12.4-sdk\renpy\translation\__init__.py", line 553, in new_change_language i.apply() File "H:\renpy-6.99.12.4-sdk\renpy\ast.py", line 2224, in apply value = renpy.python.py_eval(expr) File "H:\renpy-6.99.12.4-sdk\renpy\python.py", line 1749, in py_eval return py_eval_bytecode(code, globals, locals) File "H:\renpy-6.99.12.4-sdk\renpy\python.py", line 1743, in py_eval_bytecode return eval(bytecode, globals, locals) File "game/screens.rpy", line 154, in <module> xpos gui.dialogue_xpos AttributeError: 'StoreModule' object has no attribute 'dialogue_xpos' Windows-7-6.1.7601-SP1 Ren'Py 6.99.12.4.2187 The Unconventional Love Triangle 0.1
Yeah, there's few changes and now you are missing four variables added to the gui. I give them to you, with there default value :Ok i did some tinkering but now im getting an error:
define gui.dialogue_xpos = 560
define gui.dialogue_ypos = 905
## The maximum width of dialogue text, in pixels.
define gui.dialogue_width = 650
## The horizontal alignment of the dialogue text. This can be 0.0 for left-
## aligned, 0.5 for centered, and 1.0 for right-aligned.
define gui.dialogue_text_xalign = 0.0
You either have one or the other, but neither both for the same error. "errors.txt" is filed with the errors at parsing time, while "traceback.txt" is filled with the traceback generated by an unexpected exception at run time.If this doesn't help please attach file "errors.txt" - the "traceback.txt" file is sometimes misleading.
Yeah, there's few changes and now you are missing four variables added to the gui. I give them to you, with there default value :
Code:define gui.dialogue_xpos = 560 define gui.dialogue_ypos = 905 ## The maximum width of dialogue text, in pixels. define gui.dialogue_width = 650 ## The horizontal alignment of the dialogue text. This can be 0.0 for left- ## aligned, 0.5 for centered, and 1.0 for right-aligned. define gui.dialogue_text_xalign = 0.0
You either have one or the other, but neither both for the same error. "errors.txt" is filed with the errors at parsing time, while "traceback.txt" is filled with the traceback generated by an unexpected exception at run time.
But I agree, the traceback can be misleading.
You piqued my curiosity.In theory this is totally correct. But actually it is pretty simple to create errors (especially in the pre-game-start phase) which lead to "traceback.txt" AND to "errors.txt". If you don't believe this just send me a private message and i give you an example.
Because it work like CSS with way less possibilities (and probably a weaker box model). You can align at x% of the vertical or horizontal available space, and that's all. Everything else ask for a fixed number of pixels. Like in the same time the notion of "available" space depend of what's inside the widget/box (like CSS), you reach a dead end most of the time.Is there not a way to setup anchor points in ren'py? All those hardcoded pixel widths/heights aren't appealing to me.
And if there is a way to make them, why aren't they used more frequently?
frame:
button1 xalign 0.0
button2 xalign 0.5
button3 xalign 1.0