kolibrios-gitea/programs/cmm/iconedit/tools/pipette.h
Kirill Lipatov (Leency) 2ec87d22f7 C-- app updates
WebView 1.8b: 
- key scroll by up and down lists 12 pixels instead of 1
- open app with param when href="" contains '|' symbol, example: href="/sys/tmpdisk|a0"
Eolite 3.96b: 
- fix sorting
- an option to highlight odd lines
- copy path to clipboard by clicking on path bar
- rewrite the code related to device an folder update: so this change removed unnecessary refreshes
- add refresh when /kolibrios mounted
IconEdit 0.57b:
- improve color gradient block
- press Delete key when smth selected fill selection by color2 and resents selection
- impove window appearance when the dark skin is set
- fix a stupid but issue which made impossible to open non-square images
- fix an issue that wrong zoom number displayed
Notes 0.8: 
- reworking, work in progress
- delete binary
Sysmon 0.87:
- minor visible improvement in progress bars
TmpDisk 0.67a:
- deny users to shoot in the foot: show forbid message on /tmp0 deletion

git-svn-id: svn://kolibrios.org@7422 a494cfbc-eb01-0410-851d-a64ba20cac60
2018-10-01 16:41:14 +00:00

24 lines
777 B
C

void PipetteTool_activate() {
SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE);
}
void PipetteTool_onKeyEvent() {
if (key_scancode == SCAN_CODE_ESC) setCurrentTool(previousTool);
}
void PipetteTool_onMouseEvent(int mouseX, int mouseY, int lkm, int pkm) {
//if (!canvas.hovered()) return; //TODO: option "Restrict pipette to canvas area"
tool_color = GetPixelUnderMouse();
DrawBar(Form.cwidth-30, 5, 20, 20, tool_color);
if (mouse.down) {
DrawBar(Form.cwidth-30, 5, 20, 20, system.color.work);
SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER);
if (mouse.key&MOUSE_LEFT) EventSetActiveColor(1, tool_color);
if (mouse.key&MOUSE_RIGHT) EventSetActiveColor(2, tool_color);
setCurrentTool(previousTool);
}
}