This file contains hidden or 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 Ooze | |
| module Terminal | |
| # Based on the VT220 Programmers reference manual | |
| # https://www.vt100.net/docs/vt220-rm/ | |
| # ASCII Code table (occupies the C0 range starting on the 1st bit to 7th) | |
| ASCII_CODE_TABLE = { | |
| nul: 0x00, soh: 0x01, stx: 0x02, etx: 0x03, eot: 0x04, enq: 0x05, | |
| ack: 0x06, bel: 0x07, bs: 0x08, ht: 0x09, lf: 0x0A, vt: 0x0B, | |
| ff: 0x0C, cr: 0x0D, so: 0x0E, si: 0x0F, dle: 0x10, dc1: 0x11, |
This file contains hidden or 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 Counter < Hokusai::Block | |
| style <<~EOF | |
| [style] | |
| additionStyles { | |
| background: rgb(214, 49, 24); | |
| cursor: "pointer"; | |
| } | |
| additionLabel { | |
| size: 40; |
This file contains hidden or 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 "color" | |
| require "mini_magick" | |
| GROW = 3 | |
| COLORS = {} | |
| SIZE = ENV.fetch("SIZE", 30) | |
| SWIDTH = SIZE | |
| SHEIGHT = SIZE | |
| ASSETS = ENV.fetch("ASSETS", "#{__dir__}/assets") | |
| SOURCE = ENV.fetch("SOURCE", "source.png") |
This file contains hidden or 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 Counter < Hokusai::Block | |
| template <<-EOF | |
| [template] | |
| vblock | |
| text#count { :content="count.to_s" } | |
| hblock | |
| vblock#inc {@click="increment"} | |
| empty | |
| vblock#dec {@click="decrement"} | |
| empty |
This file contains hidden or 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 HackOS | |
| class Panel < Hokusai::Block | |
| template <<~EOF | |
| [template] | |
| clipped { | |
| @tap="on_tapdown" | |
| @drag="on_taphold" | |
| @taphold="on_taphold" | |
| @swipe="on_swipe" | |
| @taprelease="on_taprelease" |
This file contains hidden or 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 HackOS | |
| class MovingIcon < Hokusai::Block | |
| template <<~EOF | |
| [template] | |
| virtual | |
| EOF | |
| computed! :moving | |
| computed! :name | |
| computed! :width |
This file contains hidden or 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 ACamera < Hokusai::Block | |
| template <<~EOF | |
| [template] | |
| empty { @click="add_filter" } | |
| EOF | |
| uses(empty: Hokusai::Blocks::Empty) | |
| attr_accessor :lw, :lh, :texture, :camera |
This file contains hidden or 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 Char < Hokusai::Block | |
| template do | |
| child(Hokusai::Blocks::Empty) do | |
| on(:keydown) do |event| | |
| move(event) | |
| end | |
| end | |
| end | |
| # 68x68 blocks |
This file contains hidden or 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
| gemspec("counter-app") do |config| | |
| gem path: "../mruby" | |
| gem path: "../hokusai-pocket" | |
| end |
This file contains hidden or 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
| # Proposed DSL API | |
| # Declare a gemspec with an ID | |
| # | |
| # conf contains properties about the build | |
| gemspec "mruby-hokusai-pocket" do |conf| | |
| conf.version = "0.1.0" | |
| conf.author = "skinnyjames" | |
| #..etc |
NewerOlder