Search found 19 matches

by PasswordIsntHunter2
Mon Feb 21, 2022 9:25 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Apply text style to all text in a Screen?
Replies: 2
Views: 307

[SOLVED] Apply text style to all text in a Screen?

I know you can do this, to apply style to a text object on a screen: style textstyle2 is text: size 20 font "gui/dosis-light.ttf" screen testscr: text "Test" style "textstyle2" What I want is to apply the style "textstyle2" to the screen "testscr", s...
by PasswordIsntHunter2
Fri Sep 14, 2018 4:28 pm
Forum: Ren'Py Questions and Announcements
Topic: custom Displayable: how to add children in Screen language
Replies: 1
Views: 260

custom Displayable: how to add children in Screen language

I've read the example here on how to make a creator-defined Displayable. The example gives the Displayable an image child passed in as an argument: screen alpha_magic: add Appearing("logo.png", 100, 200): xalign 0.5 yalign 0.5 label start: show screen alpha_magic "Can you find the log...
by PasswordIsntHunter2
Tue Mar 27, 2018 4:01 am
Forum: Ren'Py Questions and Announcements
Topic: setting a var from a key event stops working if I modify it
Replies: 2
Views: 390

setting a var from a key event stops working if I modify it

I'm using the mousewheel to set a variable in a Screen. Here's a script.rpy that replicates the effect: init python: var = 10 screen test: key "mousedown_4" action SetVariable("var", var+1) key "mousedown_5" action SetVariable("var", var-1) text str(var) label...
by PasswordIsntHunter2
Sat Jan 27, 2018 10:23 pm
Forum: Ren'Py Questions and Announcements
Topic: More issues with rotating/cropping in a Screen - setting a variable resets it (?!)
Replies: 0
Views: 545

More issues with rotating/cropping in a Screen - setting a variable resets it (?!)

This is a test script.rpy that demonstrates the problem (should run fine in a new project): transform turn(angle): rotate angle transform crop(): crop (0, 0, 200, 300) screen foo(angle): default hovered = False add At("gui/window_icon.png", turn(angle), crop) textbutton "Button":...
by PasswordIsntHunter2
Fri Jan 26, 2018 8:04 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Cropping an image after rotating it in a Screen
Replies: 4
Views: 1175

Re: Cropping an image after rotating it in a Screen

Blargh. I think I figured it out. It won't work if I define the filename of the image in a variable! This is my script.rpy: init python: img = "gui/window_icon.png" transform t1: xpos 200 transform t2: ypos 200 screen test1(): add "gui/window_icon.png" at t1, t2 screen test2(): a...
by PasswordIsntHunter2
Fri Jan 26, 2018 4:06 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Cropping an image after rotating it in a Screen
Replies: 4
Views: 1175

[SOLVED] Cropping an image after rotating it in a Screen

I found This old thread which describes exactly what I want to do - chaining two transforms using the syntax "show image at transform1, transform2". This does not work using the "add" statement in a screen. Only the last transform (after the comma) will be applied. What can I do ...
by PasswordIsntHunter2
Thu Jan 18, 2018 4:50 pm
Forum: Ren'Py Questions and Announcements
Topic: how to make Button respond to its image child?
Replies: 3
Views: 506

Re: how to make Button respond to its image child?

Using focus_mask as my image means the only sensitive part of the button is the image. Making a custom focus_mask image with a box where the text would be is not possible, since the text can be of arbitrary length. Setting the focus_mask to True or None also does not seem to work (the image portion ...
by PasswordIsntHunter2
Thu Jan 18, 2018 9:33 am
Forum: Ren'Py Questions and Announcements
Topic: how to make Button respond to its image child?
Replies: 3
Views: 506

how to make Button respond to its image child?

I have a Button (the screen language Button which takes multiple children), with a Text and an Image (using "add") inside it. If I hover over the text, the Button's "hovered" action is run, and if I click on the text, the "action" is run. But if I hover over the image o...
by PasswordIsntHunter2
Wed Jan 17, 2018 2:05 am
Forum: Ren'Py Questions and Announcements
Topic: [BUG] Resampling images darkens colors on partially-transparent areas
Replies: 2
Views: 471

Re: [BUG] Resampling images darkens colors on partially-transparent areas

That's not the issue. I've seen this before in other engines. (also I packaged the game up, and had to custom-make the checkerboard grid since it isn't included in a build, and it still occurs) The images aren't being made partially transparent - the image on the right, which isn't resampled, displa...
by PasswordIsntHunter2
Tue Jan 16, 2018 11:33 pm
Forum: Ren'Py Questions and Announcements
Topic: [BUG] Resampling images darkens colors on partially-transparent areas
Replies: 2
Views: 471

[BUG] Resampling images darkens colors on partially-transparent areas

Whenever I use Scale or FactorScale on an image (with the default bilinear=True), the resampling algorithm darkens some areas of the image because it's not taking transparency into account correctly when averaging. Using Nearest Neighbor sampling does not have this issue but of course Nearest Neighb...
by PasswordIsntHunter2
Thu Jan 11, 2018 8:15 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved?] How do I run ren'py script inside a user-defined statement?
Replies: 10
Views: 3129

Re: How do I run ren'py script inside a user-defined statement?

I might have gotten it working-ish - sorry for the bump, but I'm not sure if I'm doing it exactly right. For loading/rollback (which are the same thing since a save is just the serialized log object) to work, you need Rollback objects in the log marked as checkpoints corresponding to each statement ...
by PasswordIsntHunter2
Tue Jan 09, 2018 8:11 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved?] How do I run ren'py script inside a user-defined statement?
Replies: 10
Views: 3129

Re: How do I run ren'py script inside a user-defined statement?

Yes, if I do this, it goes back to where it was at the end: def execute_test(o): old_next = renpy.game.context().next_node for stmt in o[1]: stmt.execute() renpy.game.context().next_node = old_next ...but it still has a problem with saving/loading while inside the test: block, and probably some othe...
by PasswordIsntHunter2
Tue Jan 09, 2018 9:27 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved?] How do I run ren'py script inside a user-defined statement?
Replies: 10
Views: 3129

Re: How do I run ren'py script inside a user-defined statement?

Hmm, no progress so far - renpy.invoke_in_new_context() throws an error " 'NoneType' object is not callable" - I guess the invoke function would be trying to call what was returned from execute(), and execute() doesn't return anything? I might look through invoke_in_new_context() to see wh...