Search found 238 matches

by drKlauz
Thu Dec 01, 2022 5:51 pm
Forum: Ren'Py Questions and Announcements
Topic: Pass a parameter to a renpy's Web version game? Get, store, use
Replies: 8
Views: 932

Re: Pass a parameter to a renpy's Web version game? Get, store, use

This worked locally with RenPy 7.5.2 and Chrome. It is hacky and will need testing with actual game on live server to be sure. define game_url=__import__("emscripten").run_script_string("document.URL") if renpy.emscripten else None I don't understand what this code is doing and ...
by drKlauz
Thu Dec 01, 2022 6:47 am
Forum: Ren'Py Questions and Announcements
Topic: Pass a parameter to a renpy's Web version game? Get, store, use
Replies: 8
Views: 932

Re: Pass a parameter to a renpy's Web version game? Get, store, use

This worked locally with RenPy 7.5.2 and Chrome. It is hacky and will need testing with actual game on live server to be sure.

Code: Select all

define game_url=__import__("emscripten").run_script_string("document.URL") if renpy.emscripten else None
by drKlauz
Sat Nov 20, 2021 4:56 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Hover one choice, dim other?
Replies: 4
Views: 488

Re: Hover one choice, dim other?

Not sure if this is best way to do it, but why not :D init python: class button_effect_fn(object): def __init__(self,tt_id): super(button_effect_fn,self).__init__() self.tt_id=tt_id def __call__(self,tf,st,at): tt=GetTooltip() if tt==self.tt_id: tf.matrixcolor=BrightnessMatrix(0.0) elif isinstance(t...
by drKlauz
Tue Nov 16, 2021 6:27 am
Forum: Development of Ren'Py
Topic: [Bug] Blinking button.
Replies: 5
Views: 3571

Re: [Bug] Blinking button.

It is not a engine problem, i believe. Rather logical issue as i see it, tho if PyTom will fix/change it to be less quirky i wouldn't complain :D To decide which imagebutton is focused renpy need to render them first, as it uses focus_mask. So it render everything, check what is focused and keep foc...
by drKlauz
Tue Nov 16, 2021 3:52 am
Forum: Development of Ren'Py
Topic: [Bug] Blinking button.
Replies: 5
Views: 3571

Re: Bug: Blinking button.

Seen this (if i understand right what you talk about), wouldn't call it a bug exactly, just annoying little thing you have to keep in mind when doing certain things. https://www.renpy.org/doc/html/screens.html#common-properties Check "focus" property there. Basically when screen have two b...
by drKlauz
Sun Nov 14, 2021 4:28 pm
Forum: Ren'Py Questions and Announcements
Topic: Adding an outline to "keywords" [Solved]
Replies: 4
Views: 725

Re: Adding an outline to "keywords"

There is a trick. outlinecolor works only if text element have outline. Example: screen test(): vbox: align (0.5,0.5) text "test {outlinecolor=#F0F}screen outlined{/} text (not working)" text "test {outlinecolor=#F0F}screen outlined{/} text (working)" outlines [(2,"#0000&quo...
by drKlauz
Sun Nov 14, 2021 4:26 pm
Forum: Ren'Py Questions and Announcements
Topic: DynamicImage translates path the wrong way
Replies: 2
Views: 315

Re: DynamicImage translates path the wrong way

Avoid using \ in paths, it is escape character in python. It is not obvious from your example, but if you use img = "D:\dir\bg.jpg" print(img) it will print "D:\dig.jpg", because \b is converted to backspace character. In this case img will be "D:\\dir\x08g.jpg" Use / i...
by drKlauz
Fri Nov 05, 2021 5:12 am
Forum: Ren'Py Questions and Announcements
Topic: Moving picture with mouse cursor (not drag)
Replies: 3
Views: 903

Re: Moving picture with mouse cursor (not drag)

As player i think moving image make more sense than moving mask. Y axis is probably not needed unless you want to have big image, just make sure mask is big enough to fit "target parts" of image without much precision. Ok, idea of this nifty little feature was interesting, so here is my ve...
by drKlauz
Thu Nov 04, 2021 12:03 am
Forum: Ren'Py Questions and Announcements
Topic: Ren'Py 7.4.10 Released
Replies: 13
Views: 6227

Re: Ren'Py 7.4.10 Released

Tested with actual game code, all problematic cases seems to work now. Thanks a lot!
by drKlauz
Sun Oct 24, 2021 8:47 am
Forum: Ren'Py Questions and Announcements
Topic: Ren'Py 7.4.10 Released
Replies: 13
Views: 6227

Re: Ren'Py 7.4.10 Released

7.4.10.2178 Use/transclude/vbox still bugged. Create new project with this code, open "About" menu, click "Increase", see value not changing, uncomment $pass, click "Increase", value changing. I seen related issue closed on git. Am i doing something wrong/weird in this ...
by drKlauz
Sun Oct 10, 2021 7:25 pm
Forum: Ren'Py Questions and Announcements
Topic: Ren'Py 7.4.9 Released
Replies: 2
Views: 5803

Re: Ren'Py 7.4.9 Released

Transclude still bugged, just bit differently, sorry :D Version 7.4.9.2142 screen about_left(val): textbutton "Increase" action SetScreenVariable("test_val",val+1) screen about_layout(val): hbox: align (0.5,0.5) spacing 100 use about_left(val) vbox: transclude screen about(): tag...
by drKlauz
Wed Sep 29, 2021 11:47 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Custom Screens
Replies: 2
Views: 402

Re: Custom Screens

Wrong quotes. Show("customscreen(_("Not Yet Implemented"))") "customscreen(_(" is considered single string. Should be something like i guess: Show("customscreen",None,_("Not Yet Implemented")) or Show("customscreen",custommessage=_("No...
by drKlauz
Tue Sep 28, 2021 8:13 am
Forum: Ren'Py Questions and Announcements
Topic: PauseAudio only works as a button, not as statement [SOLVED]
Replies: 6
Views: 504

Re: PauseAudio only works as a button, not as statement

Unless you running multiple actions or trying to run None there is no difference. def run(action, *args, **kwargs): """ :doc: run :name: renpy.run :args: (action) Run an action or list of actions. A single action is called with no arguments, a list of actions is run in order using thi...
by drKlauz
Tue Sep 28, 2021 4:08 am
Forum: Ren'Py Questions and Announcements
Topic: PauseAudio only works as a button, not as statement [SOLVED]
Replies: 6
Views: 504

Re: PauseAudio only works as a button, not as statement

This line just create action object

Code: Select all

$ PauseAudio('music', value='toggle')
To "do" action you need to call this object

Code: Select all

$ PauseAudio('music', value='toggle')()
by drKlauz
Sun Sep 26, 2021 8:11 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Positioning images with an Absolute value
Replies: 6
Views: 623

Re: [SOLVED] Positioning images with an Absolute value

Glad it helped, good luck with your game :D