Created
March 26, 2011 18:37
-
-
Save ashbb/888521 to your computer and use it in GitHub Desktop.
A workaround for https://github.com/Catsquotl/tcm-study/blob/master/StartGUI.rb
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 'green_shoes' | |
| require_relative './orgaan' | |
| include OrgaanGui | |
| Shoes.app title:"Shu Ha Ri",width: 1280, height: 720 do | |
| background khaki, height: 2000 | |
| @m=[] | |
| fwin1 = flow width: 0.5, height: 0.3 do | |
| para "In onderstaande lijst kunt u een keuze maken | |
| uit de verschillende orgaansystemen van het menselijk lichaam",align:"center" | |
| list = Dir.glob("./data/*.yml").sort | |
| list.each do|x| | |
| s = x[7...-4] | |
| @m.push(s) | |
| end | |
| list = list_box :items =>@m | |
| list.change{|choice| | |
| dat = File.open"./data/#{choice.text}.yml",'r' | |
| a = Psych.load dat | |
| dat.close | |
| @fwin2.clear { | |
| a.punten.each {|e| | |
| button e.afk, :height =>30, :width =>50 do | |
| @fwin4.clear{ stack do | |
| para strong("Afkorting:"),"#{e.afk}\n", | |
| strong("Ch.naam\t:"),"#{e.chname}\n", | |
| strong("Naam\t:")," #{e.name}\n", | |
| strong("Locatie\t:")," #{e.locatie}\n", | |
| strong("Aard\t:")," #{e.aard}\n", | |
| strong("Actie\t:")," #{e.actie}\n" | |
| end | |
| } | |
| end | |
| } | |
| } | |
| @fwin3.clear{} | |
| @fwin3.append{ | |
| #timer 0.01 do | |
| #window do | |
| a.functies.each do |k,v| | |
| para strong k | |
| para v | |
| end | |
| #end | |
| #end | |
| } | |
| } | |
| end | |
| @fwin2 = flow width: 0.5, height: 0.3 do | |
| end | |
| @fwin3 = flow width: 0.5 do | |
| end | |
| @fwin3.append{} | |
| @fwin4 = flow width: 0.5, height: 0.7 do | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment