Can I make it so you can't click the screen, just the buttons?
screen whatever():
modal True
imagebutton:
auto "whatever"
action whatever
screen whatever():
# Every click outside of the following image buttons will be
# for this one.
imagebutton:
idle Solid( "#00000000" )
xpos 0 ypos 0
xsize config.screen_width
ysize config.screen_height
action NullAction()
imagebutton:
auto "whatever"
action whatever
modal
property, by example because you have an internal sub screen :screen whatever():
default opened = False
if opened is True:
# Every click outside of the following image buttons will be
# for this one.
imagebutton:
idle Solid( "#00000000" )
xpos 0 ypos 0
xsize config.screen_width
ysize config.screen_height
action NullAction()
[...]
else:
textbutton "Edit":
action SetScreenVariable( "opened", True )
[...]
screen whatever():
# Every click outside of the following image buttons will be
# for this one.
imagebutton:
idle Solid( "#00000000" )
xpos 0 ypos 0
xsize config.screen_width
# 250 is the default size of the say window.
# Therefore, cover the screen and its still shown clickable UI,
# but let the player click on the say window to advance the
# dialog.
ysize config.screen_height - 250
action NullAction()
imagebutton:
auto "whatever"
action whatever
if
that will show or not the buttons.screen videoPlayer( views ):
# By default, use the first view.
default actual = 0
# Show the video for the actual view.
add views[actual]
vbox:
# For each view..
for i in range( 0, len( views ) ):
# add an image button...
imagebutton:
# correctly named...
auto ( "videoButton{}_%s.png".format( i ) )
# that will change the view.
action SetScreenVariable( "actual", i )
imagebutton:
auto "videoButtonReturn_%s.png"
action Return()
label whatever:
call screen videoPlayer( [ "images/videos/BJ1.webm", "images/videos/BJ2.webm", images/videos/BJ3.webm" ] )
Thank you (again lol) my game would be a jigsaw puzzle without a lid going around in a linear circle without ppl like you.Option 1, theYou must be registered to see the linksscreen property, that will prevent the player to click outside of the screen :
Code:screen whatever(): modal True imagebutton: auto "whatever" action whatever
Option 2, create your own modal-like screen :
Not really needed in this particular case, but always good method to know. Useful in case where you can't use thePython:screen whatever(): # Every click outside of the following image buttons will be # for this one. imagebutton: idle Solid( "#00000000" ) xpos 0 ypos 0 xsize config.screen_width ysize config.screen_height action NullAction() imagebutton: auto "whatever" action whatever
modal
property, by example because you have an internal sub screen :
Or if you intend to have dialog lines during the video :Python:screen whatever(): default opened = False if opened is True: # Every click outside of the following image buttons will be # for this one. imagebutton: idle Solid( "#00000000" ) xpos 0 ypos 0 xsize config.screen_width ysize config.screen_height action NullAction() [...] else: textbutton "Edit": action SetScreenVariable( "opened", True ) [...]
You can also use it to cover part of the buttons of the UI that shouldn't be clicked, while still letting available those that can be clicked.Python:screen whatever(): # Every click outside of the following image buttons will be # for this one. imagebutton: idle Solid( "#00000000" ) xpos 0 ypos 0 xsize config.screen_width # 250 is the default size of the say window. # Therefore, cover the screen and its still shown clickable UI, # but let the player click on the say window to advance the # dialog. ysize config.screen_height - 250 action NullAction() imagebutton: auto "whatever" action whatever
Personally I use it a lot when modding, since I can't edit the original screen to putif
that will show or not the buttons.
Option 3, put the video directly into the screen, to have an universal player :
You need to have at least images named "videoButton1_idle.png", "videoButton2_idle.png", "videoButton3_idle.png", and so on to cover the maximal number of views.Python:screen videoPlayer( views ): # By default, use the first view. default actual = 0 # Show the video for the actual view. add views[actual] vbox: # For each view.. for i in range( 0, len( views ) ): # add an image button... imagebutton: # correctly named... auto ( "videoButton{}_%s.png".format( i ) ) # that will change the view. action SetScreenVariable( "actual", i ) imagebutton: auto "videoButtonReturn_%s.png" action Return() label whatever: call screen videoPlayer( [ "images/videos/BJ1.webm", "images/videos/BJ2.webm", images/videos/BJ3.webm" ] )
This one is the one I prefer, one single screen and all your videos are automatically covered.
I have just gotten around to trying this and its not working, this is my codeOption 1, theYou must be registered to see the linksscreen property, that will prevent the player to click outside of the screen :
Code:screen whatever(): modal True imagebutton: auto "whatever" action whatever
Option 2, create your own modal-like screen :
Not really needed in this particular case, but always good method to know. Useful in case where you can't use thePython:screen whatever(): # Every click outside of the following image buttons will be # for this one. imagebutton: idle Solid( "#00000000" ) xpos 0 ypos 0 xsize config.screen_width ysize config.screen_height action NullAction() imagebutton: auto "whatever" action whatever
modal
property, by example because you have an internal sub screen :
Or if you intend to have dialog lines during the video :Python:screen whatever(): default opened = False if opened is True: # Every click outside of the following image buttons will be # for this one. imagebutton: idle Solid( "#00000000" ) xpos 0 ypos 0 xsize config.screen_width ysize config.screen_height action NullAction() [...] else: textbutton "Edit": action SetScreenVariable( "opened", True ) [...]
You can also use it to cover part of the buttons of the UI that shouldn't be clicked, while still letting available those that can be clicked.Python:screen whatever(): # Every click outside of the following image buttons will be # for this one. imagebutton: idle Solid( "#00000000" ) xpos 0 ypos 0 xsize config.screen_width # 250 is the default size of the say window. # Therefore, cover the screen and its still shown clickable UI, # but let the player click on the say window to advance the # dialog. ysize config.screen_height - 250 action NullAction() imagebutton: auto "whatever" action whatever
Personally I use it a lot when modding, since I can't edit the original screen to putif
that will show or not the buttons.
Option 3, put the video directly into the screen, to have an universal player :
You need to have at least images named "videoButton1_idle.png", "videoButton2_idle.png", "videoButton3_idle.png", and so on to cover the maximal number of views.Python:screen videoPlayer( views ): # By default, use the first view. default actual = 0 # Show the video for the actual view. add views[actual] vbox: # For each view.. for i in range( 0, len( views ) ): # add an image button... imagebutton: # correctly named... auto ( "videoButton{}_%s.png".format( i ) ) # that will change the view. action SetScreenVariable( "actual", i ) imagebutton: auto "videoButtonReturn_%s.png" action Return() label whatever: call screen videoPlayer( [ "images/videos/BJ1.webm", "images/videos/BJ2.webm", images/videos/BJ3.webm" ] )
This one is the one I prefer, one single screen and all your videos are automatically covered.
screen pen_blw1:
modal True
hbox:
xalign 1.0
yalign 0
imagebutton auto "pblow1_%s.png" action Jump("pull_me")
screen pen_blw2:
modal True
hbox:
xalign 1.0
yalign 0.1
imagebutton auto "pblow2_%s.png" action Jump("suck_me")
screen pen_blw3:
modal True
hbox:
xalign 1.0
yalign 0.2
imagebutton auto "pblow3_%s.png" action Jump("penny_8fuck")
AThats the screen for my 3 image buttons, I am using show screen to bring them up, but the modal thingy is doing nothing.
show
n screen is supposed to stay will the dialog continue, therefore, the click can't be blocked. It would lead to a dead end, you can't click to make the dialog advance and reach the line where the screen is hidden, and there's possibly no action on the screen that will hide it ; for a call
ed screen not having action is a design error, but for a show
n one it's natural.modal
property is ignored.Maybe adding an image as a background will block interactivity outside the screen; or a "zorder".I have just gotten around to trying this and its not working, this is my code
Thats the screen for my 3 image buttons, I am using show screen to bring them up, but the modal thingy is doing nothing.Python:screen pen_blw1: modal True hbox: xalign 1.0 yalign 0 imagebutton auto "pblow1_%s.png" action Jump("pull_me") screen pen_blw2: modal True hbox: xalign 1.0 yalign 0.1 imagebutton auto "pblow2_%s.png" action Jump("suck_me") screen pen_blw3: modal True hbox: xalign 1.0 yalign 0.2 imagebutton auto "pblow3_%s.png" action Jump("penny_8fuck")
screen pen_blw1:
modal True
zorder 101 ## Keep screen at the top
add "image_pen_blw1" ## background image, but that's not the solution if you play an animation :-p
hbox:
xalign 1.0
yalign 0
imagebutton auto "pblow1_%s.png" focus_mask True action Hide("pen_blw1"), Jump("pull_me") ## Added focus mask
Righto, because I am a coding hack, for the life of me I could not get what anne O'nymous said to work.Maybe adding an image as a background will block interactivity outside the screen; or a "zorder".
I also think it's better, if you use "show", to hide the "screen" just before the "action" you want the button to do.
Python:screen pen_blw1: modal True zorder 101 ## Keep screen at the top add "image_pen_blw1" ## background image, but that's not the solution if you play an animation :-p hbox: xalign 1.0 yalign 0 imagebutton auto "pblow1_%s.png" focus_mask True action Hide("pen_blw1"), Jump("pull_me") ## Added focus mask
What do he have more than me ?BUT mgomez0077 you are officially now my new best friend.
I'm a bit of a slut, you will be back on top next week.What do he have more than me ?
just kidding, of course, but it was too tempting
It is transparent its just a blank .png. I dont think I needed to change the resolution, I think Modal True was the issue, for some reason even though it did nothing it bugged out me hack. I'll look later, fucked around enough on this for now.Oh, by the way... if it worked for you to create a blank image, maybe the best thing would be to create a transparent image, the PNG format allows it, so you won't have to use strange resolutions.
First rule: "If it works, don't touch it" LOLIt is transparent its just a blank .png. I dont think I needed to change the resolution, I think Modal True was the issue, for some reason even though it did nothing it bugged out me hack. I'll look later, fucked around enough on this for now.
How do you think that myself I can help ? I just struggled way more often than you, it's all.Now seriously, if I can give those tips (which sometimes work and sometimes don't) it's because I've had to struggle with those same kinds of problems... overcoming them is when you learn; and that's done more easily with the help of those who know
Frame( "image/whatever its name.png", size=( config.screen_width, config.screen_height )
.image noClick = Frame( "image/whatever its name.png", size=( config.screen_width, config.screen_height )
screen whatever():
[...]
imagebutton:
idle noClick
action NullAction()
how should 3 simultaneous modal screens work? create 1 screen with the 3 buttons and make that screen modal.Thats the screen for my 3 image buttons, I am using show screen to bring them up, but the modal thingy is doing nothing.
I'll try that before I release this chapter, I have nearly finished it and Ill look at it then and let you know if it worked.how should 3 simultaneous modal screens work? create 1 screen with the 3 buttons and make that screen modal.
screen pen_all:
modal True
zorder 101
hbox:
xalign 1.0
yalign 0.0
imagebutton auto "pblow1_%s.png" focus_mask True action Hide("pen_all"), Jump("pull_me")
spacing 20
imagebutton auto "pblow2_%s.png" focus_mask True action Hide("pen_all"), Jump("suck_me")
spacing 20
imagebutton auto "pblow3_%s.png" focus_mask True action Hide("pen_all"), Jump("penny_8fuck")