Skip to content
Browse files

Add Shoes app to make x.y coord for each seat

  • Loading branch information...
1 parent b59f413 commit be8cd14a151062dc25d84c38fd0bffa1e1527968 Alexandre Girard committed Jan 6, 2009
View
29 seat_map/click_seat.rb
@@ -0,0 +1,29 @@
+seat_file = "/Users/alx/dev/politimap/seat_map/seatmap.txt"
+
+Shoes.app :title => "Seat Map" , :width => 459 do
+
+ current = 642
+ last_log=""
+
+ image("seat_map.jpg")
+
+ @p = para
+ animate do
+ button, left, top = self.mouse
+ @p.replace "mouse: #{button}, #{left}, #{top}\ncurrent seat: #{current}\nlast log: #{last_log}"
+ end
+
+ click do |button, x, y|
+ # Do not log if superior at seats height
+ if y < 260
+ last_log = "#{current}, #{x}, #{y}"
+ File.open(seat_file, 'a') do |f|
+ f.puts "#{last_log}\n"
+ end
+ end
+
+ # Update in all case, allow to pass missing numbers by clicking in grey area
+ current += 1
+ end
+
+end
View
BIN seat_map/seat_map.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN seat_map/seat_map_frame.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
583 seat_map/seatmap.txt
@@ -0,0 +1,583 @@
+1, 315, 234
+2, 316, 224
+3, 312, 213
+5, 328, 234
+6, 328, 222
+7, 325, 212
+8, 341, 235
+9, 341, 225
+10, 340, 217
+11, 338, 208
+12, 355, 237
+13, 354, 228
+14, 354, 219
+15, 353, 210
+16, 353, 204
+17, 368, 237
+18, 368, 230
+19, 369, 221
+20, 368, 216
+21, 366, 208
+22, 365, 201
+23, 388, 248
+24, 388, 238
+25, 388, 231
+26, 389, 224
+27, 386, 207
+28, 384, 197
+30, 401, 248
+31, 401, 241
+32, 402, 230
+33, 401, 221
+35, 398, 205
+36, 397, 191
+38, 413, 250
+39, 414, 241
+40, 415, 231
+41, 416, 220
+43, 413, 205
+44, 411, 196
+45, 409, 187
+47, 427, 251
+48, 429, 243
+49, 429, 234
+50, 429, 226
+51, 429, 217
+52, 426, 202
+53, 425, 194
+54, 422, 183
+56, 443, 253
+57, 443, 244
+58, 444, 234
+59, 444, 226
+60, 443, 219
+62, 440, 201
+63, 440, 190
+64, 437, 180
+66, 457, 241
+67, 456, 234
+68, 456, 225
+70, 453, 199
+71, 453, 192
+72, 451, 184
+73, 450, 176
+75, 296, 205
+76, 293, 198
+77, 289, 191
+78, 308, 201
+79, 305, 192
+80, 299, 184
+81, 321, 197
+82, 317, 190
+83, 314, 182
+84, 309, 175
+85, 335, 193
+86, 330, 185
+87, 325, 175
+88, 319, 167
+89, 349, 190
+90, 345, 182
+91, 339, 173
+92, 334, 166
+93, 329, 159
+94, 360, 186
+95, 357, 179
+96, 353, 171
+97, 349, 163
+98, 345, 157
+99, 339, 150
+100, 380, 180
+101, 377, 173
+102, 373, 164
+103, 369, 157
+104, 365, 150
+105, 360, 143
+106, 355, 135
+108, 392, 177
+109, 389, 168
+110, 384, 159
+111, 379, 150
+112, 375, 143
+113, 371, 137
+114, 365, 129
+116, 406, 173
+117, 402, 166
+118, 400, 159
+119, 396, 152
+120, 392, 144
+122, 389, 138
+123, 383, 131
+124, 379, 124
+125, 373, 118
+126, 418, 169
+127, 415, 162
+128, 412, 152
+129, 407, 144
+130, 404, 138
+132, 400, 130
+133, 395, 123
+134, 389, 116
+135, 385, 110
+136, 432, 164
+137, 429, 158
+138, 427, 151
+139, 424, 144
+140, 420, 138
+141, 417, 131
+143, 414, 124
+144, 409, 117
+145, 405, 112
+146, 401, 106
+147, 395, 99
+148, 445, 161
+149, 442, 154
+150, 439, 146
+151, 436, 140
+152, 433, 131
+153, 429, 124
+154, 425, 117
+155, 420, 111
+156, 416, 104
+157, 411, 97
+158, 406, 91
+162, 279, 180
+163, 272, 175
+164, 266, 170
+165, 290, 172
+166, 283, 166
+167, 272, 159
+168, 298, 162
+169, 291, 156
+170, 285, 152
+171, 278, 147
+172, 309, 154
+173, 301, 148
+174, 292, 140
+175, 283, 134
+176, 319, 146
+177, 311, 139
+178, 305, 133
+179, 298, 127
+180, 288, 123
+181, 330, 137
+182, 323, 131
+183, 316, 125
+184, 308, 119
+185, 300, 115
+186, 293, 110
+187, 345, 123
+188, 339, 117
+189, 332, 111
+190, 325, 107
+191, 317, 100
+192, 310, 96
+193, 302, 93
+195, 353, 115
+196, 348, 108
+197, 341, 103
+198, 333, 95
+199, 324, 91
+200, 317, 86
+201, 307, 81
+203, 364, 105
+204, 359, 100
+205, 354, 95
+206, 347, 89
+207, 340, 85
+208, 334, 80
+209, 327, 75
+210, 321, 71
+211, 313, 68
+212, 375, 97
+213, 374, 97
+214, 370, 92
+215, 362, 85
+216, 356, 79
+217, 350, 75
+219, 340, 69
+220, 333, 65
+221, 326, 61
+222, 318, 57
+223, 386, 87
+224, 381, 82
+225, 374, 77
+226, 370, 73
+227, 364, 67
+228, 356, 63
+230, 351, 57
+231, 344, 53
+232, 338, 50
+233, 332, 47
+234, 325, 41
+235, 395, 78
+236, 390, 73
+237, 384, 67
+238, 377, 62
+239, 371, 56
+240, 364, 52
+241, 359, 47
+242, 352, 42
+243, 345, 37
+244, 339, 34
+245, 331, 31
+248, 263, 141
+249, 255, 138
+250, 247, 136
+251, 238, 136
+253, 269, 130
+254, 260, 126
+255, 250, 123
+256, 239, 121
+257, 275, 117
+258, 266, 114
+259, 257, 111
+260, 247, 110
+261, 238, 108
+262, 281, 105
+263, 272, 102
+264, 263, 97
+265, 254, 97
+266, 246, 94
+267, 237, 95
+268, 289, 87
+269, 280, 83
+270, 271, 81
+271, 264, 79
+272, 255, 77
+273, 246, 76
+274, 236, 76
+276, 294, 74
+277, 285, 71
+278, 277, 69
+279, 268, 66
+280, 256, 65
+281, 248, 63
+282, 237, 63
+284, 300, 63
+285, 292, 60
+286, 286, 58
+287, 277, 55
+288, 269, 53
+290, 260, 51
+291, 253, 49
+292, 246, 50
+293, 238, 49
+294, 306, 50
+295, 297, 48
+296, 289, 45
+297, 281, 42
+298, 271, 39
+300, 263, 38
+301, 255, 37
+302, 246, 36
+303, 238, 36
+304, 313, 37
+305, 305, 34
+306, 298, 32
+307, 292, 29
+308, 284, 28
+309, 277, 26
+311, 268, 23
+312, 261, 23
+313, 254, 21
+314, 245, 22
+315, 237, 21
+317, 316, 24
+318, 311, 22
+319, 303, 18
+320, 295, 17
+321, 286, 14
+322, 278, 12
+323, 270, 11
+324, 262, 9
+325, 254, 8
+326, 246, 7
+327, 238, 7
+329, 222, 135
+330, 213, 136
+331, 205, 139
+332, 197, 142
+333, 222, 122
+334, 213, 122
+335, 203, 125
+336, 193, 130
+337, 223, 107
+338, 213, 109
+339, 204, 111
+340, 194, 113
+341, 186, 117
+342, 221, 95
+343, 214, 95
+344, 205, 96
+345, 196, 98
+346, 189, 101
+347, 180, 105
+348, 222, 75
+349, 213, 76
+350, 206, 77
+351, 196, 78
+352, 188, 80
+353, 181, 83
+354, 173, 85
+356, 221, 63
+357, 213, 63
+358, 203, 65
+359, 194, 66
+360, 185, 68
+361, 177, 70
+362, 166, 74
+364, 223, 49
+365, 215, 50
+366, 207, 51
+367, 198, 52
+368, 191, 52
+370, 183, 56
+371, 175, 57
+372, 168, 59
+373, 160, 63
+374, 223, 36
+375, 214, 36
+376, 205, 38
+377, 196, 38
+378, 187, 40
+380, 178, 42
+381, 171, 45
+382, 162, 47
+383, 155, 50
+384, 223, 21
+385, 215, 21
+386, 208, 23
+387, 201, 23
+388, 193, 24
+389, 185, 25
+391, 177, 27
+392, 171, 28
+393, 162, 31
+394, 155, 34
+395, 149, 37
+397, 221, 7
+398, 215, 7
+399, 207, 9
+400, 199, 9
+401, 192, 10
+402, 182, 11
+403, 175, 13
+404, 167, 16
+405, 159, 19
+406, 152, 20
+407, 144, 24
+409, 183, 147
+410, 176, 153
+411, 168, 157
+412, 162, 162
+413, 177, 136
+414, 168, 141
+415, 160, 145
+416, 152, 152
+417, 173, 122
+418, 165, 126
+419, 157, 133
+420, 149, 138
+421, 141, 146
+422, 168, 111
+423, 159, 115
+424, 153, 119
+425, 144, 124
+426, 139, 130
+427, 131, 135
+428, 159, 92
+429, 152, 97
+430, 144, 99
+431, 137, 106
+432, 130, 111
+433, 123, 116
+434, 116, 121
+436, 152, 80
+437, 145, 86
+438, 136, 90
+439, 130, 95
+440, 121, 101
+441, 115, 107
+442, 108, 114
+444, 147, 68
+445, 140, 73
+446, 135, 76
+447, 128, 80
+448, 121, 84
+450, 114, 91
+451, 109, 94
+452, 102, 99
+453, 97, 106
+454, 142, 56
+455, 134, 61
+456, 127, 65
+457, 119, 69
+458, 113, 74
+460, 105, 79
+461, 99, 84
+462, 93, 90
+463, 87, 95
+464, 137, 42
+465, 130, 46
+466, 122, 50
+467, 116, 53
+468, 111, 57
+469, 103, 62
+471, 98, 66
+472, 92, 72
+473, 87, 77
+474, 81, 81
+475, 75, 86
+478, 131, 29
+479, 124, 34
+480, 118, 37
+481, 110, 42
+482, 103, 46
+483, 96, 51
+484, 89, 55
+485, 84, 61
+486, 79, 65
+487, 73, 71
+488, 66, 76
+489, 172, 191
+490, 168, 197
+491, 165, 205
+492, 162, 182
+493, 157, 191
+494, 152, 199
+495, 152, 175
+496, 146, 183
+497, 144, 188
+498, 140, 197
+499, 141, 167
+500, 137, 173
+501, 132, 182
+502, 128, 191
+503, 131, 156
+504, 126, 164
+505, 121, 172
+506, 118, 180
+507, 114, 188
+508, 122, 148
+509, 117, 153
+510, 112, 162
+511, 108, 168
+512, 104, 177
+513, 102, 184
+514, 108, 135
+515, 102, 141
+516, 97, 149
+517, 93, 155
+518, 88, 164
+519, 86, 173
+520, 81, 180
+522, 97, 126
+523, 90, 135
+524, 88, 141
+525, 81, 150
+526, 77, 158
+527, 73, 166
+528, 69, 174
+530, 86, 117
+531, 81, 123
+532, 77, 129
+533, 72, 138
+534, 69, 143
+536, 65, 150
+537, 62, 158
+538, 59, 164
+539, 56, 172
+540, 76, 107
+541, 70, 115
+542, 65, 122
+543, 60, 129
+544, 56, 136
+546, 53, 144
+547, 49, 151
+548, 46, 158
+549, 42, 167
+550, 65, 99
+551, 61, 104
+552, 56, 111
+553, 52, 117
+554, 49, 122
+555, 45, 129
+557, 40, 136
+558, 38, 141
+559, 34, 149
+560, 31, 155
+561, 29, 163
+564, 55, 91
+565, 50, 96
+566, 45, 102
+567, 41, 110
+568, 37, 115
+569, 32, 123
+570, 28, 129
+571, 25, 136
+572, 21, 144
+573, 18, 151
+574, 16, 158
+576, 148, 216
+577, 146, 223
+578, 145, 232
+580, 134, 213
+581, 133, 222
+582, 133, 231
+583, 122, 206
+584, 120, 217
+585, 120, 225
+586, 118, 235
+587, 108, 203
+588, 107, 209
+589, 107, 219
+590, 107, 226
+591, 106, 237
+592, 96, 200
+593, 94, 207
+594, 93, 215
+595, 92, 221
+596, 92, 228
+597, 92, 237
+599, 76, 196
+600, 74, 205
+601, 72, 222
+602, 73, 230
+603, 73, 238
+604, 73, 246
+606, 64, 193
+607, 61, 204
+609, 59, 220
+610, 59, 229
+611, 60, 238
+612, 60, 247
+614, 52, 187
+615, 50, 196
+616, 47, 201
+618, 46, 219
+619, 45, 228
+620, 46, 237
+621, 46, 248
+623, 37, 183
+624, 36, 192
+625, 34, 201
+626, 31, 218
+627, 31, 226
+628, 31, 234
+629, 31, 241
+630, 32, 251
+632, 23, 179
+633, 21, 188
+634, 20, 199
+636, 18, 216
+637, 17, 224
+638, 17, 233
+639, 17, 242
+640, 18, 251
+642, 11, 175
+643, 8, 181
+644, 8, 191
+645, 6, 198
+648, 4, 225
+649, 4, 231
+650, 3, 240

0 comments on commit be8cd14

Please sign in to comment.
Something went wrong with that request. Please try again.