Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <display_syscalls.h>
- #include <keyboard_syscalls.h>
- #include <display_syscalls.h>
- #include <keyboard_syscalls.h>
- #include <display_syscalls.h>
- #include <display.h>
- #include <keyboard.hpp>
- #include <color.h>
- #include <RTC_syscalls.h>
- #include <CONVERT_syscalls.h>
- int main() {
- int key;
- int value = 1;
- int done = 0;
- char buffer[10];
- while(!done) {
- //Bdisp_EnableColor(1);
- //Bdisp_AllClr_VRAM();
- //blackbox test function here
- DirectDrawRectangle( 1, 1, 100, 100, COLOR_BLACK );
- FKey_Display( 1, "TEST" );
- /*strcpy(buffer," ");
- itoa(value, buffer+2);
- PrintXY( 1, 1, buffer, TEXT_MODE_NORMAL, TEXT_COLOR_BLACK);*/
- Bdisp_PutDisp_DD();
- GetKey(&key);
- switch(key) {
- case KEY_CTRL_UP:
- value = 1+value;
- break;
- case KEY_CTRL_DOWN:
- value = value-1;
- break;
- case KEY_CTRL_RIGHT:
- value = value+10;
- break;
- case KEY_CTRL_LEFT:
- value = value-10;
- break;
- case KEY_CTRL_MENU:
- done = 1;
- break;
- }
- /* if(value < 0) {
- value = 0;
- } */
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement