Search found 1920 matches

by philat
Tue Apr 30, 2024 12:01 am
Forum: Ren'Py Questions and Announcements
Topic: Custom GUI - Button and slider alignment/positioning
Replies: 5
Views: 170

Re: Custom GUI - Button and slider alignment/positioning

Hard to say without either your assets or your code, but in general try looking into align properties (https://www.renpy.org/doc/html/style_properties.html#style-property-yalign) or gutter properties (https://www.renpy.org/doc/html/style_properties.html#style-property-top_gutter). In the case of the...
by philat
Mon Apr 29, 2024 11:55 am
Forum: Ren'Py Questions and Announcements
Topic: Making an imagebutton move from within python function
Replies: 10
Views: 261

Re: Making an imagebutton move from within python function

My bad, that should be a repeating timer.

Code: Select all

screen repeating_function():
    default counter = 0
    timer 0.5 repeat True action If(counter < len(path), [Function(move_testcar, counter), IncrementScreenVariable("counter")], Hide()) 
by philat
Mon Apr 29, 2024 8:05 am
Forum: Ren'Py Questions and Announcements
Topic: Defining Drag as displayable
Replies: 4
Views: 185

Re: Defining Drag as displayable

*shrug* tbh not sure, I don't tend to use Drags() much. That said, I haven't really found any reason to need Drags(), since you can always build the drags programmatically if you need to get data from elsewhere. For example: init python: def rice_dragged(drags, drop): print("rice") def egg...
by philat
Mon Apr 29, 2024 3:41 am
Forum: Ren'Py Questions and Announcements
Topic: Making an imagebutton move from within python function
Replies: 10
Views: 261

Re: Making an imagebutton move from within python function

Ah, yes, I had skimmed the part of the OP that said that. Well, the principle remains the same, I guess, just adjusted to move one "step" at a time and wait before moving to the next step. I would probably use a timer to repeatedly call the function on a small delay. screen repeating_funct...
by philat
Mon Apr 29, 2024 12:39 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Need help for name choice
Replies: 2
Views: 144

Re: Need help for name choice

Use either of the following if checks:

Code: Select all

if Name == "A" or Name == "B" or ... :

if Name in ["A", "B" ... ]:
by philat
Mon Apr 29, 2024 12:35 am
Forum: Ren'Py Questions and Announcements
Topic: Making an imagebutton move from within python function
Replies: 10
Views: 261

Re: Making an imagebutton move from within python function

While you CAN use a CDD for finer control, you also don't need it for simple linear movement. (Sidenote: I don't understand how your move_testcar function is supposed to work in the context of the game, but I assume that's due to it being edited for posting here.) init python: def move_testcar(): gl...
by philat
Sun Apr 28, 2024 10:34 pm
Forum: Ren'Py Questions and Announcements
Topic: Defining Drag as displayable
Replies: 4
Views: 185

Re: Defining Drag as displayable

The following mostly seems to work. For reference, supplying transforms to a drag using at is not supported even when using screen drags (not Drag()s). Other attributes (like dragged, draggable, etc.) should probably be given in the Drag() definition and not added to the screen directly. screen drag...
by philat
Sun Apr 28, 2024 11:00 am
Forum: Ren'Py Questions and Announcements
Topic: [solved] get click position on the button?
Replies: 5
Views: 143

Re: get click position on the button?

Wouldn't renpy.focus_coordinates (https://www.renpy.org/doc/html/other.ht ... oordinates ) be enough to get the info you need?
by philat
Thu Apr 25, 2024 1:34 am
Forum: Ren'Py Questions and Announcements
Topic: Should I be using imagemaps or imagebutton for an interactive flowchart (zooming, mouse navigation, etc)
Replies: 4
Views: 253

Re: Should I be using imagemaps or imagebutton for an interactive flowchart (zooming, mouse navigation, etc)

Note that I am not particularly offering advice on how to best approach this, because that's a complicated question that I am ill equipped to deal with without your assets or your design goals. Simply to answer your specific question: the way you do it now the hotspots would be in a different place,...
by philat
Thu Apr 25, 2024 1:04 am
Forum: Ren'Py Questions and Announcements
Topic: Vbox in screen seems to... move around? [SOLVED!]
Replies: 2
Views: 139

Re: Vbox in screen seems to... move around?

If box size is not specified, a box is only as large as it needs to be - i.e., the size of the largest child. While there are many ways to approach organizing your screen, the path of least change for now is probably to specify the xsize of your vbox.
by philat
Tue Apr 23, 2024 12:03 am
Forum: Ren'Py Questions and Announcements
Topic: Using imagemaps to create a flowchart, hotspots not working
Replies: 2
Views: 195

Re: Using imagemaps to create a flowchart, hotspots not working

A hotspot needs an action to be hoverable (use NullAction() as a placeholder if need be). You also wouldn't be able to see whether your hotspot is since your idle and hover images are the same. imagemap: ground "flowchart_repaired_no_true" idle Solid("#FF09", xysize=(config.scree...
by philat
Fri Apr 12, 2024 9:27 pm
Forum: Ren'Py Questions and Announcements
Topic: Variable Layered Image/Composite Within an Item Definition
Replies: 5
Views: 254

Re: Variable Layered Image/Composite Within an Item Definition

Eh... I mean, that's a data structure question and basically only you can decide, but if you don't want to change the static item definitions, you could just have a list/dictionary in the screen to keep track (i.e., toppings = {0:[True, False], 1:[False, False]} etc. with True/False switches for eac...
by philat
Fri Apr 12, 2024 8:32 pm
Forum: Ren'Py Questions and Announcements
Topic: Variable Layered Image/Composite Within an Item Definition
Replies: 5
Views: 254

Re: Variable Layered Image/Composite Within an Item Definition

Probably simplest route would be to use a ConditionSwitch or LayeredImage with conditions for the toppings in place of the LiveComposite.
by philat
Fri Apr 12, 2024 8:31 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Accessing the content of say statement inside character callback?
Replies: 2
Views: 205

Re: Accessing the content of say statement inside character callback?

Merely linking because I remember seeing this discussion but did not actually try any of it: viewtopic.php?p=558474
by philat
Thu Apr 11, 2024 2:48 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved!] Name Generator generating twice?
Replies: 5
Views: 294

Re: Name Generator generating twice?

The whole thing seems wildly overengineered, tbh. define mc = DynamicCharacter("mc_name") default names = ["Eisley","Romi","Arianwen","Elvira","Belphoebe","Etol","Aralueni","Morag","Ottoline","Ve...