# HG changeset patch # User Matti Hamalainen # Date 1533809379 -10800 # Node ID 12cf30907f26d97da4c94c71afed5c1d2a98d724 # Parent 72ae62f2036bbec6de1082f182f1b11ede7e2318 More work on integrating changes from v1.8.2018 diff -r 72ae62f2036b -r 12cf30907f26 draw_outputs.pde --- a/draw_outputs.pde Wed Aug 08 11:16:18 2018 +0300 +++ b/draw_outputs.pde Thu Aug 09 13:09:39 2018 +0300 @@ -967,20 +967,8 @@ //handles different tool behavior if (g_data[int('m')] == 0 && g_data[int('M')] == 0) { - if (g_uizoom == 1) { - x = int(qqx / 2); - y = int(qqy / 2); - } - else - if (g_uizoom == 2) { - x = int(qqx / 3); - y = int(qqy / 3); - } - else - if (g_uizoom == 3) { - x = int(qqx / 4); - y = int(qqy / 4); - } + x = int(qqx / psizex); + y = int(qqy / psizey); } else if (g_data[int('m')] == 1 || g_data[int('M')] == 1) { x = int(qqx / psizex) + g_ofx * 8; @@ -1105,6 +1093,9 @@ else floodfill_iq(ox, oy, mbut); } + else + changeborder(mbut); + restoreparameters(); } } diff -r 72ae62f2036b -r 12cf30907f26 draw_smart.pde --- a/draw_smart.pde Wed Aug 08 11:16:18 2018 +0300 +++ b/draw_smart.pde Thu Aug 09 13:09:39 2018 +0300 @@ -109,6 +109,24 @@ } +void changeborder(int mbut) +{ + if (machine == MSX || machine == QLLOW || machine == AMIGA || + machine == PICO8 || machine == BK0010 || machine == COCO3) + return; + + int par = g_farge; + store_undo(); + message("Set border"); + if (mbut == LEFT) par = g_farge; + if (mbut == RIGHT) par = g_backg; + g_map[0] = byte(zxcolor(par)); + sussborder(); + g_boxreconstruct = 2; + refresh_all(); +} + + void floodfill_init(int xx, int yy) { for (x = 0; x < X; x++) diff -r 72ae62f2036b -r 12cf30907f26 events.pde --- a/events.pde Wed Aug 08 11:16:18 2018 +0300 +++ b/events.pde Thu Aug 09 13:09:39 2018 +0300 @@ -83,6 +83,14 @@ } +void mouseWheel(processing.event.MouseEvent event) +{ + float e = event.getCount(); + if (e < -0.1) command(g_wheelup); + if (e > 0.1) command(g_wheeldown); +} + + void mouseDragged() { int msx, msy; diff -r 72ae62f2036b -r 12cf30907f26 multipaint.pde --- a/multipaint.pde Wed Aug 08 11:16:18 2018 +0300 +++ b/multipaint.pde Thu Aug 09 13:09:39 2018 +0300 @@ -22,6 +22,7 @@ int g_rband, g_rbang, g_boxreconstruct, g_charlimit; int g_animx, g_animy, g_animframes, g_animno, g_animtime, g_animspeed; int g_omag, g_bordh, g_bordv, g_keymacpos; +int g_wheelup = int(':'), g_wheeldown = int(';'), g_middlebutton = int(','); boolean g_control = false, g_shift = false, g_dirty; @@ -498,7 +499,7 @@ viewport(); //magport(); switcher(1); - update_ui(); + update_ui(false); updatePixels(); // Message control