Selaa lähdekoodia

Fix virtual key code mapping for zooming

Johannes Hofmann 7 vuotta sitten
vanhempi
commit
9a40c6dfb7
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4
    1
      src/main.rs

+ 4
- 1
src/main.rs Näytä tiedosto

192
                         map.move_pixel(0.0, 50.0);
192
                         map.move_pixel(0.0, 50.0);
193
                         Action::Redraw
193
                         Action::Redraw
194
                     },
194
                     },
195
-                    VirtualKeyCode::Add => {
195
+                    VirtualKeyCode::Add |
196
+                    //TODO Remove this workaround for the Windows virtual key code mapping
197
+                    VirtualKeyCode::Equals => {
196
                         if modifiers.ctrl {
198
                         if modifiers.ctrl {
197
                             map.change_tile_zoom_offset(1.0);
199
                             map.change_tile_zoom_offset(1.0);
198
                         } else {
200
                         } else {
200
                         }
202
                         }
201
                         Action::Redraw
203
                         Action::Redraw
202
                     },
204
                     },
205
+                    VirtualKeyCode::Minus |
203
                     VirtualKeyCode::Subtract => {
206
                     VirtualKeyCode::Subtract => {
204
                         if modifiers.ctrl {
207
                         if modifiers.ctrl {
205
                             map.change_tile_zoom_offset(-1.0);
208
                             map.change_tile_zoom_offset(-1.0);