Drag and Drop and Focus Mask not working for me.

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Drag and Drop and Focus Mask not working for me.

#1 Post by trooper6 » Mon Jul 04, 2016 3:38 am

Hell All!

I'm in the process of making a tester program for each of the renpy updates from 6.99.0 to our current release. For each one I go through the change log and try to test out each new change to see if I can get it.

I'm currently doing 6.99.0. I'm nearing the end of the tester, and came to the info that Drags now take focus_mask. Since this is also my first time messing with Drag and Drop, I wanted to do three different versions: 1) with screens as in the documentation example, 2) when I create drags from their classes and add those to screens as described in the documentation, but with no examples provided, and 3) where I create a subclass of the draggable with original position location so I can snap the draggable to is original position if it is not dropped on a droppable. So I got all of that working...but in none of the versions does focus_mask True seem to work. the droppables have both an idle and a hover version, so you can see when the hover is triggered, but in all versions the hover glow shows up when transparent parts of the images overlap...and I thought focus_mask True was supposed to make that not happen.

What am I doing wrong here?

I'm including the drag and drop portion of the project so that people can test it out themselves and see what I'm doing with the drag and drop code in general (perhaps it is interesting for you) as well as see how the focus_mask doesn't seem to be working for me.

Thanks!
Attachments
Drag and Drop Explorations.zip
(926.73 KiB) Downloaded 19 times
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Drag and Drop and Focus Mask not working for me.

#2 Post by trooper6 » Tue Jul 05, 2016 12:43 pm

No one has commented yet, so I thought I'd post some of the code to see if that might spur someone. Though, to see that the focus_mask isn't working, you'd really want to download the project. Here is one of the screens I use for this drag and drop exploration--where the focus_mask doesn't work:

Code: Select all

screen map_screen():
    add "lee_map" align(0.5,0.5)
    
    draggroup:
        drag:
            drag_name "Pete"
            child "det"
            focus_mask True
            droppable False
            dragged det_dragged
            xpos 0 ypos 0
        drag:
            drag_name "Market"
            idle_child "ev_idle"
            selected_idle_child "ev_hover"
            focus_mask True
            draggable False
            xpos 150 ypos 55
        drag:
            drag_name "Armory"
            idle_child "ev_idle"
            selected_idle_child "ev_hover"
            focus_mask True
            draggable False
            xpos 170 ypos 250
        drag:
            drag_name "Barracks"
            idle_child "ev_idle"
            selected_idle_child "ev_hover"
            focus_mask True
            draggable False
            xpos 400 ypos 100
        drag:
            drag_name "Inn"
            idle_child "ev_idle"
            selected_idle_child "ev_hover"
            focus_mask True
            draggable False
            xpos 450 ypos 200
Anyway, has anyone gotten focus_mask to work on Drags?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
chocoberrie
Veteran
Posts: 254
Joined: Wed Jun 19, 2013 10:34 pm
Projects: Marshmallow Days
Contact:

Re: Drag and Drop and Focus Mask not working for me.

#3 Post by chocoberrie » Tue Jul 05, 2016 12:46 pm

I don't know the answer to your issue, but I'd like to know as well for future projects! Hopefully, someone figures this one out :D

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Drag and Drop and Focus Mask not working for me.

#4 Post by trooper6 » Tue Jul 05, 2016 1:10 pm

chocoberrie wrote:I don't know the answer to your issue, but I'd like to know as well for future projects! Hopefully, someone figures this one out :D
Hopefully! I want to post my tester for other people to improve or learn from...but I don't want to before I can get this issue and the progress indicator issue to work first.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Hojoo