Skip to content

Commit f317eed

Browse files
committed
update control_panel title
1 parent 5ed914d commit f317eed

File tree

14 files changed

+129
-10
lines changed

14 files changed

+129
-10
lines changed

contributed/jwishy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
def setup
2020
sketch_title 'Wishy Worm'
2121
control_panel do |c|
22-
c.title = 'Control Panel'
22+
c.title 'Control Panel'
2323
c.look_feel 'Nimbus'
2424
c.slider :bluish, 0.0..1.0, 0.5
2525
c.slider :alpha, 0.0..1.0, 0.5

contributed/quadraticvertex.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def setup
1616
sketch_title 'Quadratic Vertex'
1717
@hide = false
1818
control_panel do |c|
19-
c.title = 'Controller'
19+
c.title 'Controller'
2020
c.menu(:detail, %w(4 5 6 7 8 9 10), '7')
2121
c.checkbox :debug
2222
c.button :save_image

external_library/gem/toxiclibs/geometry/boolean_shapes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def setup
1111
@gfx = Gfx::ToxiclibsSupport.new(self)
1212
@bool = KEY.zip(TYPE).to_h
1313
control_panel do |c|
14-
c.title = 'Control Panel'
14+
c.title 'Control Panel'
1515
c.menu :type, KEY, 'union'
1616
@panel = c
1717
end

external_library/java/gicentreUtils/chart.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# ------------------------ Initialisation --------------------------
1212
LEGEND = 'Gross domestic product measured in inflation-corrected $US'.freeze
13-
TITLE = 'Income per person, United Kingdom'.freeze
13+
title 'Income per person, United Kingdom'.freeze
1414

1515
def settings
1616
size(800, 300)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
load_library :control_panel
2+
3+
attr_reader :hide, :panel, :back
4+
5+
def setup
6+
sketch_title 'Simple Button'
7+
control_panel do |c|
8+
c.look_feel 'Nimbus'
9+
c.title 'Control Button'
10+
c.button :color_background # see method below
11+
c.button :exit! { exit } # example of a button with a simple block
12+
@panel = c
13+
end
14+
color_mode RGB, 1
15+
@back = [0, 0, 1.0]
16+
end
17+
18+
def color_background
19+
@back = [rand, rand, rand]
20+
end
21+
22+
def draw
23+
# only make control_panel visible once, or again when hide is false
24+
unless hide
25+
@hide = true
26+
panel.set_visible(hide)
27+
end
28+
background *back
29+
end
30+
31+
def settings
32+
size 300, 300
33+
end
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
load_library :control_panel
2+
3+
attr_reader :hide, :panel, :shouting
4+
5+
def setup
6+
sketch_title 'Simple Checkbox'
7+
control_panel do |c|
8+
c.look_feel 'Nimbus'
9+
c.title 'Checkbox'
10+
c.checkbox :shouting
11+
@panel = c
12+
end
13+
text_font(create_font('mono', 48))
14+
fill(200, 0, 0)
15+
end
16+
17+
def warning
18+
shouting ? 'WARNING!' : 'warning!'
19+
end
20+
21+
def draw
22+
background 0
23+
# only make control_panel visible once, or again when hide is false
24+
unless hide
25+
@hide = true
26+
panel.set_visible(hide)
27+
end
28+
text(warning, 20, 100)
29+
end
30+
31+
def settings
32+
size 300, 300
33+
end
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
load_library :control_panel
2+
3+
attr_reader :hide, :panel, :toggle_loop
4+
def setup
5+
sketch_title 'Simple Menu'
6+
control_panel do |c|
7+
c.look_feel 'Motif'
8+
c.title 'Menu'
9+
c.menu :choice, %i[one two three]
10+
c.checkbox(:toggle_loop) { toggle_loop ? loop : no_loop}
11+
@panel = c
12+
end
13+
end
14+
15+
def draw
16+
# only make control_panel visible once, or again when hide is false
17+
unless hide
18+
@hide = true
19+
panel.set_visible(hide)
20+
end
21+
puts @choice
22+
no_loop
23+
end
24+
25+
def settings
26+
size 300, 300
27+
end
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
load_library :control_panel
2+
3+
attr_reader :hide, :panel, :bluish
4+
def setup
5+
sketch_title 'Simple Slider'
6+
control_panel do |c|
7+
c.look_feel 'Motif'
8+
c.title 'Slider'
9+
c.slider :bluish, 0.2..1.0, 0.5
10+
@panel = c
11+
end
12+
color_mode(RGB, 1.0)
13+
end
14+
15+
def draw
16+
# only make control_panel visible once, or again when hide is false
17+
unless hide
18+
@hide = true
19+
panel.set_visible(hide)
20+
end
21+
background(0, 0, bluish)
22+
end
23+
24+
def settings
25+
size 300, 300
26+
end

processing_app/library/vecmath/vec2d/penrose.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
def setup
1111
sketch_title 'Penrose'
1212
control_panel do |c|
13-
c.title = 'Tiler Control'
13+
c.title 'Tiler Control'
1414
c.look_feel 'Nimbus'
1515
c.checkbox :seed
1616
c.checkbox :acute

processing_app/topics/lsystems/three_d_tree.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def setup
2020

2121
def setup_panel
2222
control_panel do |c|
23-
c.title = 'Control:'
23+
c.title 'Control:'
2424
c.look_feel 'Metal'
2525
c.slider :zoom, 1..8, 3
2626
c.slider :rot_y, -PI..PI, 0

0 commit comments

Comments
 (0)