This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shoes.app title: "asset manager", width: 1000 do | |
flow do | |
background rgb(191, 209, 229) | |
stack do | |
para "TOC Asset Manager", stroke: blue, font: "helvetica", align: "center", size: 20 | |
end | |
stack width: 100 do | |
caption "Encoders", font: "helvetica" | |
%w[EBU41 EBU42 EBU43 EBU48 EBU49 EBU52 EBU53 EBU54 NET27 NET28 NET29 NET30 EBU91 EBU95].each do |name| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tetrishoes by lljk | |
# https://github.com/lljk/shoes-stuff/blob/master/tetrishoes.rb | |
# | |
# modified for Green & Purple Shoes by ashbb | |
class Array | |
def clear | |
_clear | |
end if method_defined? :_clear | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'java' | |
require 'swt' | |
module Swt | |
include_package 'org.eclipse.swt' | |
include_package 'org.eclipse.swt.widgets' | |
include_package 'org.eclipse.swt.dnd' | |
import java.awt.datatransfer.StringSelection | |
import java.awt.Toolkit | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a dumb little breakout game by lljk | |
# use the mouse or left and right keys to move the paddle | |
# space bar or left click to launch ball | |
# space bar while ball is moving to pause game | |
# First, we'll make widgets for the ball, bricks, paddle, and bonus stars | |
# Revised a little bit for Green and Purple Shoes by ashbb. | |
# This code works both with Green and Purple Shoes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'java' | |
require 'swt' | |
module Swt | |
include_package 'org.eclipse.swt' | |
include_package 'org.eclipse.swt.widgets' | |
include_package 'org.eclipse.swt.graphics' | |
end | |
class Object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'java' | |
require 'swt' | |
module Swt | |
include_package 'org.eclipse.swt' | |
include_package 'org.eclipse.swt.layout' | |
include_package 'org.eclipse.swt.widgets' | |
include_package 'org.eclipse.swt.graphics' | |
include_package 'org.eclipse.swt.events' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PhotoFrame < Shoes | |
url '/', :index | |
url '/a', :a | |
url '/b', :b | |
url '/c', :c | |
def index | |
a | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'green_shoes' | |
class ShoesIO < StringIO | |
def initialize app, stdout, *args | |
@app, @stdout = app, stdout | |
super *args | |
end | |
def gets | |
res = @app.ask @stdout.string.split("\n").last |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Mod | |
def check_neighbour? a, b | |
return true if @circles.empty? | |
@circles.each{|c| return false if c.left/40 == a and c.top/40 == b} | |
@circles.each do |c| | |
x, y = c.left/40, c.top/40 | |
return true if (x-1 == a and y == b) or (x == a and y-1 == b) or (x+1 == a and y == b) or (x == a and y+1 == b) | |
end | |
return false | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['green_shoes','meta-spotify'].each(&method(:require)) | |
Shoes.app do | |
def artist_lookup artist | |
@slot.clear do | |
@e.text = artist.name | |
uri = artist.uri | |
songs = Array.new | |
chosen_artist = MetaSpotify::Artist.lookup(uri, :extras => 'albumdetail') | |
q, r = chosen_artist.albums.length.divmod 10 |