GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — tutorial/B_parameters.lua at master · neauoire/tutorial Expand file tree/ Copy pathB_parameters.luaMore file actions 64 lines (55 loc) · 1.33 KB / Copy pathB_parameters.luaFile metadata and controls64 lines (55 loc) · 1.33 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 -- -- ////\\\\ -- ////\\\\ TUTORIAL -- ////\\\\ PART 11 -- \\\\//// -- \\\\//// PARAMETERS -- \\\\//// -- local mdh = include('lib/midi_device_helper') local viewport = { width = 128, height = 64 } local actions = {"Yes", "No"} -- Main function init() -- Render Style screen.level(15) screen.aa(0) screen.line_width(1) -- Render redraw() -- Add params with a library mdh:init() -- Script Params params:add{type = "number", id = "number", name = "Number", min = 1, max = 48, default = 4} params:add{type = "option", id = "action", name = "Action", options = actions, default = 1, action=function(x) print('selection:'..actions[x]) end} end -- Render function draw_frame() screen.rect(1, 1, viewport.width-1, viewport.height-1) screen.stroke() end function draw_label(id,name,value) local y = viewport.height - (8 * id) screen.level(5) screen.move(5,y) screen.text(name) screen.level(15) screen.move(60,y) if value then screen.text(value) end screen.fill() end function draw_labels() draw_label(1,'action',actions[params:get("action")]) draw_label(2,'number',params:get("number")) -- Library draw_label(5,'midi_output',mdh:get_output_name()) draw_label(4,'midi_input',mdh:get_input_name()) end function redraw() screen.clear() draw_frame() draw_labels() screen.update() end |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |