Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #kingsvalley 2 overlay proof of concept
- eval kv_overlay {
- proc activate_kv2_editor {} {
- osd_widgets::msx_init kv
- bind -layer kv "mouse button1 down" {puts "click"}
- FollowMouse
- }
- proc FollowMouse {} {
- osd_widgets::msx_update kv
- lassign [osd info "kv" -mousecoord] x y
- #make sure you register only on the MSX screen
- if ($x<0) {set x 0}
- if ($y<0) {set y 0}
- if ($x=="Inf") {set x 0}
- if ($y=="Inf") {set y 0}
- poke 0xe265 [expr {int($x / 8)}]
- poke 0xe264 [expr {int($y / 8)}]
- bind -layer kv "mouse button1 down" {puts "click"}
- after frame kv_overlay::FollowMouse
- }
- #
- #bind -layer kv2_editor "mouse button1 down" {
- # puts "click"
- #}
- namespace export activate_kv2_editor
- }
- namespace import kv_overlay::*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement