cryptopunks-gui 0.0.3 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1f6eb5c90f0fa4a2d0c5abd70d67da17071a8f72cdbcbb9c43eaa3c80962e4d
4
- data.tar.gz: 1713179be7b0fee8032b3a7b6b8a71482189919464b4d010b23b01e6efcf7efc
3
+ metadata.gz: 697c564d1fcf6db201efa8144a72df008861afc9cb0dad432b6554610acf7a41
4
+ data.tar.gz: b500b6957a6f03f5cf0d82acb3354ceeb8bdce676283431d3803b8f6a4cbe79b
5
5
  SHA512:
6
- metadata.gz: f1b8fab3f02ae9547c4ce7c5dcae6107c690af5db3d7a9c1f18e837293b086a2e3ee43e8dcd978a1a97b679f14af08f057435e1b4cd5830539877671d2e7317f
7
- data.tar.gz: 3976e2ef62acb15532a352c9b7a5de4baad23f293b5c0647b0a90d450690ad1f2a04019ef8e73bdecf3dfde89373baa8a642195b2fc4f7df5caedac3c7a090b5
6
+ metadata.gz: 88ae74464c874aac202584de37a467082bc2c32c98a503abf84ee34ed53f75a1ef337f97588bf04cfa7ccbc4bfa00fcd49881fe1d64a64525c4ce2f3bebf0146
7
+ data.tar.gz: adfcd69acbcd13814d9102038781b8550cf8488a5f9f8f009ec466e48274d154dcbfc75bc7946ddc41e3c8c109ea8bed6a655aaa703d2a86d9e2c80caab58944
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.0.7
4
+
5
+ - Multiple Punk Collections (https://github.com/cryptopunksnotdead/awesome-24px)
6
+
7
+ ## 0.0.6
8
+
9
+ - Provide option to change output location
10
+ - Update default output location not to be a hidden location, switching `~/.cryptopunks` to `~/cryptopunks`
11
+ - Remember last selected output location upon app start
12
+ - Avoid hardcoding punk count in code (change 9999 to size of `@punks` array)
13
+
14
+ ## 0.0.5
15
+
16
+ - Led style spacing option
17
+ - Led style round corner option
18
+ - Sketch style line option
19
+ - Apply zoom to led and sketch styles correctly
20
+ - Fixed issue with typing punk index higher than 9999 (ignore)
21
+
22
+ ## 0.0.4
23
+
24
+ - Changed flip and mirror to checkbuttons
25
+ - Fixed zooming for led and sketch styles
26
+
3
27
  ## 0.0.3
4
28
 
5
29
  - Style support (e.g. mirror, flip, sketch, led)
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # <img src="https://raw.githubusercontent.com/AndyObtiva/cryptopunks-gui/master/icons/cryptopunks-gui.png" height=85 /> CryptoPunks GUI 0.0.3
1
+ # <img src="https://raw.githubusercontent.com/AndyObtiva/cryptopunks-gui/master/icons/cryptopunks-gui.png" height=85 /> CryptoPunks GUI 0.0.7
2
2
  ## Simplified Minting
3
3
  [![Gem Version](https://badge.fury.io/rb/cryptopunks-gui.svg)](http://badge.fury.io/rb/cryptopunks-gui)
4
4
 
5
5
  This is a Graphical User Interface for the famous [cryptopunks Ruby gem](https://github.com/cryptopunksnotdead/cryptopunks/tree/master/cryptopunks).
6
6
 
7
- It automatically downloads `punks.png` from https://github.com/larvalabs/cryptopunks on first use.
7
+ It automatically downloads image collection sprites on first use (e.g. `punks.png` from https://github.com/larvalabs/cryptopunks).
8
8
 
9
- Minted cryptopunks are stored at `~/.cryptopunks/`.
9
+ Minted cryptopunks are stored at `~/cryptopunks/` by default ([output location can be changed](#output-location)).
10
10
 
11
11
  ![Screenshot](/screenshots/cryptopunks-gui-screenshot.png)
12
12
 
@@ -25,7 +25,7 @@ You can use CryptoPunks GUI via gem or via cloning repository.
25
25
  Run:
26
26
 
27
27
  ```
28
- gem install cryptopunks-gui -v0.0.3
28
+ gem install cryptopunks-gui -v0.0.7
29
29
  ```
30
30
 
31
31
  Afterwards, run app via:
@@ -69,9 +69,61 @@ ruby app/cryptopunks_gui.rb
69
69
 
70
70
  ## Instructions
71
71
 
72
- ### Punk Index
73
-
74
- Change punk index to pick a different punk.
72
+ ### Collection
73
+
74
+ Change collection to pick a different collection of images.
75
+
76
+ There are currently 73 available collections (from https://github.com/cryptopunksnotdead/awesome-24px):
77
+ - Punks
78
+ - Mohawks
79
+ - Blondies
80
+ - Zombies
81
+ - Apes
82
+ - Aliens
83
+ - Golden Punks
84
+ - Halloween Punks
85
+ - Front Punks
86
+ - More Punks
87
+ - Expansion Punks
88
+ - Avalanche Punks
89
+ - Intl Punks
90
+ - Ape Punks
91
+ - Alien Clan
92
+ - Bored Apes Blue
93
+ - Bored Apes Red
94
+ - Bored Apes Neon Glow
95
+ - Bored Apes Stars and Stripes
96
+ - Bored Apes Acid
97
+ - Cool Cats
98
+ - Cool Cats Mohawks
99
+ - Cool Cats Ninjas
100
+ - Cool Cats TV Heads
101
+ - Cool Cats Pirates
102
+ - Cool Cats Unicorns
103
+ - Cool Cats Dragons
104
+ - Cool Cats Frogs
105
+ - Pudgy Penguins
106
+ - Dodge
107
+ - Rocks
108
+ - Punk Rocks
109
+ - Tulips
110
+
111
+
112
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-zombies.png)
113
+
114
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-apes.png)
115
+
116
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-alien-clasn.png)
117
+
118
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-bored-apes-stars-and-stripes.png)
119
+
120
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-cool-cats-ninjas.png)
121
+
122
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-collection-dodge.png)
123
+
124
+ ### Image Index
125
+
126
+ Change image index to pick a different image.
75
127
 
76
128
  ![Screenshot](/screenshots/cryptopunks-gui-screenshot-different-punk-index.png)
77
129
 
@@ -99,14 +151,50 @@ Change palette to get different punk colors.
99
151
 
100
152
  Change style to get different punk looks.
101
153
 
102
- ![Screenshot](/screenshots/cryptopunks-gui-screenshot-style-mirror.png)
154
+ #### Normal Style
155
+
156
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-style-normal.png)
103
157
 
104
- ![Screenshot](/screenshots/cryptopunks-gui-screenshot-style-flip.png)
158
+ #### Led Style
105
159
 
106
160
  ![Screenshot](/screenshots/cryptopunks-gui-screenshot-style-led.png)
107
161
 
162
+ ##### Led Spacing
163
+
164
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-style-led-spacing.png)
165
+
166
+ ##### Led Round Corner
167
+
168
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-style-led-round-corner.png)
169
+
170
+ #### Sketch Style
171
+
108
172
  ![Screenshot](/screenshots/cryptopunks-gui-screenshot-style-sketch.png)
109
173
 
174
+ ##### Sketch Line
175
+
176
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-style-sketch-line.png)
177
+
178
+ ### Mirror/Flip
179
+
180
+ Check mirror and/or flip to apply punk transformations. Can be combined with different palettes and styles.
181
+
182
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-no-mirror-no-flip.png)
183
+
184
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-mirror.png)
185
+
186
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-flip.png)
187
+
188
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-mirror-flip.png)
189
+
190
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-palette-false-style-led-mirror-flip.png)
191
+
192
+ ### Output Location
193
+
194
+ You may select a new output location by clicking on the `...` button.
195
+
196
+ ![Screenshot](/screenshots/cryptopunks-gui-screenshot-output-location.png)
197
+
110
198
  ## TODO
111
199
 
112
200
  [TODO.md](TODO.md)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.7
@@ -5,25 +5,67 @@ require 'fileutils'
5
5
  require 'net/http'
6
6
  require 'uri'
7
7
  require 'glimmer/data_binding/observer'
8
+ require 'yaml'
8
9
  require 'puts_debuggerer'
9
10
 
10
11
  class CryptopunksGui
11
12
  include Glimmer
12
13
 
13
- PALETTES = ['Standard'] + (Palette8bit.constants).map(&:name).map {|palette| palette.split('_').map(&:capitalize).join(' ')}.reject { |palette| palette.include?(' ') }
14
- STYLES = ['Normal', 'Flip', 'Mirror', 'Led', 'Sketch']
14
+ PALETTES = ['Standard'] + (Palette8bit.constants).map(&:name).map {|palette| palette.split('_').map(&:capitalize).join(' ')}.reject { |palette| palette.include?(' ') }.sort
15
+ STYLES = ['Normal', 'Led', 'Sketch']
16
+ COLLECTION_URL_MAP = {
17
+ 'Punks' => 'https://raw.githubusercontent.com/larvalabs/cryptopunks/master/punks.png',
18
+ 'Mohawks' => 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/mohawks.png',
19
+ 'Blondies' => 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/blondies.png',
20
+ 'Zombies' => 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/zombies.png',
21
+ 'Apes' => 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/apes.png',
22
+ 'Aliens' => 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/aliens.png',
23
+ 'Golden Punks' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/goldenpunks.png',
24
+ 'Halloween Punks' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/halloweenpunks.png',
25
+ 'Front Punks' => 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/frontpunks.png',
26
+ 'More Punks' => 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/morepunks.png',
27
+ 'Expansion Punks' => 'https://expansionpunks.com/provenance/expansionpunks.png',
28
+ 'Avalanche Punks' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/avalanchepunks.png',
29
+ 'Intl Punks' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/intlpunks.png',
30
+ 'Ape Punks' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/apepunks.png',
31
+ 'Alien Clan' => 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/alienclan.png',
32
+ 'Bored Apes Blue' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_blue.png',
33
+ 'Bored Apes Red' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_red.png',
34
+ 'Bored Apes Neon Glow' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_neon_glow.png',
35
+ 'Bored Apes Stars and Stripes' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_stars_and_stripes.png',
36
+ 'Bored Apes Acid' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/boredapes_acid.png',
37
+ 'Cool Cats' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats.png',
38
+ 'Cool Cats Mohawks' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_mohawks.png',
39
+ 'Cool Cats Ninjas' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_ninjas.png',
40
+ 'Cool Cats TV Heads' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_tvheads.png',
41
+ 'Cool Cats Pirates' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_pirates.png',
42
+ 'Cool Cats Unicorns' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_unicorns.png',
43
+ 'Cool Cats Dragons' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_dragons.png',
44
+ 'Cool Cats Frogs' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/coolcats_frogs.png',
45
+ 'Pudgy Penguins' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/pudgypenguins.png',
46
+ 'Dodge' => 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/dodge.png',
47
+ 'Rocks' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/rocks.png',
48
+ 'Punk Rocks' => 'https://raw.githubusercontent.com/cryptopunksnotdead/programming-cryptopunks/master/i/punkrocks.png',
49
+ 'Tulips' => 'https://raw.githubusercontent.com/cryptopunksnotdead/awesome-24px/master/collection/tulips.png',
50
+ }
15
51
 
16
- attr_accessor :punk_index, :zoom, :palette, :style
52
+ attr_accessor :collection, :image_index, :zoom, :palette, :style, :led_spacing, :led_round_corner, :sketch_line, :flip, :mirror
17
53
 
18
54
  def initialize
19
- initialize_punks
55
+ initialize_punk_directory
56
+ initialize_collection
57
+ load_config
20
58
  initialize_defaults
21
59
  observe_image_attribute_changes
22
60
  create_gui
23
- self.punk_index = 0
61
+ self.image_index = 0
24
62
  @root.open
25
63
  end
26
64
 
65
+ def collection_options
66
+ COLLECTION_URL_MAP.keys
67
+ end
68
+
27
69
  def palette_options
28
70
  PALETTES
29
71
  end
@@ -32,47 +74,87 @@ class CryptopunksGui
32
74
  STYLES
33
75
  end
34
76
 
35
- def initialize_punks
36
- @punk_directory = File.join(Dir.home, '.cryptopunks')
77
+ def initialize_punk_directory
78
+ @punk_directory = @punk_config_directory = File.join(Dir.home, 'cryptopunks')
37
79
  FileUtils.mkdir_p(@punk_directory)
38
- @punk_file = File.join(@punk_directory, 'punks.png')
39
- File.write(@punk_file, Net::HTTP.get(URI('https://raw.githubusercontent.com/larvalabs/cryptopunks/master/punks.png'))) unless File.exist?(@punk_file)
40
- @punks = Punks::Image::Composite.read(@punk_file)
80
+ end
81
+
82
+ def initialize_collection
83
+ return if @collection && @collection == @last_collection
84
+ @collection ||= COLLECTION_URL_MAP.keys.first
85
+ url = COLLECTION_URL_MAP[@collection]
86
+ @punk_file = File.join(@punk_config_directory, File.basename(url, '.png'))
87
+ File.write(@punk_file, Net::HTTP.get(URI(url))) unless File.exist?(@punk_file)
88
+ @images ||= {}
89
+ @images[@collection] ||= Punks::Image::Composite.read(@punk_file)
90
+ @last_collection = @collection
91
+ self.image_index = 0
92
+ @image_index_spinbox.to = @images[@collection].size - 1 if @image_index_spinbox
93
+ end
94
+
95
+ def load_config
96
+ @punk_config_file = File.join(@punk_config_directory, 'cryptopunks.yml')
97
+ FileUtils.touch(@punk_config_file)
98
+ @punk_config = YAML.load(File.read(@punk_config_file)) || {punk_directory: @punk_directory}
99
+ @punk_directory = @punk_config[:punk_directory]
100
+ end
101
+
102
+ def save_config
103
+ File.write(@punk_config_file, YAML.dump(@punk_config))
41
104
  end
42
105
 
43
106
  def initialize_defaults
107
+ @collection = COLLECTION_URL_MAP.keys.first
44
108
  @zoom = 12
45
109
  @palette = PALETTES.first
46
110
  @style = STYLES.first
111
+ @led_spacing = 2
112
+ @led_round_corner = false
113
+ @sketch_line = 1
114
+ @mirror = false
115
+ @flip = false
47
116
  end
48
117
 
49
118
  def observe_image_attribute_changes
50
119
  observer = Glimmer::DataBinding::Observer.proc { generate_image }
51
- observer.observe(self, :punk_index)
120
+ observer.observe(self, :collection)
121
+ observer.observe(self, :image_index)
52
122
  observer.observe(self, :zoom)
53
123
  observer.observe(self, :palette)
54
124
  observer.observe(self, :style)
125
+ observer.observe(self, :led_spacing)
126
+ observer.observe(self, :led_round_corner)
127
+ observer.observe(self, :sketch_line)
128
+ observer.observe(self, :mirror)
129
+ observer.observe(self, :flip)
55
130
  end
56
131
 
57
132
  def generate_image
58
- image_location = File.join(@punk_directory, "punk-#{@punk_index}#{"x#{@zoom}" if @zoom.to_i > 1}#{"-#{@palette.underscore}" if @palette != PALETTES.first}#{"-#{@style.underscore}" if @style != STYLES.first}.png")
133
+ initialize_collection
134
+ return if @image_index.to_i > @images[@collection].size
135
+ image_location = File.join(@punk_directory, "#{@collection.gsub(' ', '').downcase}-#{@image_index}#{"x#{@zoom}" if @zoom.to_i > 1}#{"-#{@palette.underscore}" if @palette != PALETTES.first}#{"-#{@style.underscore}" if @style != STYLES.first}.png")
59
136
  puts "Writing punk image to #{image_location}"
60
- selected_punk = @punks[@punk_index.to_i]
137
+ selected_punk = @images[@collection][@image_index.to_i]
61
138
  selected_punk = selected_punk.change_palette8bit(Palette8bit.const_get(@palette.gsub(' ', '_').upcase.to_sym)) if @palette != PALETTES.first
62
139
  @original_zoom = @zoom
63
140
  if @style != STYLES.first
64
- selected_punk = selected_punk.send(@style.underscore)
65
- if @style != @previous_style
66
- @zoom = 12 if @style == 'Flip' && !['Normal', 'Mirror'].include?(@previous_style)
67
- @zoom = 12 if @style == 'Mirror' && !['Normal', 'Flip'].include?(@previous_style)
68
- @zoom = 2 if @style == 'Sketch'
69
- @zoom = 1 if @style == 'Led'
141
+ style_options = {}
142
+ if @style == 'Led'
143
+ style_options[:spacing] = @led_spacing.to_i
144
+ style_options[:round_corner] = @led_round_corner
145
+ end
146
+ if @style == 'Sketch'
147
+ style_options[:line] = @sketch_line.to_i
70
148
  end
149
+ selected_punk = selected_punk.send(@style.underscore, @zoom.to_i, **style_options)
71
150
  end
72
- selected_punk = selected_punk.zoom(@zoom.to_i)
151
+ selected_punk = selected_punk.mirror if @mirror
152
+ selected_punk = selected_punk.flip if @flip
153
+ selected_punk = selected_punk.zoom(@zoom.to_i) if @style == STYLES.first
73
154
  selected_punk.save(image_location)
74
155
  @image_label.image = image_location
75
- @message_entry.text = image_location
156
+ @output_location_entry.text = image_location
157
+ @previous_style = @style
76
158
  notify_observers(:zoom) if @zoom != @original_zoom
77
159
  end
78
160
 
@@ -83,17 +165,20 @@ class CryptopunksGui
83
165
 
84
166
  frame {
85
167
  label {
86
- text 'Select Punk Index and Zoom To Mint Cryptopunk'
87
- font weight: 'bold'
168
+ text 'Collection:'
169
+ }
170
+ combobox {
171
+ readonly true
172
+ text <=> [self, :collection]
88
173
  }
89
174
 
90
175
  label {
91
- text 'Punk Index:'
176
+ text 'Image Index:'
92
177
  }
93
- spinbox {
178
+ @image_index_spinbox = spinbox {
94
179
  from 0
95
- to @punks.size - 1
96
- text <=> [self, :punk_index]
180
+ to @images[@collection].size - 1
181
+ text <=> [self, :image_index]
97
182
  }
98
183
 
99
184
  label {
@@ -118,14 +203,66 @@ class CryptopunksGui
118
203
  }
119
204
  combobox {
120
205
  readonly true
121
- text <=> [self, :style, before_write: ->(v) {@previous_style = @style}]
206
+ text <=> [self, :style, after_write: ->(val) {add_style_options}]
207
+ }
208
+
209
+ @style_options_frame = frame {
210
+ padding 0
211
+ }
212
+
213
+ frame {
214
+ padding 0
215
+
216
+ checkbutton {
217
+ grid row: 0, column: 0, column_weight: 0
218
+ variable <=> [self, :mirror]
219
+ }
220
+ label {
221
+ grid row: 0, column: 1
222
+ text 'Mirror'
223
+
224
+ on('Button-1') do
225
+ self.mirror = !mirror
226
+ end
227
+ }
228
+
229
+ checkbutton {
230
+ grid row: 0, column: 2
231
+ variable <=> [self, :flip]
232
+ }
233
+ label {
234
+ grid row: 0, column: 3
235
+ text 'Flip'
236
+
237
+ on('Button-1') do
238
+ self.flip = !flip
239
+ end
240
+ }
122
241
  }
123
242
 
124
243
  label {
125
244
  text 'Output Location:'
126
245
  }
127
- @message_entry = entry {
128
- readonly true
246
+ frame {
247
+ padding 0
248
+
249
+ @output_location_entry = entry {
250
+ grid row: 0, column: 0
251
+ readonly true
252
+ width 47
253
+ }
254
+ button {
255
+ grid row: 0, column: 1
256
+ text '...'
257
+ width 1.1
258
+
259
+ on('command') do
260
+ @punk_directory = choose_directory(parent: @root)
261
+ @punk_config[:punk_directory] = @punk_directory
262
+ save_config
263
+ generate_image
264
+ end
265
+ }
129
266
  }
130
267
 
131
268
  @image_label = label {
@@ -134,6 +271,62 @@ class CryptopunksGui
134
271
  }
135
272
  }
136
273
  end
274
+
275
+ def add_style_options
276
+ @style_options_frame.content {
277
+ @style_options_frame.children.each(&:destroy)
278
+ if @style == 'Led'
279
+ frame {
280
+ padding 0
281
+
282
+ label {
283
+ grid row: 0, column: 0, column_weight: 0
284
+ text 'Spacing:'
285
+ }
286
+ spinbox {
287
+ grid row: 0, column: 1
288
+ from 1
289
+ to 72
290
+ text <=> [self, :led_spacing]
291
+ }
292
+
293
+ checkbutton {
294
+ grid row: 0, column: 2
295
+ variable <=> [self, :led_round_corner]
296
+ }
297
+ label {
298
+ grid row: 0, column: 3
299
+ text 'Round Corner'
300
+
301
+ on('Button-1') do
302
+ self.led_round_corner = !led_round_corner
303
+ end
304
+ }
305
+ }
306
+ elsif @style == 'Sketch'
307
+ frame {
308
+ padding 0
309
+
310
+ label {
311
+ grid row: 0, column: 0, column_weight: 0
312
+ text 'Line:'
313
+ }
314
+ spinbox {
315
+ grid row: 0, column: 1
316
+ from 1
317
+ to 72
318
+ text <=> [self, :sketch_line]
319
+ }
320
+ }
321
+ else
322
+ frame { # filler
323
+ padding 0
324
+ height 0
325
+ width 0
326
+ }
327
+ end
328
+ }
329
+ end
137
330
  end
138
331
 
139
332
  CryptopunksGui.new.launch
@@ -2,17 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: cryptopunks-gui 0.0.3 ruby app
5
+ # stub: cryptopunks-gui 0.0.7 ruby app
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "cryptopunks-gui".freeze
9
- s.version = "0.0.3"
9
+ s.version = "0.0.7"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["app".freeze]
13
13
  s.authors = ["Andy Maleh".freeze]
14
- s.date = "2021-10-25"
15
- s.description = "Cryptopunks GUI for simplified minting built with Glimmer DSL for Tk (requires ActiveTcl to run cryptopunks-gui command)".freeze
14
+ s.date = "2021-10-28"
15
+ s.description = "CryptoPunks GUI for Simplified Minting - Built with Glimmer DSL for Tk (requires ActiveTcl to run cryptopunks-gui command)".freeze
16
16
  s.email = "andy.am@gmail.com".freeze
17
17
  s.executables = ["cryptopunks-gui".freeze]
18
18
  s.extra_rdoc_files = [
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
34
34
  s.licenses = ["MIT".freeze]
35
35
  s.post_install_message = "To launch CryptoPunks GUI, run command: cryptopunks-gui".freeze
36
36
  s.rubygems_version = "3.2.22".freeze
37
- s.summary = "Cryptopunks GUI for Simplified Minting".freeze
37
+ s.summary = "CryptoPunks GUI for Simplified Minting".freeze
38
38
 
39
39
  if s.respond_to? :specification_version then
40
40
  s.specification_version = 4
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptopunks-gui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-25 00:00:00.000000000 Z
11
+ date: 2021-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glimmer-dsl-tk
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- description: Cryptopunks GUI for simplified minting built with Glimmer DSL for Tk
111
+ description: CryptoPunks GUI for Simplified Minting - Built with Glimmer DSL for Tk
112
112
  (requires ActiveTcl to run cryptopunks-gui command)
113
113
  email: andy.am@gmail.com
114
114
  executables:
@@ -149,5 +149,5 @@ requirements: []
149
149
  rubygems_version: 3.2.22
150
150
  signing_key:
151
151
  specification_version: 4
152
- summary: Cryptopunks GUI for Simplified Minting
152
+ summary: CryptoPunks GUI for Simplified Minting
153
153
  test_files: []