mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
ランチャー タッチパッドによる選択と決定を実装
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@214 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
5f7b702fef
commit
32b2cf2945
@ -37,7 +37,7 @@
|
||||
|
||||
// extern data------------------------------------------
|
||||
|
||||
extern u32 bg_char_data[16 * 5];
|
||||
extern u32 bg_char_data[8 * 6];
|
||||
extern u16 bg_scr_data[32 * 32];
|
||||
extern u16 bg_scr_data2[32 * 32];
|
||||
|
||||
@ -331,6 +331,23 @@ static BOOL SelectCenterFunc( u16 *csr, TPData *tgt )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL SelectFunc( u16 *csr, TPData *tgt )
|
||||
{
|
||||
int l;
|
||||
|
||||
for(l=0; l<2; l++)
|
||||
{
|
||||
int x = 11*8 + l*6*8;
|
||||
int y = 19*8;
|
||||
if(WithinRangeTP( x, y, x+32, y+16, tgt ))
|
||||
{
|
||||
*csr = (u16)l;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ランチャーメイン
|
||||
TitleProperty *LauncherMain( TitleProperty *pTitleList )
|
||||
{
|
||||
@ -344,6 +361,7 @@ TitleProperty *LauncherMain( TitleProperty *pTitleList )
|
||||
TitleProperty *ret = NULL;
|
||||
int brightness;
|
||||
u16 dummy;
|
||||
u16 tp_lr = 3;
|
||||
|
||||
// RTC情報の取得&表示
|
||||
GetAndDrawRTCData( &g_rtcDraw, FALSE );
|
||||
@ -381,12 +399,18 @@ TitleProperty *LauncherMain( TitleProperty *pTitleList )
|
||||
}
|
||||
|
||||
//--------------------------------------
|
||||
// キー入力処理
|
||||
// タッチパッド・キー入力処理
|
||||
//--------------------------------------
|
||||
if(pad.cont & PAD_KEY_RIGHT){ // バナー選択
|
||||
|
||||
if( tpd.disp.touch )
|
||||
{
|
||||
(void) SelectFunc( &tp_lr, &tpd.disp );
|
||||
}
|
||||
|
||||
if(pad.cont & PAD_KEY_RIGHT || tp_lr == 1){ // バナー選択
|
||||
if(csr_v == 0) csr_v = 1;
|
||||
}
|
||||
if( pad.cont & PAD_KEY_LEFT ){
|
||||
if( pad.cont & PAD_KEY_LEFT || tp_lr == 0){
|
||||
if(csr_v == 0) csr_v = -1;
|
||||
}
|
||||
s_csr += csr_v;
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
// extern data------------------------------------------
|
||||
|
||||
extern u32 bg_char_data[16 * 6];
|
||||
extern u32 bg_char_data[8 * 6];
|
||||
extern u16 bg_scr_data[32 * 32];
|
||||
|
||||
// function's prototype declaration---------------------
|
||||
|
||||
@ -73,7 +73,7 @@ typedef enum NameOrComment
|
||||
|
||||
// extern data----------------------------------
|
||||
|
||||
extern u32 bg_char_data[16 * 6];
|
||||
extern u32 bg_char_data[8 * 6];
|
||||
extern u16 bg_scr_data[32 * 32];
|
||||
extern u16 bg_birth_scr_data[32 * 32];
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// BGキャラクタ
|
||||
u32 bg_char_data[16 * 5] = {
|
||||
u32 bg_char_data[8 * 6] = {
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,// 0000h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x11111111, 0x44444444, 0x77777777, 0x99999999,// 0001h
|
||||
@ -10,10 +10,11 @@ u32 bg_char_data[16 * 5] = {
|
||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
||||
0x11111111, 0x11111111, 0x11111111, 0x11111111,// 0004h
|
||||
0x11111111, 0x11111111, 0x11111111, 0x11111111,
|
||||
0xffffffff, 0xffffff11, 0xffffff11, 0xffff11ff,// 0005h(\)
|
||||
0xffff11ff, 0xff11ffff, 0xff11ffff, 0x11ffffff,
|
||||
};
|
||||
|
||||
|
||||
|
||||
// BGスクリーンデータ1
|
||||
u16 bg_scr_data[32 * 32]=
|
||||
{
|
||||
@ -55,10 +56,10 @@ u16 bg_scr_data[32 * 32]=
|
||||
0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,
|
||||
0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,//18
|
||||
0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,
|
||||
0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,//19
|
||||
0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,
|
||||
0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,//20
|
||||
0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,
|
||||
0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1405,0x1405,0x1405,0x1405,0x1003,//19
|
||||
0x1003,0x1005,0x1005,0x1005,0x1005,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,
|
||||
0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1c05,0x1c05,0x1c05,0x1c05,0x1003,//20
|
||||
0x1003,0x1805,0x1805,0x1805,0x1805,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,
|
||||
0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,//21
|
||||
0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,0x1003,
|
||||
0x1802,0x1802,0x1802,0x1802,0x1802,0x1802,0x1802,0x1802,0x1802,0x1802,0x1802,0x1802,0x1802,0x1802,0x1802,0x1802,//22
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// BGキャラクタ
|
||||
u32 bg_char_data[16 * 6] = {
|
||||
u32 bg_char_data[8 * 6] = {
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,// 0000h
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x11111111, 0x44444444, 0x77777777, 0x99999999,// 0001h
|
||||
|
||||
Loading…
Reference in New Issue
Block a user