File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
require 'picrate'
2
2
# Loading URLs.
3
3
#
4
- # Click on the left button to open a different URL in the same window (Only
5
- # works online). Click on the right button to open a URL in a new browser window.
4
+ # A linux Specific version is fine on the RaspberryPI
6
5
class EmbeddedLinks < Processing ::App
7
6
8
7
def setup
@@ -23,9 +22,13 @@ def draw
23
22
line 155 , 85 , 155 , 100
24
23
end
25
24
25
+ def open ( url )
26
+ system 'xdg-open' , url
27
+ end
28
+
26
29
def mouse_pressed
27
- link 'https://ruby-processing.github.io/PiCrate/' if @over_left_button
28
- link 'https://ruby-processing .github.io/' if @over_right_button
30
+ open ( 'https://ruby-processing.github.io/PiCrate/' ) if @over_left_button
31
+ open ( 'https://monkstone .github.io/' ) if @over_right_button
29
32
end
30
33
31
34
def mouse_moved
You can’t perform that action at this time.
0 commit comments