mirror of
https://github.com/Pecusx/libretro-atari800.git
synced 2026-05-21 21:33:56 +02:00
Third (final??) attemp at a new Virtual Keyboard (#75)
* Atari Console keys Added: Help, Start, Select, Option and Reset keys. * Atari TAB, RETURN and SPACE keys * Return? * Start, Option, Help and Emulator Menu buttons * Help key on Pad Added Atari Help key to joypad mapping. * First try to new keyboard * Shit on VKBD * Control key handle * Shift text UPPER when pressed * Atari 8bit font * Virtual Keyboard keys with Control * Minor error * 1st attemp to new vkbd layout Virtual Keyoboard recreated. Added atari font, Ctrl and Shift funcionality. Console buttons on second page. * % and null character display on VKBD * Revert "% and null character display on VKBD" This reverts commitf4eb848f26. * Displaying % and heart on VKBD - maybe... * Set max key description lenght to 3 * Always display only 3 characters of key desc. * Schift & Control status on VKBD * Second page of VKBD New second page. New layout, atari cursor keys and F1-F4 now working. * Minor mistake :) * Correct atari F1-F4 handling * Oooops... minor error * Better keys handling * Better Shift & Control indicators * Much better Shift and Control colors :) * Disable joystick input if Virtual Keyboard active Only for testing * Revert "Disable joystick input if Virtual Keyboard active" This reverts commit8b942c29e0. * One page VKBD layout Atari keyboard fits in one page! * Atari del/Bk Sp properly handling * VKBD opacity Only for testing * Keys names opacity Test only * Still testing VKBD opacity * minor error Still testing opacity * Added VKbd opacity witch switch. * Oppps...
This commit is contained in:
+47
-6
@@ -10,6 +10,7 @@ extern int NPAGE;
|
||||
extern int KCOL;
|
||||
extern int BKGCOLOR;
|
||||
extern int SHIFTON;
|
||||
extern int CTRLON;
|
||||
|
||||
void virtual_kdb(char *buffer,int vx,int vy)
|
||||
{
|
||||
@@ -23,7 +24,7 @@ unsigned *pix=(unsigned*)buffer;
|
||||
unsigned short *pix=(unsigned short *)buffer;
|
||||
#endif
|
||||
|
||||
page = (NPAGE == -1) ? 0 : 5*NPLGN;
|
||||
page = (NPAGE == -1) ? 0 : NLIGN*NPLGN;
|
||||
coul = RGB565(28, 28, 31);
|
||||
BKGCOLOR = (KCOL>0?0xFF808080:0);
|
||||
|
||||
@@ -33,15 +34,55 @@ unsigned short *pix=(unsigned short *)buffer;
|
||||
for(y=0;y<NLIGN;y++)
|
||||
{
|
||||
DrawBoxBmp((char*)pix,XBASE3+x*XSIDE,YBASE3+y*YSIDE, XSIDE,YSIDE, RGB565(7, 2, 1));
|
||||
Draw_text((char*)pix,XBASE0-2+x*XSIDE ,YBASE0+YSIDE*y,coul, BKGCOLOR ,1, 1,20,
|
||||
SHIFTON==-1?MVk[(y*NPLGN)+x+page].norml:MVk[(y*NPLGN)+x+page].shift);
|
||||
if (SHIFTON==1)
|
||||
{
|
||||
Draw_text((char*)pix,XBASE0-2+x*XSIDE ,YBASE0+YSIDE*y,coul, BKGCOLOR ,1, 1,3,MVk[(y*NPLGN)+x+page].shift);
|
||||
}
|
||||
else if (CTRLON==1)
|
||||
{
|
||||
Draw_text((char*)pix,XBASE0-2+x*XSIDE ,YBASE0+YSIDE*y,coul, BKGCOLOR ,1, 1,3,MVk[(y*NPLGN)+x+page].ctrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
Draw_text((char*)pix,XBASE0-2+x*XSIDE ,YBASE0+YSIDE*y,coul, BKGCOLOR ,1, 1,3,MVk[(y*NPLGN)+x+page].norml);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// draw Shift and Control keys status
|
||||
// Shift - position 0,4
|
||||
if (SHIFTON==1)
|
||||
{
|
||||
Draw_text((char*)pix,XBASE0-2+0*XSIDE ,YBASE0+YSIDE*4,RGB565(2,2,31), BKGCOLOR ,1, 1,3,MVk[(4*NPLGN)+0+page].shift);
|
||||
}
|
||||
// Control - position 0,3
|
||||
if (CTRLON==1)
|
||||
{
|
||||
Draw_text((char*)pix,XBASE0-2+0*XSIDE ,YBASE0+YSIDE*3,RGB565(2,2,31), BKGCOLOR ,1, 1,3,MVk[(3*NPLGN)+0+page].ctrl);
|
||||
}
|
||||
|
||||
DrawBoxBmp((char*)pix,XBASE3+vx*XSIDE,YBASE3+vy*YSIDE, XSIDE,YSIDE, RGB565(31, 2, 1));
|
||||
Draw_text((char*)pix,XBASE0-2+vx*XSIDE ,YBASE0+YSIDE*vy,RGB565(2,31,1), BKGCOLOR ,1, 1,20,
|
||||
SHIFTON==-1?MVk[(vy*NPLGN)+vx+page].norml:MVk[(vy*NPLGN)+vx+page].shift);
|
||||
|
||||
if (SHIFTON==1)
|
||||
{
|
||||
Draw_text((char*)pix,XBASE0-2+vx*XSIDE ,YBASE0+YSIDE*vy,RGB565(2,31,1), BKGCOLOR ,1, 1,3,MVk[(vy*NPLGN)+vx+page].shift);
|
||||
}
|
||||
else if (CTRLON==1)
|
||||
{
|
||||
Draw_text((char*)pix,XBASE0-2+vx*XSIDE ,YBASE0+YSIDE*vy,RGB565(2,31,1), BKGCOLOR ,1, 1,3,MVk[(vy*NPLGN)+vx+page].ctrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
Draw_text((char*)pix,XBASE0-2+vx*XSIDE ,YBASE0+YSIDE*vy,RGB565(2,31,1), BKGCOLOR ,1, 1,3,MVk[(vy*NPLGN)+vx+page].norml);
|
||||
}
|
||||
if (vx==0 && vy==4 && SHIFTON==1) // diferent Shift color if Shift is ON - position 0,4
|
||||
{
|
||||
Draw_text((char*)pix,XBASE0-2+vx*XSIDE ,YBASE0+YSIDE*vy,RGB565(2,31,21), BKGCOLOR ,1, 1,3,MVk[(vy*NPLGN)+vx+page].shift);
|
||||
}
|
||||
if (vx==0 && vy==3 && CTRLON==1) // diferent Conrol color if Control is ON - position 0,3
|
||||
{
|
||||
Draw_text((char*)pix,XBASE0-2+vx*XSIDE ,YBASE0+YSIDE*vy,RGB565(2,31,21), BKGCOLOR ,1, 1,3,MVk[(vy*NPLGN)+vx+page].ctrl);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int check_vkey2(int x,int y)
|
||||
|
||||
Reference in New Issue
Block a user