|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <link rel="stylesheet" href="debug-helper.css" /> |
| 5 | + </head> |
| 6 | + |
| 7 | + <body> |
| 8 | + <div class="container" id="event_click"> |
| 9 | + <div class="containerHead"> |
| 10 | + <span class="containerTitle">Clicks</span> |
| 11 | + <span class="containerEvent">onClick, onclick[1-5]</span> |
| 12 | + </div> |
| 13 | + <div class="containerBody"> |
| 14 | + <button id="click_button1" class="button1">1</button> |
| 15 | + <button id="click_button2" class="button2">2</button> |
| 16 | + <button id="click_button3" class="button3">3</button> |
| 17 | + <button id="click_button4" class="button4">4</button> |
| 18 | + <button id="click_button5" class="button5">5</button> |
| 19 | + </div> |
| 20 | + </div> |
| 21 | + |
| 22 | + <div class="container" id="event_number"> |
| 23 | + <div class="containerHead"> |
| 24 | + <span class="containerTitle">Numbers</span> |
| 25 | + <span class="containerEvent">onNumber</span> |
| 26 | + </div> |
| 27 | + <div class="containerBody"> |
| 28 | + <button id="number_button1" class="button1">1</button> |
| 29 | + <button id="number_button10" class="button2">10</button> |
| 30 | + <button id="number_button100" class="button3">100</button> |
| 31 | + <button id="number_button1000" class="button4">1000</button> |
| 32 | + <button id="number_button10000" class="button5">10000</button> |
| 33 | + <div class="inlineContainer" style="display: flex"> |
| 34 | + <input type="number" id="number_input1" value="1" /> |
| 35 | + <button id="number_input1_send">Send</button> |
| 36 | + </div> |
| 37 | + <div class="inlineContainer"> |
| 38 | + <input type="number" id="number_input2" value="-1" /> |
| 39 | + <span class="smallInfo">(number sent automatically)</span> |
| 40 | + </div> |
| 41 | + </div> |
| 42 | + </div> |
| 43 | + |
| 44 | + <div class="container" id="event_range"> |
| 45 | + <div class="containerHead"> |
| 46 | + <span class="containerTitle">Ranges</span> |
| 47 | + <span class="containerEvent">onRange(0to100|0to1|M1to1)</span> |
| 48 | + </div> |
| 49 | + <div class="containerBody"> |
| 50 | + <input type="range" min="0" max="100" step="1" id="range_0to100" /><span id="range_0to100_label" |
| 51 | + >50</span |
| 52 | + > |
| 53 | + <div class="inlineContainer"> |
| 54 | + <input type="range" min="0" max="1" step="0.001" id="range_0to1" /><span id="range_0to1_label" |
| 55 | + >0.5</span |
| 56 | + > |
| 57 | + </div> |
| 58 | + <div class="inlineContainer"> |
| 59 | + <input type="range" min="-1" max="1" step="0.001" id="range_M1to1" /><span id="range_M1to1_label" |
| 60 | + >0</span |
| 61 | + > |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + <script> |
| 65 | + function bindLabel(range) { |
| 66 | + document.querySelector("#range_" + range).addEventListener("input", (e) => { |
| 67 | + document.querySelector("#range_" + range + "_label").innerHTML = e.target.value; |
| 68 | + }); |
| 69 | + } |
| 70 | + bindLabel("0to100"); |
| 71 | + bindLabel("0to1"); |
| 72 | + bindLabel("M1to1"); |
| 73 | + </script> |
| 74 | + </div> |
| 75 | + |
| 76 | + <div class="container" id="event_color"> |
| 77 | + <div class="containerHead"> |
| 78 | + <span class="containerTitle">Colors</span> |
| 79 | + <span class="containerEvent">onColor</span> |
| 80 | + </div> |
| 81 | + <div class="containerBody" style="text-align: center"> |
| 82 | + <input type="color" id="color_color" /> |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + |
| 86 | + <div class="container" id="event_date"> |
| 87 | + <div class="containerHead"> |
| 88 | + <span class="containerTitle">Date</span> |
| 89 | + <span class="containerEvent">onDate</span> |
| 90 | + </div> |
| 91 | + <div class="containerBody"> |
| 92 | + <input type="date" id="date_date" /> |
| 93 | + <div class="inlineContainer"> |
| 94 | + <input type="datetime-local" id="date_datetime" value="2069-04-20T13:37" /> |
| 95 | + </div> |
| 96 | + </div> |
| 97 | + <script> |
| 98 | + document.querySelector("#date_date").valueAsDate = new Date(); |
| 99 | + </script> |
| 100 | + </div> |
| 101 | + |
| 102 | + <div class="container" id="event_bool"> |
| 103 | + <div class="containerHead"> |
| 104 | + <span class="containerTitle">Booleans</span> |
| 105 | + <span class="containerEvent">onBool</span> |
| 106 | + </div> |
| 107 | + <div class="containerBody" style="text-align: center"> |
| 108 | + <button id="bool_false" class="button1">false</button> |
| 109 | + <button id="bool_true" class="button5">true</button> |
| 110 | + </div> |
| 111 | + </div> |
| 112 | + |
| 113 | + <div class="container" id="event_text"> |
| 114 | + <div class="containerHead"> |
| 115 | + <span class="containerTitle">Strings</span> |
| 116 | + <span class="containerEvent">onText</span> |
| 117 | + </div> |
| 118 | + <div class="containerBody"> |
| 119 | + <div style="display: flex"> |
| 120 | + <input type="text" id="text_oneline" /> |
| 121 | + <button id="text_oneline_send">Send</button> |
| 122 | + </div> |
| 123 | + <div class="inlineContainer" style="display: flex"> |
| 124 | + <textarea id="text_multiline" class="area"></textarea> |
| 125 | + <button id="text_multiline_send">Send</button> |
| 126 | + </div> |
| 127 | + </div> |
| 128 | + </div> |
| 129 | + |
| 130 | + <div class="container" id="event_list"> |
| 131 | + <div class="containerHead"> |
| 132 | + <span class="containerTitle">Lists</span> |
| 133 | + <span class="containerEvent">onList</span> |
| 134 | + </div> |
| 135 | + <div class="containerBody"> |
| 136 | + <div style="display: flex; margin-bottom: 5px"> |
| 137 | + <textarea id="list_list" class="lists"></textarea> |
| 138 | + <button id="list_list_send">Send</button> |
| 139 | + </div> |
| 140 | + <span class="smallInfo">(List entries are comma separated)</span> |
| 141 | + </div> |
| 142 | + </div> |
| 143 | + |
| 144 | + <div class="container" id="event_json"> |
| 145 | + <div class="containerHead"> |
| 146 | + <span class="containerTitle">JSON</span> |
| 147 | + <span class="containerEvent">onJSON</span> |
| 148 | + </div> |
| 149 | + <div class="containerBody"> |
| 150 | + <div id="instanceMonaco"></div> |
| 151 | + <button id="json_send" style="margin-top: 5px">Send</button> |
| 152 | + |
| 153 | + <script src="../monaco/monaco-editor/min/vs/loader.js"></script> |
| 154 | + <script> |
| 155 | + require.config({ paths: { vs: "../monaco/monaco-editor/min/vs" } }); |
| 156 | + require(["vs/editor/editor.main"], onMonacoReady); |
| 157 | + |
| 158 | + function onMonacoReady() { |
| 159 | + var jsonCode = ["{", ' "data": 42,', "}"].join("\n"); |
| 160 | + |
| 161 | + var model = monaco.editor.createModel(jsonCode, "json"); |
| 162 | + |
| 163 | + window.debugMonacoEditor = monaco.editor.create(document.getElementById("instanceMonaco"), { |
| 164 | + model: model, |
| 165 | + theme: "vs-dark", |
| 166 | + }); |
| 167 | + } |
| 168 | + </script> |
| 169 | + </div> |
| 170 | + </div> |
| 171 | + |
| 172 | + <script src="debug-helper.js"></script> |
| 173 | + </body> |
| 174 | +</html> |
0 commit comments