applet_init();
while (?what_here?) { switch (kbd_get_autoclicked_key() | get_jogdial_direction()) { case KEY_DOWN: do_something_for_down_key(); break; applet_draw()}
Sure it helps:)But now I have to translate this description in working code... And this will be hard task for me! I hope I'll do it. I'll ask in a case of problems.Thank you!
#include "stdlib.h"#include "keyboard.h"#include "platform.h"#include "core.h"#include "gui.h"#include "gui_draw.h"void gui_applet_draw_callback(int enforce_redraw);void gui_applet_kbd_process();void gui_applet_menu_kbd_process();gui_handler GUI_MODE_APPLET = { gui_applet_draw_callback, gui_applet_kbd_process, gui_applet_menu_kbd_process, 0, GUI_MODE_MAGICNUM };//-------------------------------------------------------------------void gui_applet_init() { gui_set_mode( (unsigned int)&GUI_MODE_APPLET ); applet_redraw = 2;}//-------------------------------------------------------------------void gui_applet_draw_callback(int enforce_redraw) { if ( applet_redraw ) { if ( applet_redraw==2 ) some_initial_draws(); partial_draws() applet_redraw=0; }}//-------------------------------------------------------------------static void gui_applet_run() { somework(); applet_redraw=1; somework(); applet_redraw=1;}//-------------------------------------------------------------------void gui_applet_kbd_process() { switch (kbd_get_autoclicked_key()) { case KEY_SET: gui_applet_run(); break; }}void gui_applet_menu_kbd_process() { if () your_action() else gui_default_kbd_process_menu_btn();}
Started by Old Farseeing Art « 1 2 » Script Writing
Started by mattkime Script Writing
Started by outslider General Discussion and Assistance
Started by patnaik Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes)
Started by shinnen « 1 2 » Completed and Working Scripts