Subversion Repositories Kolibri OS

Rev

Rev 7259 | Rev 7262 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7259 Rev 7260
Line 9... Line 9...
9
window colors
9
window colors
10
enhance icon
10
enhance icon
11
pipet aside color view
11
pipet aside color view
12
*/
12
*/
Line 13... Line 13...
13
 
13
 
Line 14... Line 14...
14
#define MEMSIZE 4096*200
14
#define MEMSIZE 4096*250
15
 
15
 
16
#include "../lib/gui.h"
16
#include "../lib/gui.h"
Line 29... Line 29...
29
//                                                   //
29
//                                                   //
30
//                       DATA                        //
30
//                       DATA                        //
31
//                                                   //
31
//                                                   //
32
//===================================================//
32
//===================================================//
Line 33... Line 33...
33
 
33
 
Line 34... Line 34...
34
#define T_TITLE "Icon Editor 0.49 Alpha"
34
#define T_TITLE "Icon Editor 0.50 Alpha"
35
 
35
 
36
#define TOOLBAR_H    24+8
36
#define TOOLBAR_H    24+8
37
#define PANEL_LEFT_W 16+5+5+3+3
37
#define PANEL_LEFT_W 16+5+5+3+3
Line 80... Line 80...
80
	BTN_FILL,
80
	BTN_FILL,
81
	BTN_LINE,
81
	BTN_LINE,
82
	BTN_RECT,
82
	BTN_RECT,
83
	BTN_BAR,
83
	BTN_BAR,
84
	BTN_SELECT,
84
	BTN_SELECT,
85
	BTN_SCREEN,
85
	BTN_SCREEN_COPY,
86
	BTN_ZOOM_IN,
86
	BTN_ZOOM_IN,
87
	BTN_ZOOM_OUT,
87
	BTN_ZOOM_OUT,
88
	BTNS_PALETTE_COLOR_MAS = 100,
88
	BTNS_PALETTE_COLOR_MAS = 100,
89
	BTNS_LAST_USED_COLORS = 400
89
	BTNS_LAST_USED_COLORS = 400
90
};
90
};
Line 270... Line 270...
270
					setCurrentTool(TOOL_BAR);
270
					setCurrentTool(TOOL_BAR);
271
					break;
271
					break;
272
				case BTN_SELECT:
272
				case BTN_SELECT:
273
					setCurrentTool(TOOL_SELECT);
273
					setCurrentTool(TOOL_SELECT);
274
					break;
274
					break;
-
 
275
				case BTN_SCREEN_COPY:
-
 
276
					setCurrentTool(TOOL_SCREEN_COPY);
-
 
277
					break;
275
				case CLOSE_BTN:
278
				case CLOSE_BTN:
276
					EventExitIconEdit();
279
					EventExitIconEdit();
277
					break;
280
					break;
278
			}
281
			}
279
			break;
282
			break;
Line 288... Line 291...
288
			if (key_scancode == SCAN_CODE_KEY_P) setCurrentTool(TOOL_PENCIL);
291
			if (key_scancode == SCAN_CODE_KEY_P) setCurrentTool(TOOL_PENCIL);
289
			if (key_scancode == SCAN_CODE_KEY_I) setCurrentTool(TOOL_PIPETTE);
292
			if (key_scancode == SCAN_CODE_KEY_I) setCurrentTool(TOOL_PIPETTE);
290
			if (key_scancode == SCAN_CODE_KEY_F) setCurrentTool(TOOL_FILL);
293
			if (key_scancode == SCAN_CODE_KEY_F) setCurrentTool(TOOL_FILL);
291
			if (key_scancode == SCAN_CODE_KEY_L) setCurrentTool(TOOL_LINE);
294
			if (key_scancode == SCAN_CODE_KEY_L) setCurrentTool(TOOL_LINE);
292
			if (key_scancode == SCAN_CODE_KEY_R) setCurrentTool(TOOL_RECT);
295
			if (key_scancode == SCAN_CODE_KEY_R) setCurrentTool(TOOL_RECT);
-
 
296
			if (key_scancode == SCAN_CODE_KEY_B) setCurrentTool(TOOL_BAR);
-
 
297
			if (key_scancode == SCAN_CODE_KEY_S) setCurrentTool(TOOL_SELECT);
Line 293... Line 298...
293
 
298
 
294
			if (key_scancode == SCAN_CODE_KEY_Z) && (key_modifier&KEY_LCTRL) actionsHistory.undoLastAction();
299
			if (key_scancode == SCAN_CODE_KEY_Z) && (key_modifier&KEY_LCTRL) actionsHistory.undoLastAction();
Line 295... Line 300...
295
			if (key_scancode == SCAN_CODE_KEY_Y) && (key_modifier&KEY_LCTRL) actionsHistory.redoLastAction();
300
			if (key_scancode == SCAN_CODE_KEY_Y) && (key_modifier&KEY_LCTRL) actionsHistory.redoLastAction();
Line 375... Line 380...
375
	DrawLeftPanelButton(BTN_FILL,   ty.inc(TB_ICON_PADDING), 40);
380
	DrawLeftPanelButton(BTN_FILL,   ty.inc(TB_ICON_PADDING), 40);
376
	DrawLeftPanelButton(BTN_LINE,   ty.inc(TB_ICON_PADDING), 41);
381
	DrawLeftPanelButton(BTN_LINE,   ty.inc(TB_ICON_PADDING), 41);
377
	DrawLeftPanelButton(BTN_RECT,   ty.inc(TB_ICON_PADDING), 42);
382
	DrawLeftPanelButton(BTN_RECT,   ty.inc(TB_ICON_PADDING), 42);
378
	DrawLeftPanelButton(BTN_BAR,    ty.inc(TB_ICON_PADDING), 43);
383
	DrawLeftPanelButton(BTN_BAR,    ty.inc(TB_ICON_PADDING), 43);
379
	DrawLeftPanelButton(BTN_SELECT, ty.inc(TB_ICON_PADDING), 44);
384
	DrawLeftPanelButton(BTN_SELECT, ty.inc(TB_ICON_PADDING), 44);
380
	//DrawLeftPanelButton(BTN_SCREEN, ty.inc(TB_ICON_PADDING), 45);
385
	DrawLeftPanelButton(BTN_SCREEN_COPY, ty.inc(TB_ICON_PADDING), 45);
381
	DrawRectangle3D(5, currentTool*TB_ICON_PADDING+right_bar.y, 16+3+2, 16+3+2, 0x333333, 0x777777);
386
	DrawRectangle3D(5, currentTool*TB_ICON_PADDING+right_bar.y, 16+3+2, 16+3+2, 0x333333, 0x777777);
382
}
387
}
Line 383... Line 388...
383
 
388
 
384
void DrawEditArea()
389
void DrawEditArea()