Subversion Repositories Kolibri OS

Rev

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

Rev 7506 Rev 7771
Line 18... Line 18...
18
 
18
 
19
#ifdef LANG_RUS
19
#ifdef LANG_RUS
20
	?define T_TAKE_SCREENSHOT "  ‘¤¥« âì áªà¨­è®â"
20
	?define T_TAKE_SCREENSHOT "  ‘¤¥« âì áªà¨­è®â"
21
	?define T_SETTINGS " áâனª¨"
21
	?define T_SETTINGS " áâனª¨"
22
	?define T_EDITBOX_FRAME " ãâì á®åà ­¥­¨ï áªà¨­è®â  "
-
 
23
	?define T_MINIMIZE "‘¢¥à­ãâì ®ª­® ¯à¨ á­¨¬ª¥"
22
	?define T_EDITBOX_FRAME " ãâì á®åà ­¥­¨ï áªà¨­è®â  "
24
	?define T_CONTINUOUS_SHOOTING "Continuous shooting"
23
	?define T_CONTINUOUS_SHOOTING "Continuous shooting"
25
	?define T_DELAY "‡ ¤¥à¦ª  ¢ ᥪ㭤 å"
24
	?define T_DELAY "‡ ¤¥à¦ª  ¢ ᥪ㭤 å"
26
	?define T_NO_DIR "' ¯ª  ­¥ áãé¥áâ¢ã¥â!' -E"
25
	?define T_NO_DIR "' ¯ª  ­¥ áãé¥áâ¢ã¥â!' -E"
27
	?define T_SET_PATH "‡ ¤ âì"
26
	?define T_SET_PATH "‡ ¤ âì"
28
#else
27
#else
29
	?define T_TAKE_SCREENSHOT "  Take a screenshot"
28
	?define T_TAKE_SCREENSHOT "  Take a screenshot"
30
	?define T_SETTINGS "Settings"
29
	?define T_SETTINGS "Settings"
31
	?define T_EDITBOX_FRAME " Save path "
-
 
32
	?define T_MINIMIZE "Minimize window"
30
	?define T_EDITBOX_FRAME " Save path "
33
	?define T_CONTINUOUS_SHOOTING "Continuous shooting"
31
	?define T_CONTINUOUS_SHOOTING "Continuous shooting"
34
	?define T_DELAY "Delay in seconds"
32
	?define T_DELAY "Delay in seconds"
35
	?define T_NO_DIR "'Directory does not exists!' -E"
33
	?define T_NO_DIR "'Directory does not exists!' -E"
36
	?define T_SET_PATH "Set"
34
	?define T_SET_PATH "Set"
Line 57... Line 55...
57
 
55
 
58
edit_box edit_save = {250,25,100,0xffffff,0x94AECE,0xFFFfff,0xffffff,
56
edit_box edit_save = {250,25,100,0xffffff,0x94AECE,0xFFFfff,0xffffff,
Line 59... Line 57...
59
	0x10000000,sizeof(save_path)-2,#save_path,0, 0b};
57
	0x10000000,sizeof(save_path)-2,#save_path,0, 0b};
60
 
-
 
61
more_less_box delay = { 1, 0, 64, T_DELAY };
58
 
Line 62... Line 59...
62
checkbox minimize = { T_MINIMIZE, true };
59
more_less_box delay = { 1, 0, 64, T_DELAY };
63
checkbox continuous_shooting = { T_CONTINUOUS_SHOOTING, true };
60
checkbox continuous_shooting = { T_CONTINUOUS_SHOOTING, true };
Line 134... Line 131...
134
	take_scr_btn_width = DrawIconButton(PD, PD, BTN_MAKE_SCREENSHOT, T_TAKE_SCREENSHOT, 45);
131
	take_scr_btn_width = DrawIconButton(PD, PD, BTN_MAKE_SCREENSHOT, T_TAKE_SCREENSHOT, 45);
135
	DrawIconButton(PD+take_scr_btn_width, PD, BTN_SETTINGS, " ", 10);	
132
	DrawIconButton(PD+take_scr_btn_width, PD, BTN_SETTINGS, " ", 10);	
136
}
133
}
Line 137... Line 134...
137
 
134
 
138
void EventTakeScreenshot() {
135
void EventTakeScreenshot() {
139
	if (minimize.checked) MinimizeWindow(); 
136
	MinimizeWindow(); 
140
	pause(delay.value*100);
137
	pause(delay.value*100);
141
	CopyScreen(screenshot, 0, 0, screen.width, screen.height);
138
	CopyScreen(screenshot, 0, 0, screen.width, screen.height);
142
	ActivateWindow(GetProcessSlot(Form.ID));
-
 
143
	if (!minimize.checked) DrawMainContent();
139
	ActivateWindow(GetProcessSlot(Form.ID));
144
	EventSaveImageFile();
140
	EventSaveImageFile();
Line 145... Line 141...
145
}
141
}
146
 
142
 
147
void EventSaveImageFile()
143
void EventSaveImageFile()
148
{
144
{
149
	int i=0;
145
	int i=0;
150
	char save_file_name[4096];
146
	char save_file_name[4096];
151
	do {
147
	do {
-
 
148
		i++;
-
 
149
		//sprintf(, "%s/screen_%i.png", #save_path_stable, i);
-
 
150
		strcpy(#save_file_name, #save_path_stable);
-
 
151
		strcat(#save_file_name, "/screen_");
152
		i++;
152
		strcat(#save_file_name, itoa(i));
153
		sprintf(#save_file_name, "%s/screen_%i.png", #save_path_stable, i);
153
		strcat(#save_file_name, ".png");
154
	} while (file_exists(#save_file_name));
154
	} while (file_exists(#save_file_name));
Line 169... Line 169...
169
		break;
169
		break;
Line 170... Line 170...
170
 
170
 
171
	case evKey:
171
	case evKey:
172
		GetKeys();
172
		GetKeys();
173
		if (SCAN_CODE_ESC == key_scancode) ExitProcess();
173
		if (SCAN_CODE_ESC == key_scancode) ExitProcess();
174
		EAX= key_ascii << 8;
174
		EAX = key_editbox;
175
		edit_box_key stdcall (#edit_save);	
175
		edit_box_key stdcall (#edit_save);	
Line 176... Line 176...
176
		break;
176
		break;
177
 
177
 
Line 195... Line 195...
195
			}
195
			}
196
			else notify(T_NO_DIR);
196
			else notify(T_NO_DIR);
Line 197... Line 197...
197
 
197
 
198
		}
198
		}
199
		delay.click(id);
-
 
200
		minimize.click(id);
199
		delay.click(id);
Line 201... Line 200...
201
		break;
200
		break;
202
 
201
 
203
	case evReDraw:
202
	case evReDraw:
Line 207... Line 206...
207
 
206
 
208
void DrawSettingsWindow()
207
void DrawSettingsWindow()
209
{
208
{
210
	DefineAndDrawWindow(Form.left+100, Form.top-40, 400, 230, 0x34, system.color.work, T_SETTINGS, 0);
209
	DefineAndDrawWindow(Form.left+100, Form.top-40, 400, 230, 0x34, system.color.work, T_SETTINGS, 0);
211
	GetProcessInfo(#Settings, SelfInfo);
-
 
212
	minimize.draw(15, 15);
210
	GetProcessInfo(#Settings, SelfInfo);
213
	delay.draw(15, 45);
211
	delay.draw(15, 30);
214
	DrawFrame(15, 85, 360, 95, T_EDITBOX_FRAME);
212
	DrawFrame(15, 85, 360, 95, T_EDITBOX_FRAME);
215
		DrawEditBoxPos(32, 110, #edit_save);
213
		DrawEditBoxPos(32, 110, #edit_save);
216
		DrawStandartCaptButton(edit_save.left + edit_save.width + 15, edit_save.top-3, BTN_OD, "...");
214
		DrawStandartCaptButton(edit_save.left + edit_save.width + 15, edit_save.top-3, BTN_OD, "...");
217
		DrawStandartCaptButton(edit_save.left, edit_save.top+32, BTN_SET, T_SET_PATH);	
215
		DrawStandartCaptButton(edit_save.left, edit_save.top+32, BTN_SET, T_SET_PATH);