diff --git a/NCL/tools/ShowErrorPage_d.html b/NCL/tools/ShowErrorPage_d.html index e9a0d76..7ab00d2 100644 --- a/NCL/tools/ShowErrorPage_d.html +++ b/NCL/tools/ShowErrorPage_d.html @@ -6,20 +6,22 @@

ShowErrorPage

-
+

- + \ No newline at end of file diff --git a/SMC/font_check/shopmock/fontlist_01_d.html b/SMC/font_check/shopmock/fontlist_01_d.html index a72bc09..58bbad7 100644 --- a/SMC/font_check/shopmock/fontlist_01_d.html +++ b/SMC/font_check/shopmock/fontlist_01_d.html @@ -56,9 +56,9 @@ window.addEventListener('load', function(){ onload_scroll(); } , false); diff --git a/SMC/font_check/shopmock/fontlist_01_index.html b/SMC/font_check/shopmock/fontlist_01_index.html index 8924026..ee6a8f7 100644 --- a/SMC/font_check/shopmock/fontlist_01_index.html +++ b/SMC/font_check/shopmock/fontlist_01_index.html @@ -1,5 +1,5 @@ --- -title: DSi Shop +title: fontlist layout: dsiware --- diff --git a/SMC/font_check/shopmock/fontlist_02_d.html b/SMC/font_check/shopmock/fontlist_02_d.html index 11ec179..b88fe77 100644 --- a/SMC/font_check/shopmock/fontlist_02_d.html +++ b/SMC/font_check/shopmock/fontlist_02_d.html @@ -53,9 +53,9 @@ window.addEventListener('load', function(){ onload_scroll(); } , false); diff --git a/SMC/font_check/shopmock/fontlist_02_index.html b/SMC/font_check/shopmock/fontlist_02_index.html index 6bdc8fc..1260b3f 100644 --- a/SMC/font_check/shopmock/fontlist_02_index.html +++ b/SMC/font_check/shopmock/fontlist_02_index.html @@ -1,5 +1,5 @@ --- -title: DSi Shop +title: fontlist layout: dsiware --- diff --git a/SMC/font_check/shopmock/fontlist_03_d.html b/SMC/font_check/shopmock/fontlist_03_d.html index 832d75d..e4081dc 100644 --- a/SMC/font_check/shopmock/fontlist_03_d.html +++ b/SMC/font_check/shopmock/fontlist_03_d.html @@ -53,9 +53,9 @@ window.addEventListener('load', function(){ onload_scroll(); } , false); diff --git a/SMC/font_check/shopmock/fontlist_03_index.html b/SMC/font_check/shopmock/fontlist_03_index.html index 2515826..9fc712b 100644 --- a/SMC/font_check/shopmock/fontlist_03_index.html +++ b/SMC/font_check/shopmock/fontlist_03_index.html @@ -1,5 +1,5 @@ --- -title: DSi Shop +title: fontlist layout: dsiware --- diff --git a/SMC/font_check/shopmock/fontlist_04_d.html b/SMC/font_check/shopmock/fontlist_04_d.html index 5f657df..d028ac2 100644 --- a/SMC/font_check/shopmock/fontlist_04_d.html +++ b/SMC/font_check/shopmock/fontlist_04_d.html @@ -53,9 +53,9 @@ window.addEventListener('load', function(){ onload_scroll(); } , false); diff --git a/SMC/font_check/shopmock/fontlist_04_index.html b/SMC/font_check/shopmock/fontlist_04_index.html index d204157..fa61f7d 100644 --- a/SMC/font_check/shopmock/fontlist_04_index.html +++ b/SMC/font_check/shopmock/fontlist_04_index.html @@ -1,5 +1,5 @@ --- -title: DSi Shop +title: fontlist layout: dsiware --- diff --git a/SMC/tools/ShowErrorPage_d.html b/SMC/tools/ShowErrorPage_d.html index ddceaef..353c8de 100644 --- a/SMC/tools/ShowErrorPage_d.html +++ b/SMC/tools/ShowErrorPage_d.html @@ -5,21 +5,23 @@ GetMessage - +

ShowErrorPage

-
+

diff --git a/_layouts/dsiware.html b/_layouts/dsiware.html index 3965a2f..ad678f4 100644 --- a/_layouts/dsiware.html +++ b/_layouts/dsiware.html @@ -50,12 +50,13 @@ I have found 3 different versions of this app. I am not sure what the specific differences between the apps are.
I used the files from shop.HNFC.Release.v1536 for my demo.

+
shop.HNFC.Release.v1536: srl | tad
shop.HNFC.Release.14231: srl | tad
shop.HNFC.Release.thumb: srl | tad
- +


shop.HNFC.Release.v1536.tad is the only working version of the debug shop. It will only run if installed to NAND and booted via the home menu.
Using nds-bootstrap, unlaunch, or any similar apps will introduce problems like dead touch controls, a 293003 error, or cause the shop to whitescreen.


diff --git a/error/E_01_d.html b/error/E_01_d.html new file mode 100644 index 0000000..8004003 --- /dev/null +++ b/error/E_01_d.html @@ -0,0 +1,234 @@ + + + + + + + + + + + + + +E_01_d + + + + + + + + + +
+
+ +
+ + + +
+ + + + +
+
+ + + +
+
+
+ + + + + + +
+
+ + + +
+
+
+ + + + + + + + + + + +
+
+ + +
+
+ + + +
+
+ + + + +
+
+
+ + + + + +
+
+ + + + +
+
+
+ + + + + + + + + + + +
+
+ + +
+
+ + + +
+
+ + + + +
+
+
+ + + + + +
+
+ + + + +
+
+
+ + + + + + + diff --git a/error/E_01_index.html b/error/E_01_index.html new file mode 100644 index 0000000..603e27b --- /dev/null +++ b/error/E_01_index.html @@ -0,0 +1,6 @@ +--- +title: error +layout: dsiware +--- + + \ No newline at end of file diff --git a/error/E_01_u.html b/error/E_01_u.html new file mode 100644 index 0000000..ec72cee --- /dev/null +++ b/error/E_01_u.html @@ -0,0 +1,55 @@ + + + + + + + + + + + + + +E_01_u + + + + + + + + + +
+ Nintendo DSi Shop +
+ + +
+ +
+ + + +
+ +
+ +
+ +
+ + +
+ + + + diff --git a/error/E_02_d.html b/error/E_02_d.html new file mode 100644 index 0000000..44b7439 --- /dev/null +++ b/error/E_02_d.html @@ -0,0 +1,234 @@ + + + + + + + + + + + + + +E_02_d + + + + + + + + + +
+
+ +
+ + + +
+ + + + +
+
+ + + +
+
+
+ + + + + + + + + + + + + +
+
+ + +
+
+ + + +
+
+ + + + +
+
+
+ + + + + +
+
+ + + + +
+
+
+ + + + + + + + + + + + + + diff --git a/error/E_02_index.html b/error/E_02_index.html new file mode 100644 index 0000000..3a07b77 --- /dev/null +++ b/error/E_02_index.html @@ -0,0 +1,6 @@ +--- +title: error +layout: dsiware +--- + + \ No newline at end of file diff --git a/error/E_02_u.html b/error/E_02_u.html new file mode 100644 index 0000000..60f465c --- /dev/null +++ b/error/E_02_u.html @@ -0,0 +1,55 @@ + + + + + + + + + + + + + +E_02_u + + + + + + + + + +
+ +
+ + +
+ +
+ + + +
+ +
+ +
+ +
+ + +
+ + + + diff --git a/error/E_03_d.html b/error/E_03_d.html new file mode 100644 index 0000000..8d0649e --- /dev/null +++ b/error/E_03_d.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + + +E_03_d + + + + + + + + + +
+
+ +
+ + + +
+ + + + +
+
+ + + +
+
+
+ + + + + + + diff --git a/error/E_03_index.html b/error/E_03_index.html new file mode 100644 index 0000000..f9287d2 --- /dev/null +++ b/error/E_03_index.html @@ -0,0 +1,6 @@ +--- +title: error +layout: dsiware +--- + + \ No newline at end of file diff --git a/error/E_03_u.html b/error/E_03_u.html new file mode 100644 index 0000000..2788456 --- /dev/null +++ b/error/E_03_u.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + +E_03_u + + + + + + + + + +
+ +
+ + +
+ +
+ +
+ +
+ + + + diff --git a/error/E_bg_d.gif b/error/E_bg_d.gif new file mode 100644 index 0000000..2066705 Binary files /dev/null and b/error/E_bg_d.gif differ diff --git a/error/E_bg_u.gif b/error/E_bg_u.gif new file mode 100644 index 0000000..e0ace55 Binary files /dev/null and b/error/E_bg_u.gif differ diff --git a/error/E_u_bar.gif b/error/E_u_bar.gif new file mode 100644 index 0000000..a9b4efe Binary files /dev/null and b/error/E_u_bar.gif differ diff --git a/error/Wi-Fi_on.gif b/error/Wi-Fi_on.gif new file mode 100644 index 0000000..e542e38 Binary files /dev/null and b/error/Wi-Fi_on.gif differ diff --git a/error/base.js b/error/base.js new file mode 100644 index 0000000..98e3f12 --- /dev/null +++ b/error/base.js @@ -0,0 +1,1215 @@ +//======================================== +// base.js +//======================================== + + +/* #### 20080602 #### Commented out functions for debug grid. */ +/* + +//---------------------------------------------------------------- +//-- for debug only -- grid +//-- (TWL: X button toggle / PC: "G" key toggle(only when DownWindow focused)) + + +var _u_grid = null; +var _d_grid = null; + +function appendGridUD() { + + _u_grid = upWindowObject.document.createElement("img"); + _u_grid.src = "../image/256x192.gif"; + _u_grid.style.visibility = "hidden"; + _u_grid.style.position = "fixed"; + _u_grid.style.zIndex = 30; + _u_grid.style.top = 0; + _u_grid.style.left = 0; + //_u_grid.style.opacity = 0.3; + upWindowObject.document.body.appendChild(_u_grid); + + _d_grid = downWindowObject.document.createElement("img"); + _d_grid.src = "../image/256x192.gif"; + _d_grid.style.visibility = "hidden"; + _d_grid.style.position = "fixed"; + _d_grid.style.zIndex = 30; + _d_grid.style.top = 0; + _d_grid.style.left = 0; + //_d_grid.style.opacity = 0.3; + downWindowObject.document.body.appendChild(_d_grid); + +} + + +function setGridVisibility() { + if (_u_grid.style.visibility == "hidden") { + _u_grid.style.visibility = "visible"; + _d_grid.style.visibility = "visible"; + } else { + _u_grid.style.visibility = "hidden"; + _d_grid.style.visibility = "hidden"; + } +} + +function dispGrid() { + + var code = event.keyCode; + //-- "event.keyCode" returns a code of capital letter if use "onkyedown". + if ( code == OP_KEY_PAD_X || code == "G".charCodeAt(0) ) { + + if (_u_grid == null) { + appendGridUD(); + } + setGridVisibility(); + + } + +} + +// #### 20080628 #### Changed for PC Opera 9.5 +//window.onkeydown = dispGrid; //-- "event.keyCode" returns a code of capital letter if use "onkyedown". +window.addEventListener('keydown', dispGrid, false); + + + +*/ + + + + +//---------------------------------------------------------------- +//-- for debug only -- histroy back + +function historyBack() { + //hideScrollButton(); + gkong.SetTransition(WIPE_ANIM_TRANS, WIPE_ANIM_TRANS); /* #### 20080702 #### NOTE: SetTransition* MUST BE CALLED. */ + setTimeout( function() { + upWindowObject.history.back(); + downWindowObject.history.back(); + } , WAIT_FOR_SETURL); +} + + + +//---------------------------------------------------------------- +//-- for debug only -- debug counter +/* +var gDebugCounter = 0; // #### 20080628 #### Renamed. +function incDebugCounter() { + gDebugCounter += 1; + if (gDebugCounter > (1000 * 60)) { gDebugCounter = 0;} + setTimeout("incDebugCounter()", 100); +} + +incDebugCounter(); +*/ + +//---------------------------------------------------------------- +//-- for debug only -- debug print + +function dPrint(t) { + // gkong.print("[[ dPrint ]] " + t + " ---- " + gDebugCounter) + gkong.print("[[ dPrint ]] " + t ); +} + + + + + +//---------------------------------------------------------------- +//---------------------------------------------------------------- +//---------------------------------------------------------------- + + + +//---------------------------------------- +//-- define : keyboard kinds & types of field (see Kong::KbdActive) + +var KBD_KIND_TEN = 0; +var KBD_KIND_QWERTY = 1; +var KBD_KIND_NO_JAPANESE = 2; +var KBD_KIND_JAPANESE = 3; + +var KBD_FIELD_NORMAL = 0; +var KBD_FIELD_4444 = 1; + + +//---------------------------------------- +//-- define : wipe animation types of transition (see Kong::SetTransition) + +var WIPE_ANIM_NONE = 0; +var WIPE_ANIM_TRANS = 1; +var WIPE_ANIM_TRANS_LEFT = 2; +var WIPE_ANIM_TRANS_RIGHT = 3; +var WIPE_ANIM_LEFT = 4; +var WIPE_ANIM_RIGHT = 5; + +/* #### 20080628 #### Added new types. */ +var WIPE_ANIM_DOWN = 6; +var WIPE_ANIM_UP = 7; +var WIPE_ANIM_OVER_LEFT = 8; +var WIPE_ANIM_OVER_RIGHT = 9; + + +//---------------------------------------- +//-- define : TWL key code + +var OP_KEY_PAD_A = 172; +var OP_KEY_PAD_B = 173; +var OP_KEY_PAD_X = 179; +var OP_KEY_PAD_Y = 180; +var OP_KEY_PAD_L = 181; +var OP_KEY_PAD_R = 182; +var OP_KEY_PAD_UP = 175; +var OP_KEY_PAD_DOWN = 176; +var OP_KEY_PAD_RIGHT = 177; +var OP_KEY_PAD_LEFT = 178; +var OP_KEY_PAD_START = 174; +var OP_KEY_PAD_SELECT = 170; + + + + +/* #### 20080702 #### Changed. */ +//---------------------------------------- +//-- define : options of setButtonImages() + +//var SBIMG_NO_LOADING_ICON = 0; +var SBIMG_NO_LOADINGICON_NO_PARTICLE = 0; +var SBIMG_NO_CURSOR = 1; + + + +/* #### 20080709 #### Added not to init button image. */ +//---------------------------------------- +//-- define : options of clearClickedStates() + +/* #### 20081004 #### NOTE: CCS_NOT_INIT_BUTTON_IMG is used not to init button image of DownWindow if only UpWindow is transited or manual transited. */ +var CCS_NOT_INIT_BUTTON_IMG = 0; + + +/* #### 20080927 #### Defined options of afterChangeDOMforManualTransition() not to play SE. */ +//---------------------------------------- +//-- define : options of afterChangeDOMforManualTransition() + +var ACD_NO_SE = 0; +var ACD_PLAY_SE = 1; + + + +//---------------------------------------------------------------- +//-- set urls and types of animation + +//-- wait maybe required... if no wait, button images will not change before the wipe animation. + +/* #### 20080628 #### Changed wait time from 0ms to 200ms */ +var WAIT_FOR_SETURL = 200; + +/* #### 20080715 #### Moved from "multi_page_DOM.js". */ +var WAIT_FOR_MANUALTRANSITION = 300; + +/* #### 20081004 #### Added the wait time for clearClickedStates(). */ +var WAIT_FOR_CCS = 300; + +/* #### 20081004 #### Added the wait time for waitRestart() & waitReturnToMenu(). */ +var WAIT_FOR_RESTART = 300; + + + +function setUrlUD() { + var a = setUrlUD.arguments; + if (a.length == 2) { + //hideScrollButton(); + + /* #### 20080702 #### NOTE: SetTransition* MUST BE CALLED. */ + /* #### 20080926 #### Changede default of WIPE_ANIM from WIPE_ANIM_NONE to WIPE_ANIM_TRANS. */ + gkong.SetTransition(WIPE_ANIM_TRANS, WIPE_ANIM_TRANS); + setTimeout( function() { + if (a[0] != "") window.open( a[0], 'UpWindow'); + if (a[1] != "") window.open( a[1], 'DownWindow'); + } , WAIT_FOR_SETURL); + } else if (a.length == 4) { + //hideScrollButton(); + + /* #### 20080702 #### NOTE: SetTransition* MUST BE CALLED. */ + gkong.SetTransition(a[1], a[3]); + setTimeout(function() { + if (a[0] != "") window.open( a[0], 'UpWindow'); + if (a[2] != "") window.open( a[2], 'DownWindow'); + } , WAIT_FOR_SETURL); + } else { + return false; + } +} + +function setUrlU() { + var a = setUrlU.arguments; + if (a.length == 1) { + //hideScrollButton(); + + /* #### 20080702 #### NOTE: SetTransition* MUST BE CALLED. */ + /* #### 20080926 #### Changede default of WIPE_ANIM from WIPE_ANIM_NONE to WIPE_ANIM_TRANS. */ + gkong.SetTransition(WIPE_ANIM_TRANS, WIPE_ANIM_TRANS); + setTimeout( function() { + if (a[0] != "") window.open( a[0], 'UpWindow'); + } , WAIT_FOR_SETURL); + } else if (a.length == 2) { + //hideScrollButton(); + + /* #### 20080702 #### NOTE: SetTransition* MUST BE CALLED. */ + /* #### 20080926 #### Changede default of WIPE_ANIM from WIPE_ANIM_NONE to WIPE_ANIM_TRANS. */ + gkong.SetTransition(a[1], WIPE_ANIM_TRANS); + setTimeout( function() { + if (a[0] != "") window.open( a[0], 'UpWindow'); + } , WAIT_FOR_SETURL); + } else { + return false; + } +} + +function setUrlD() { + var a = setUrlD.arguments; + if (a.length == 1) { + //hideScrollButton(); + + /* #### 20080702 #### NOTE: SetTransition* MUST BE CALLED. */ + /* #### 20080926 #### Changede default of WIPE_ANIM from WIPE_ANIM_NONE to WIPE_ANIM_TRANS. */ + gkong.SetTransition(WIPE_ANIM_TRANS, WIPE_ANIM_TRANS); + setTimeout( function() { + if (a[0] != "") window.open( a[0], 'DownWindow'); + } , WAIT_FOR_SETURL); + } else if (a.length == 2) { + //hideScrollButton(); + + /* #### 20080702 #### NOTE: SetTransition* MUST BE CALLED. */ + /* #### 20080926 #### Changede default of WIPE_ANIM from WIPE_ANIM_NONE to WIPE_ANIM_TRANS. */ + gkong.SetTransition(WIPE_ANIM_TRANS, a[1]); + setTimeout( function() { + if (a[0] != "") window.open( a[0], 'DownWindow'); + } , WAIT_FOR_SETURL); + } else { + return false; + } +} + + + + + + + +//---------------------------------------------------------------- +//-- cursor + +var CURSOR_SIZE = 8; // 8px x 8px + + + + +function clearCursor() { + +/* #### 20080702 #### Commented out. */ +/* + var hp = -2 * CURSOR_SIZE; + cursor_tl.style.top = hp; + cursor_tr.style.top = hp; + cursor_bl.style.top = hp; + cursor_br.style.top = hp; +*/ + +} + + +//--- setCurser (z-index version) + +/* + +function setCursor(obj) { + + var oP = obj.offsetParent; + var cS = getComputedStyle(obj,''); + + if(oP) { //-- obj's style may be "position : absolute" + var p = "absolute"; + var t = parseInt(oP.offsetTop) + parseInt(obj.offsetTop); + var l = parseInt(oP.offsetLeft) + parseInt(obj.offsetLeft); + var w = parseInt(cS.getPropertyValue('width')); + var h = parseInt(cS.getPropertyValue('height')); + var z = parseInt(obj.style.zIndex); + } else { //-- obj's style may be "position : fixed" + var p = "fixed"; + var t = parseInt(cS.getPropertyValue('top')); + var l = parseInt(cS.getPropertyValue('left')); + var w = parseInt(cS.getPropertyValue('width')); + var h = parseInt(cS.getPropertyValue('height')); + var z = parseInt(cS.getPropertyValue('z-index')); + } + + + if( h == 0 || isNaN(h) ){ + //-- obj dose not have height value (maybe 'a' tag) ---- + h = parseInt( cS.getPropertyValue('font-size') ); + if (h == 16) { h = 21; } // font cell size 17x21 + else if (h == 12) { h = 16; } // font cell size 13x16 + else if (h == 10) { h = 13; } // font cell size 11x12 (+1) + } + + + if(isNaN(z)){ z = 1; } else { z += 1; } + + + cursor_tl.style.position = p; + cursor_tl.style.zIndex = z; + cursor_tl.style.top = t; + cursor_tl.style.left = l; + + cursor_tr.style.position = p; + cursor_tr.style.zIndex = z; + cursor_tr.style.top = t; + cursor_tr.style.left = l + w - CURSOR_SIZE; + + cursor_bl.style.position = p; + cursor_bl.style.zIndex = z; + cursor_bl.style.top = t + h - CURSOR_SIZE; + cursor_bl.style.left = l; + + cursor_br.style.position = p; + cursor_br.style.zIndex = z; + cursor_br.style.top = t + h - CURSOR_SIZE; + cursor_br.style.left = l + w - CURSOR_SIZE; + + +} + +*/ + + +function setCursor(obj) { + +/* #### 20080702 #### Commented out. */ +/* + + var oP = obj.offsetParent; + var cS = getComputedStyle(obj,''); + + var t = parseInt(oP.offsetTop) + parseInt(obj.offsetTop); + var l = parseInt(oP.offsetLeft) + parseInt(obj.offsetLeft); + var w = parseInt(cS.getPropertyValue('width')); + var h = parseInt(cS.getPropertyValue('height')); + + if( h == 0 || isNaN(h) ){ + //-- obj dose not have height value (maybe 'a' tag) ---- + h = parseInt( cS.getPropertyValue('font-size') ); + if (h == 16) { h = 21; } // 16pt font cell size = 17x21 + else if (h == 12) { h = 16; } // 12pt font cell size = 13x16 + else if (h == 10) { h = 13; } // 10pt font cell size = 11x12 (+1) + } + + cursor_tl.style.top = t; + cursor_tl.style.left = l; + + cursor_tr.style.top = t; + cursor_tr.style.left = l + w - CURSOR_SIZE; + + cursor_bl.style.top = t + h - CURSOR_SIZE; + cursor_bl.style.left = l; + + cursor_br.style.top = t + h - CURSOR_SIZE; + cursor_br.style.left = l + w - CURSOR_SIZE; +*/ + +} + + + + +//---------------------------------------------------------------- +//-- side blue lines + +/* #### 20080628 #### Deleted. */ +//function extendSideBlueLine() {} + + +//---------------------------------------------------------------- +//-- scroll buttons + + +function hideScrollButton() { + gkong.HideUpWindowScrollButton(); + //gkong.HideDownWindowScrollButton(); +} + + +function showScrollButton() { + /* #### 20080711 #### Deleted arguments of ShowUpWindowScrollButton(). */ + gkong.ShowUpWindowScrollButton(); + //gkong.ShowUpWindowScrollButton( 204, 1, 229, 1 ); + + //gkong.ShowDownWindowScrollButton( 225,110, 225,138 ); +} + + + +function hideScrollButton_debugIndex() { + //gkong.HideUpWindowScrollButton(); + gkong.HideDownWindowScrollButton(); +} + +function showScrollButton_debugIndex() { + /* #### 20080711 #### Deleted arguments of ShowUpWindowScrollButton(). */ + //gkong.ShowUpWindowScrollButton(); + + gkong.ShowDownWindowScrollButton( 210,130, 210,158 ); +} + + + + + + +//---------------------------------------------------------------- +//---------------------------------------------------------------- +//---------------------------------------------------------------- + + + + + + + +/* + +//---------------------------------------------------------------- +//-- functions for the reaction of button images + + +== note ==== + + 1. a clickable image element in HTML files must have a child or more. + (the last child will be treated as the spacer that defined hit-area) + + 2. and requires descriptions of image src in CSS files. + + 3. and requires additional JavaScript descriptions that set reactions and urls. + + 4. and an image file must contain 2 patterns. + + + + +== ex ==== + + + + ---- .html -------- + // #### 20080807 #### Changed to reduce size of css file. + + +
+ + +
+ ???????? +
+ + +
+ +
+ + + + + + + + + ---- .css -------- + // #### 20080807 #### Changed to reduce size of css file. + + #XXXX_[width]x[height] { + width : [width]px; + height : [height]px; + background-image: url(ClickableImage.gif); + } + + + + #NNNN { position : absolute; left : 52px; top : 60px; } + + + + ---- ClickableImage.gif -------- + + +--------[width]px-------+ + | | + | normal pattern [height]px + | | + +------------------------+ + | | + | selected pattern [height]px + | | + +------------------------+ + + +*/ + + +/* + +//---------------------------------------------------------------- +//-- functions for the reaction of button images + +== note ==== + + Following functions MUST BE CALLED when click & transit. + + - Kong::PlaySE ( Not necessary if use setButtonImage(). ) + - Kong::ShowLoadingIcon ( Not necessary if use setButtonImage(). ) + - Kong::ShowClickEffect ( Not necessary if use setButtonImage(). ) + - Kong::SetTransition ( Not necessary if use setOnclickUrlUD() or if call setUrl*() at once. ) + + + + Following functions MUST BE CALLED when click & input. + + - Kong::PlaySE ( Not necessary if use setButtonImage() and set SBIMG_NO_LOADINGICON_NO_PARTICLE for argument. ) + + + + Following functions MUST BE CALLED when onchange of input tag. + + - Kong::ShowLoadingIcon ( Not necessary if call setUrl*(). ) + + + + Following functions MUST BE CALLED when click & manual transit. + + -- Before Change by DOM. + + - Kong::PlaySE ( Not necessary if use setButtonImage(). ) + - Kong::ShowLoadingIcon ( Not necessary if use setButtonImage(). ) + - Kong::ShowClickEffect ( Not necessary if use setButtonImage(). ) + - Kong::SetTransitionRangeOnce ( Not necessary if call beforeChangeDOMforManualTransition() or if not use wipe animation with range specification. ) + - Kong::SetManualTransition ( Not necessary if call beforeChangeDOMforManualTransition(). ) + + -- After Change by DOM. + + - waitAllImagesComplete ( Not necessary if call afterChangeDOMforManualTransition(). ) # This funciton is Now Testing. + - gkong.StartManualTransition ( Not necessary if call afterChangeDOMforManualTransition(). ) + - gkong.HideLoadingIcon ( Not necessary if call afterChangeDOMforManualTransition(). ) + - gkong.PlaySE ( Not necessary if call afterChangeDOMforManualTransition(). ) + + + + +*/ + + +//---------------------------------------------------------------- +//-- functions for the reaction of button images + + +var BUTTON_NORMAL = 0; +var BUTTON_SELECTED = 1; + +/* #### 20080827 #### Changed arguments of bgPos() and not to use getPropertyValue(). */ +function bgPos(h, n) { dPrint("$$$$$$$$$$ Called bgPos : " + n); return "0px " + h * (-1) * n + "px"; } + + +/* #### 20080628 #### Renamed. */ +var gObjOnmousedown = null; //-- the object that the "onMouseDown" event occured. +function setObjOnmousedown(id) { gObjOnmousedown = id; } +function clearObjOnmousedown() { gObjOnmousedown = null; /* clearCursor(); */ } +function checkObjOnmousedown(id) { if(gObjOnmousedown == id) { return true;} else {return false;} } + + + +/* #### 20080628 #### Changed for PC Opera 9.5 */ +//window.onunload = clearStates; +window.addEventListener('mouseup', function(){ clearObjOnmousedown(); }, false); + + + + + +function getLastChild( o ) { return o.children[o.children.length-1] } + + + + +/* #### 20080602 #### Added functions to prevent clicking twice. */ +/* #### 20080628 #### Renamed. */ +/* +var setButtonImagesState = 0; +function getSetButtonImagesState() { return setButtonImagesState; } +function setSetButtonImagesState() { setButtonImagesState = 1; } +function clearSetButtonImagesState() { setButtonImagesState = 0; } + +var setButtonImagesObject = null; +function getSetButtonImagesObject() { return setButtonImagesObject; } +function setSetButtonImagesObject(o) { setButtonImagesObject = o; } +function clearSetButtonImagesObject() { setButtonImagesObject = null; } +*/ + +var gClickedObjectId = null; +function getClickedObjectId() { return gClickedObjectId; } +function setClickedObjectId(n) { gClickedObjectId = n; dPrint("[[[[[[[[ setClickedObjectId : " + n); } +function clearClickedObjectId() { gClickedObjectId = null; dPrint("[[[[[[[[ clearClickedObjectId : null"); } + + + +/* #### 20080714 #### Added to init button image. */ + +var gMouseEvent = document.createEvent('MouseEvents'); +gMouseEvent.initEvent('mouseout', true, true); + +var gObjectIdToInitImage = null; + +function getObjectIdToInitButtonImage() { return gObjectIdToInitImage; } +function setObjectIdToInitButtonImage( n ) { gObjectIdToInitImage = n; } +function clearObjectIdToInitButtonImage() { gObjectIdToInitImage = null; } + +function initObjectIdToInitButtonImage( n ) { + + if ( gObjectIdToInitImage != null && gObjectIdToInitImage != n ) { + var o = $(gObjectIdToInitImage); + if (o) { + // dPrint("@@@@@@@@@@@@@@@@@ : before dispatch mouseout : " + gObjectIdToInitImage + " :: gcoi:" + getClickedObjectId()); + getLastChild(o).dispatchEvent(gMouseEvent); + // dPrint("@@@@@@@@@@@@@@@@@ : after dispatch mouseout : " + gObjectIdToInitImage + " :: gcoi:" + getClickedObjectId()); + } + } + + if ( n ) { + setObjectIdToInitButtonImage(n); + } else { + clearObjectIdToInitButtonImage(); + } + +} + + + +/* #### 20080714 #### Added to init button image. */ +window.addEventListener('blur', function(){ initObjectIdToInitButtonImage(); }, false); + + + + + + + +var gSBI_dPrint = true; /* #### 20080714 #### for debug. */ + +/* #### 20080702 #### Commented out clearCusor(). */ +/* #### 20080702 #### Changed 2nd argument. */ +//function setButtonImages( o, cursor ) { +function setButtonImages( o, opt ) { + + var id = o.getAttribute("id"); + var spacer = getLastChild(o); + + /* #### 20080827 #### Changed not to use getComputedStyle(). */ + // var h = o.offsetHeight; /* #### 20080927 #### Commented out and changed the first argument of bgPos() from "h" to "o.offsetHeight". */ + + var oStyle = o.style; + var a = setButtonImages.arguments; + + var bg = BUTTON_NORMAL; + + + spacer.addEventListener('click', function( e ) { + if (gSBI_dPrint) dPrint(id+ ' click'); /* #### 20080714 #### for debug. */ + /* #### 20080628 #### Renamed functions to prevent clicking twice. */ + if (getClickedObjectId() == null) { // + if (gSBI_dPrint) dPrint(id+ ' click ---- execute'); /* #### 20080714 #### for debug. */ + + setClickedObjectId(id); + /* #### 20080714 #### Added to init button image. */ + initObjectIdToInitButtonImage(id); + /* #### 200806028 #### SE No. to macro name. */ + gkong.PlaySE(TWL_SHOP_SE_ONCLICK); + /* #### 20080702 #### Changed 2nd argument. */ + + if (a.length == 2 ) { + + /* #### 20080715 #### Changed macro name. */ + if (opt == SBIMG_NO_LOADINGICON_NO_PARTICLE ) { + + /* #### 20080702 #### Added for input tag. */ + /* #### 20080827 #### Changed arguments of bgPos(). */ + /* #### 20080927 #### Changed the first argument of bgPos() from "h" to "o.offsetHeight". */ + + if (bg != BUTTON_NORMAL) { oStyle.backgroundPosition = bgPos(o.offsetHeight, BUTTON_NORMAL); bg = BUTTON_NORMAL; } + clearClickedObjectId(); // #### 20080714 #### Currected */ + + } else if (opt == SBIMG_NO_CURSOR ){ + + /* #### 20080715 #### Added to display particle on click. */ + + /* #### 20080909 #### Now Testing to change pages by TWL Key Pad, but not fixed. */ + /* #### 20080920 #### Commented out. */ + //if ( gKeyNoParticle ) { + // gKeyNoParticle = false; + //} else { + // gkong.ShowClickEffect(e.pageX, e.pageY); + //} + + gkong.ShowClickEffect(e.pageX, e.pageY); + + /* #### 20080702 #### Added to force to show loading icon. */ + gkong.ShowLoadingIcon(); + //clearCursor(o); + + } + + } else { + /* #### 20080715 #### Added to display particle on click. */ + + /* #### 20080909 #### Now Testing to change pages by TWL Key Pad, but not fixed. */ + /* #### 20081005 #### Commented out for bug fix. */ + //if ( gKeyNoParticle ) { + // gKeyNoParticle = false; + //} else { + // gkong.ShowClickEffect(e.pageX, e.pageY); + //} + + /* #### 20081005 #### Commented out for bug fix. */ + gkong.ShowClickEffect(e.pageX, e.pageY); + + /* #### 20080702 #### Added to force to show loading icon. */ + gkong.ShowLoadingIcon(); + //setCursor(o); + } + } + + }, false); + + + spacer.addEventListener('mousedown', function() { + if (gSBI_dPrint) dPrint(id + ' mousedown'); /* #### 20080714 #### for debug. */ + /* #### 20080628 #### Renamed functions to prevent clicking twice. */ + + if (getClickedObjectId() == null) { + if (gSBI_dPrint) dPrint(id + ' mousedown ---- exceute'); /* #### 20080714 #### for debug. */ + /* #### 200806028 #### SE No. to macro name. */ + gkong.PlaySE(TWL_SHOP_SE_ONMOUSEDOWN); + /* #### 20080827 #### Changed arguments of bgPos(). */ + /* #### 20080927 #### Changed the first argument of bgPos() from "h" to "o.offsetHeight". */ + if (bg != BUTTON_SELECTED) { oStyle.backgroundPosition = bgPos(o.offsetHeight, BUTTON_SELECTED); bg = BUTTON_SELECTED; } + initObjectIdToInitButtonImage(id); + setObjOnmousedown(id); + } + + }, false); + + spacer.addEventListener('mouseover', function() { + if (gSBI_dPrint) dPrint(id + ' mouseover'); /* #### 20080714 #### for debug. */ + /* #### 20080628 #### Renamed functions to prevent clicking twice. */ + + if (getClickedObjectId() == null) { + if (gSBI_dPrint) dPrint(id + ' mouseover ---- exceute'); /* #### 20080714 #### for debug. */ + if (checkObjOnmousedown(id)) { + /* #### 200806028 #### SE No. to macro name. */ + gkong.PlaySE(TWL_SHOP_SE_ONMOUSEDOWN); + /* #### 20080827 #### Changed arguments of bgPos(). */ + /* #### 20080927 #### Changed the first argument of bgPos() from "h" to "o.offsetHeight". */ + if (bg != BUTTON_SELECTED) { oStyle.backgroundPosition = bgPos(o.offsetHeight, BUTTON_SELECTED); bg = BUTTON_SELECTED; } + initObjectIdToInitButtonImage(id); + } + } + + }, false); + + spacer.addEventListener('mouseout', function() { + if (gSBI_dPrint) dPrint(id + ' mouseout'); /* #### 20080714 #### for debug. */ + /* #### 20080628 #### Renamed functions to prevent clicking twice. */ + + if (getClickedObjectId() == null) { + if (gSBI_dPrint) dPrint(id + ' mouseout ---- exceute'); /* #### 20080714 #### for debug. */ + //clearCursor(); /* #### 20080602 #### Commented out clearCusor(). */ + /* #### 20080827 #### Changed arguments of bgPos(). */ + /* #### 20080927 #### Changed the first argument of bgPos() from "h" to "o.offsetHeight". */ + if (bg != BUTTON_NORMAL) { oStyle.backgroundPosition = bgPos(o.offsetHeight, BUTTON_NORMAL); bg = BUTTON_NORMAL; } + } + + }, false); + + + /* #### 20080717 #### Deleted functions onFocus & onBlur. (Necessary if use spatial navigation.) */ + // spacer.addEventListener('focus', function() { if (gSBI_dPrint) dPrint(id + ' focus'); }, false); + // spacer.addEventListener('blur', function() { if (gSBI_dPrint) dPrint(id + ' blur' ); }, false); + + +} + + + +//---------------------------------------------------------------- +//-- add event listener to a clickable object (set urls and types of animation) + + +/* #### 20081005 #### Added setOnclick() from BroadOn's base.js and replaced from ".onclick=" to "setOnclick" in html files. */ +function setOnclick(o, action, setTransition) { + var spacer = getLastChild(o); + spacer.onclick = function() { + + /* #### 20081006 #### CHANGED for TEST. The function to prevent clicking twice will not be called when the 3rd arg is "true". */ + // if (setTransition == false) { + if (setTransition == "FORCE_TO_EVAL_ACTION") { + + eval(action); + + } else if (getClickedTransition() == null) { + setClickedTransition(); + eval(action); + // gkong.HideLoadingIcon(); /* #### 20080717 #### Deleted HideLoadingIcon. (Wabe) */ + dPrint("---- exe ----"); + } else { + /* #### 20081005 #### Commented out. */ + // trace("not set action in setOnclick(). gClickedTransition is "+getClickedTransition()); + dPrint("---- not ---- not set action in setOnclick(). gClickedTransition is "+getClickedTransition()); + } + }; +} + + + +/* #### 20080602 #### Added functions to prevent clicking twice. */ +/* #### 20080628 #### Renamed. */ + +/* +var setOnclickUrlState = 0; +function getSetOnclickUrlState() { return setOnclickUrlState; } +function setSetOnclickUrlState() { setOnclickUrlState = 1; } +function clearSetOnclickUrlState() { setOnclickUrlState = 0; } +*/ + +var gClickedTransition = null; +function getClickedTransition() { return gClickedTransition; } +function setClickedTransition() { gClickedTransition = true; } +function clearClickedTransition() { gClickedTransition = null; } + + + +/* #### 20080712 #### Deleted functions to prevent clicking twice. */ +/* #### 20080712 #### Deleted "var spacer". */ +function setOnclickUrlUD( o, urlU, animU, urlD, animD ) { + getLastChild(o).addEventListener('click', function() { setUrlUD(urlU, animU, urlD, animD); }, false); +} + +/* #### 20080712 #### Deleted functions to prevent clicking twice. */ +/* #### 20080712 #### Deleted "var spacer". */ +function setOnclickUrlU( o, urlU, animU ) { + getLastChild(o).addEventListener('click', function() { setUrlU(urlU, animU); }, false); +} + +/* #### 20080712 #### Deleted functions to prevent clicking twice. */ +/* #### 20080712 #### Deleted "var spacer". */ +function setOnclickUrlD( o, urlD, animD ) { + getLastChild(o).addEventListener('click', function() { setUrlD(urlD, animD); }, false); +} + + +/* #### 20080712 #### Deleted "var spacer". */ +function setOnclickHideProgressBar( o ) { + getLastChild(o).addEventListener('click', function() { gkong.HideProgressBar(); }, false); +} + + + +/* #### 20080602 #### functions to prevent clicking twice. */ +/* #### 20080628 #### Renamed. */ +function clearClickedStates() { + + var a = clearClickedStates.arguments; + + /* #### 20080709 #### Added not to init button image. */ + /* #### 20080712 #### Corrected. */ + + if ( a.length == 1 ) { + if ( a[0] == CCS_NOT_INIT_BUTTON_IMG ) { + + /* #### 20081004 #### NOTE: CCS_NOT_INIT_BUTTON_IMG is used not to init button image of DownWindow if only UpWindow is transited or manual transited. */ + + /* #### 20081005 #### Added setTimeout() for wait. */ + + /* #### 20081008 #### Changed to wait only with CCS_NOT_INIT_BUTTON_IMG. */ + + setTimeout( function() { + //-- not init button image. + clearClickedObjectId(); + clearClickedTransition(); + }, WAIT_FOR_CCS ); + + } else { + clearClickedObjectId(); + clearClickedTransition(); + initObjectIdToInitButtonImage(); + } + + } else { + clearClickedObjectId(); + clearClickedTransition(); + initObjectIdToInitButtonImage(); + } + + +} + + + + + + +/* #### 20080628 #### Added sleep function. */ +function sleep(msec) { + var d1 = new Date().getTime(); + var d2 = new Date().getTime(); + while( d2 < d1 + msec ){ + d2 = new Date().getTime(); + } +} + + + +/* #### 20080628 #### Renamed functions to prevent clicking twice. */ +// #### 20080628 #### Changed for PC Opera 9.5 +//window.onunload = clearClickedStates; +window.addEventListener('unload', clearClickedStates, false); + + + + +/* #### 20080628 #### Added functions to call from HTML files onload. */ + +function onload_scroll() { + showScrollButton(); + gkong.PlaySE(TWL_SHOP_SE_TRANSIT); +} + +function onload_no_scroll() { + hideScrollButton(); + gkong.PlaySE(TWL_SHOP_SE_TRANSIT); +} + +/* #### 20080814 #### Added to show loading icon in the Waiting Page(F-01 & P-13). */ +function onload_please_wait() { + hideScrollButton(); + /* #### 20080814 #### Added setTimeout() to force to show loading icon. */ + setTimeout( function() { gkong.ShowLoadingIcon(); }, 500); + /* #### 20080921 #### Added to force to show loading icon.. */ + setTimeout( function() { gkong.ShowLoadingIcon(); }, 1000); + /* #### 20080921 #### Added to force to show loading icon.. */ + setTimeout( function() { gkong.ShowLoadingIcon(); }, 1500); + /* #### 20080921 #### Added to force to show loading icon.. */ + setTimeout( function() { gkong.ShowLoadingIcon(); }, 2000); +} + +function onload_upWindow() { + /* #### 20080709 #### Added not to init button image. */ + /* #### 20081004 #### NOTE: CCS_NOT_INIT_BUTTON_IMG is used not to init button images if only UpWindow is transited or manual transited. */ + clearClickedStates(CCS_NOT_INIT_BUTTON_IMG); + + gkong.PlaySE(TWL_SHOP_SE_TRANSIT); +} + +/* #### 20080727 #### Added. */ +function onload_error_page() { + gkong.HideProgressBar(); + gkong.HideLoadingIcon(); + showScrollButton(); + gkong.PlaySE(TWL_SHOP_SE_WARNING); +} + + + + + + + + +/* #### 20080702 #### Added for debug. */ +function dPrintEventInfo() { + var a = dPrintEventInfo.arguments; + var o = a[0]; + var n = ""; + if (a[1]) { n = a[1] + " " } + o.addEventListener('click', function(){ dPrint(n + 'click' ); }, false); + o.addEventListener('focus', function(){ dPrint(n + 'focus' ); }, false); + o.addEventListener('blur', function(){ dPrint(n + 'blur' ); }, false); + o.addEventListener('mouseup', function(){ dPrint(n + 'mouseup' ); }, false); + o.addEventListener('mousedown', function(){ dPrint(n + 'mousedown'); }, false); + o.addEventListener('mouseover', function(){ dPrint(n + 'mouseover'); }, false); + o.addEventListener('mouseout', function(){ dPrint(n + 'mouseout' ); }, false); +} + + + + + + + + + + +/* #### 20080712 #### Moved from "multi_page_DOM.js". */ +function waitImageComplete( o ) { + + /* #### 20080717 #### TEST for NO WAIT. */ + return; + + while( o.complete != true ) { + sleep(100); + } +} + +/* #### 20080712 #### Moved from "multi_page_DOM.js". */ +/* #### 20080712 #### Changed to wait for all images of both windows. */ +function waitAllImagesComplete() { + + /* #### 20080717 #### TEST for NO WAIT. */ + return; + + var imgs = new Array(); + imgs = upWindowObject.document.getElementsByTagName('img'); + for (i=0; i < imgs.length; i++) { waitImageComplete( imgs[i] ); } + imgs = downWindowObject.document.getElementsByTagName('img'); + for (i=0; i < imgs.length; i++) { waitImageComplete( imgs[i] ); } +} + + + +/* #### 20080712 #### Added for ManualTransition simply.*/ +function beforeChangeDOMforManualTransition() { + + /* #### 20081005 #### For NCL: If the return value of getClickedTransition is true, SetManualTransition will not be called in this function. */ + /* #### 20081005 #### For NCL: BroadOn's setOnclick() will call setClickedTransition() on the click event. */ + /* #### 20081005 #### For NCL: But if the 3rd arg of setOnclick() is "false", will not call setClickedTransition(), so SetManualTransition will be called. */ + /* #### 20081005 #### For NCL: In the page of DOM change with beforeChage... and afterChange... or with multi_page_DOM.js, set functions to the onclick by setOnclick() with the 3rd arg "false". */ + + + /* #### 20081006 #### Commented out the following "if" statement and setClickedTransition(). */ + /* #### 20081006 #### Changed for TEST. The function to prevent clicking twice will added to the click event in the setOnclick(). Not cared here. */ + // if (getClickedTransition() == true ) return; + // setClickedTransition(); + + /* #### 20080715 #### Added. */ + sleep(WAIT_FOR_MANUALTRANSITION); + + var a = beforeChangeDOMforManualTransition.arguments; + if (a.length == 0) { + gkong.SetManualTransition(WIPE_ANIM_TRANS, WIPE_ANIM_TRANS); + } else if (a.length == 2) { + gkong.SetManualTransition(a[0], a[1]); + } else if (a.length == 6) { + gkong.SetTransitionRangeOnce(a[2], a[3], a[4], a[5]); + gkong.SetManualTransition(a[0], a[1]); + } + + +} + +/* #### 20080712 #### Added for ManualTransition simply.*/ +/* #### 20080927 #### Changed arguments of afterChangeDOMforManualTransition() to select to play SE or not. */ +/* #### 20081004 #### Changed the order of arguments for bug fix. */ +/* #### 20081004 #### NOTE: 1st argument of afterChangeDOMforManualTransition(): null or CCS_NOT_INIT_BUTTON_IMG not to init button image. */ +/* #### 20081004 #### NOTE: 2nd argument of afterChangeDOMforManualTransition(): null or ACD_NO_SE not to play SE. */ +function afterChangeDOMforManualTransition() { + + var a = afterChangeDOMforManualTransition.arguments; + + waitAllImagesComplete(); + gkong.StartManualTransition(); + gkong.HideLoadingIcon(); + + if (a.length == 0) { + gkong.PlaySE(TWL_SHOP_SE_TRANSIT); + clearClickedStates(); + } else if (a.length == 1) { + /* #### 20081004 #### Changed the order of arguments for bug fix. */ + gkong.PlaySE(TWL_SHOP_SE_TRANSIT); + clearClickedStates( a[0] ); + } else if (a.length == 2) { + /* #### 20081004 #### Changed the order of arguments for bug fix. Please see arguments of this function in B_10_d.html also. */ + if ( a[1] != ACD_NO_SE ) { gkong.PlaySE(TWL_SHOP_SE_TRANSIT); } + clearClickedStates( a[0] ); + } + +} + + +/* #### 20080718 #### Added.*/ +function addClickEffectAndSE( o ) { + o.addEventListener('click', function(e) { + gkong.PlaySE(TWL_SHOP_SE_ONCLICK); + gkong.ShowClickEffect(e.pageX, e.pageY); + }, false); +} + + + + +/* #### 20080930 #### Added to display "Points not available" message in the 1st Period and the 2nd Period.*/ +/* #### 20080930 #### TODO: I think it is not appropriate to describe this processing in javascript file. */ +/* #### 20080930 #### TODO: Please comment out the block of "Add Points" button in ConstElements_d.jspf in the 1st Period and the 2nd Period. */ +window.addEventListener('DOMContentLoaded', function(){ if ( $('points') ) { $('points').style.display = "none"; }}, false ) + + + + +/* #### 20080909 #### Now Testing to change pages by TWL Key Pad, but not fixed. */ + +var gKeyNoParticle = false; + + +/* #### 20080920 #### Commented out. */ +/* +var gME = document.createEvent('MouseEvents'); + +function changePagesByKey() { + var code = event.keyCode; + if ( code == OP_KEY_PAD_LEFT || code == 37 ) { + var b = $('prev_button'); + if (b) { + gKeyNoParticle = true; + gME.initEvent('mousedown', true, true); + getLastChild(b).dispatchEvent(gME); + setTimeout(function(){ + gME.initEvent('click', true, true); + getLastChild(b).dispatchEvent(gME); + }, WAIT_FOR_SETURL); + } + + } else if ( code == OP_KEY_PAD_RIGHT || code == 39 ) { + var b = $('next_button'); + if (b) { + gKeyNoParticle = true; + gME.initEvent('mousedown', true, true); + getLastChild(b).dispatchEvent(gME); + setTimeout(function(){ + gME.initEvent('click', true, true); + getLastChild(b).dispatchEvent(gME); + }, WAIT_FOR_SETURL); + } + } +} +*/ + +/* #### 20080909 #### Now Testing to change pages by TWL Key Pad, but not fixed. */ +/* #### 20080920 #### Commented out. */ +// window.addEventListener('keydown', changePagesByKey, false); + + + +/* #### 20081004 #### Added wait for Kong::Restart() & Kong::ReturnToMenu(). */ +function waitRestart() { setTimeout( function() { gkong.Restart(); }, WAIT_FOR_RESTART ); } +function waitReturnToMenu() { setTimeout( function() { gkong.ReturnToMenu(); }, WAIT_FOR_RESTART ); } diff --git a/error/button_224x28_all.gif b/error/button_224x28_all.gif new file mode 100644 index 0000000..0021a3f Binary files /dev/null and b/error/button_224x28_all.gif differ diff --git a/error/button_224x32_all.gif b/error/button_224x32_all.gif new file mode 100644 index 0000000..f5303ff Binary files /dev/null and b/error/button_224x32_all.gif differ diff --git a/error/error.css b/error/error.css new file mode 100644 index 0000000..f728564 --- /dev/null +++ b/error/error.css @@ -0,0 +1,321 @@ +/* ---- common style ------------------------------- */ + +body { + margin : 0 0 0 0; + padding : 0; +/* overflow : auto; */ + overflow : hidden; + width : 256px; +} + +div { + margin : 0; + padding : 0; + position : relative; /* #### 20080802 #### Added for long page. */ + overflow : hidden; /* #### 20080802 #### Added for long page. */ +} + + +img { + margin : 0; + padding : 0; +} + + + + +/* #### 20080628 #### Changed from #666666 to #555555. */ +.tx10 {font-size : 10px; color : #555555;} +.tx12 {font-size : 12px; color : #555555;} +.tx16 {font-size : 16px; color : #555555;} + +.tx10blue {font-size : 10px; color : #34beed;} +.tx12blue {font-size : 12px; color : #34beed;} +.tx16blue {font-size : 16px; color : #34beed;} + +.tx10red {font-size : 10px; color : red;} +.tx12red {font-size : 12px; color : red;} +.tx16red {font-size : 16px; color : red;} + +.tx10white {font-size : 10px; color : white;} +.tx12white {font-size : 12px; color : white;} +.tx16white {font-size : 16px; color : white;} + +.tx10brown {font-size : 10px; color : brown;} +.tx12brown {font-size : 12px; color : brown;} +.tx16brown {font-size : 16px; color : brown;} + +/* #### 20080802 #### Changed from #000000 to #333333. */ +.tx10title {font-size : 10px; color : #333333;} +.tx12title {font-size : 12px; color : #333333;} +.tx16title {font-size : 16px; color : #333333;} + +/* #### 20080802 #### Added. */ +/* #### 20080821 #### Changed color of important texts. */ +/* #### 20080917 #### Changed color of important texts. */ +.tx10important {font-size : 10px; color : #FF2244;} +.tx12important {font-size : 12px; color : #FF2244;} +.tx16important {font-size : 16px; color : #FF2244;} + +.tx10grayout {font-size : 10px; color : #888888;} +.tx12grayout {font-size : 12px; color : #888888;} +.tx16grayout {font-size : 16px; color : #888888;} + +.atx10 {font-size : 10px;} +.atx12 {font-size : 12px;} +.atx16 {font-size : 16px;} + +.atx10red {font-size : 10px; color : red;} +.atx12red {font-size : 12px; color : red;} +.atx16red {font-size : 16px; color : red;} + + + + + +/* #### 20080814 #### Added for error page. */ +.tx10error {font-size : 10px; color : red;} +.tx12error {font-size : 12px; color : red;} +.tx16error {font-size : 16px; color : red;} + + + + +/* ---- page top style ------------------------------- */ + +/* #### 20080802 #### Delete padding, position and top. */ +/* #### 20080802 #### Change margin. */ +.standardPage { + width : 248px; + margin : 26 4 22 4; +} + + + + +/* #### 20080802 #### Added. */ +/* ---- for fine-tuning. ------------------------------- */ +br { + line-height : 8px; +} + +.__br4 { + line-height : 4px; +} + +.__dots { + margin : -3 0 6 0; + clear : both; + text-align : center; +} + + +.__right { text-align : right; } +.__left { text-align : left; } +.__center { text-align : center; } + + + + +/* #### 20080814 #### Added for error page. */ +#errorTitle { + position : fixed; + left : 0px; + top : 0px; + width : 256px; + height : 22px; + background-image : url(./E_u_bar.gif); + background-repeat : repeat-x; + background-position : 0px 0px; + overflow : hidden; + display : table-cell; + vertical-align : middle; + text-align : left; + z-index : 5; + padding : 0 4 0 4; +} + +/* #### 20080814 #### Added for error page. */ +#error_down_bg_u { + position : absolute; + left : 0px; + top : 30px; + width : 256px; + height : 9px; + background-image : url(./E_bg_u.gif); + background-repeat : repeat-x; + overflow : hidden; +} + +/* #### 20080814 #### Added for error page. */ +#error_down_title { + position : absolute; + left : 0px; + top : 40px; + width : 256px; + height : 64px; +} + + +/* #### 20080814 #### Added for error page. */ +#error_down_bg_d { + position : absolute; + left : 0px; + top : 105px; + width : 256px; + height : 9px; + background-image : url(./E_bg_d.gif); + background-repeat : repeat-x; + overflow : hidden; +} + + +/* #### 20080814 #### Added for error page. */ +/* .............. */ +.error_down_title_inner { + position : relative; + padding : 2 3 3 3; + width : inherit; + height : inherit; + display : table-cell; + vertical-align : middle; + text-align : center; +} + + +#message_restart { + position : absolute; + left : 0px; + top : 28px; + width : 256px; + height: 124px; +} + +#message_return { + position : absolute; + left : 0px; + top : 28px; + width : 256px; + height: 124px; +} + +._inner { + position : relative; + left : 0px; + top : 0px; + width : inherit; + height : inherit; + padding : 0 4 0 4; + display : table-cell; + vertical-align : middle; + text-align : center; +} + + + + +/* #### 20080814 #### Added for error page. */ +/* ---- button : 224x32 ------------------------------- */ +#button_error_center { position : absolute; left : 16px; top : 118px; } + +/* #### 20080913 #### Added for error page. */ +/* #### 20080913 #### Corrected type miss from "button_errot_right" to "button_error_right". */ +/* #### 20080922 #### Changed top of "button_error_*" from 152px to 164px. */ +/* #### 20080922 #### Changed "button_error_*"'s size from 128x40 to 128x28, returned it to the previous size. */ +/* ---- button : 128x28 ------------------------------- */ +#button_error_left { position : absolute; left : 0px; top : 164px; } +#button_error_right { position : absolute; left : 128px; top : 164px; } + + +/* #### 20080913 #### Changed size and position of buttons for bug fix. */ +/* #### 20080913 #### Changed id name from "button_HAS_center" to "button_low_center". */ +/* #### 20080913 #### Moved "button_low_center" from page/B_13_d.css. */ +/* ---- button : 224x28 ------------------------------- */ +#button_low_center { position : absolute; left : 16px; top : 162px; } + + + + +/* #### 20080702 #### Changed size and position of buttons. */ +/* #### 20080702 #### Corrected the comment of button size from "128x26" to "128x28". */ +/* ---- button : 128x28 ------------------------------- */ +#button_left { position : absolute; left : 0px; top : 164px; } +#button_right { position : absolute; left : 128px; top : 164px; } + + +/* #### 20080922 #### Added to confirm to restart or return to the TWL Menu. */ +/* ---- button : 128x56 ------------------------------- */ +#button_return_yes { position : absolute; left : 0px; top : 164px; } +#button_return_no { position : absolute; left : 128px; top : 164px; } + +/* #### 20080922 #### Added to confirm to restart or return to the TWL Menu. */ +/* ---- button : 128x56 ------------------------------- */ +#button_restart_yes { position : absolute; left : 0px; top : 164px; } +#button_restart_no { position : absolute; left : 128px; top : 164px; } + + + + + +/* ---- button base class ------------------------------- */ + +.btn_base { + position : relative; + background-repeat : no-repeat; + background-position : 0px 0px; + overflow : hidden; +} + +/* #### 20080807 #### Added to reduce size of css file. */ +/* ---- button inner base class ------------------------------- */ + +.btn_inner_base { + position : relative; + width : inherit; + height : inherit; + padding : 2 4 2 4; + overflow : hidden; + display : table-cell; + vertical-align : middle; + text-align : center; +} + +/* #### 20080807 #### Added to reduce size of css file. */ +/* ---- button spacer base class ------------------------------- */ + +.btn_spacer_base { + position : absolute; + left : 0px; + top : 0px; + width : inherit; + height : inherit; +} + + +/* .............. */ +.button_224x28 { + width : 224px; + height : 28px; + background-image : url(./button_224x28_all.gif); +} + +/* .............. */ +.button_224x32 { + width : 224px; + height : 32px; + background-image : url(./button_224x32_all.gif); +} + +/* .............. */ +.violet_128x28 { + width : 128px; + height : 28px; + background-image : url(./violet_128x28_all.gif); +} + +/* .............. */ +.violet_128x40 { + width : 128px; + height : 40px; + background-image : url(./violet_128x40_all.gif); +} diff --git a/error/error_id.js b/error/error_id.js new file mode 100644 index 0000000..b9bfbc7 --- /dev/null +++ b/error/error_id.js @@ -0,0 +1,13 @@ +//---------------------------------------- +//-- define : message id num. + +var JMS_shop_error_title = 0; +var JMS_shop_error_code = 1; +var JMS_shop_menu = 2; +var JMS_shop_reset = 3; +var JMS_shop_ok = 4; +var JMS_shop_title = 5; +var JMS_shop_menu_02 = 6; +var JMS_shop_reset_02 = 7; +var JMS_shop_yes = 8; +var JMS_shop_no = 9; \ No newline at end of file diff --git a/error/se.js b/error/se.js new file mode 100644 index 0000000..bf8f2ce --- /dev/null +++ b/error/se.js @@ -0,0 +1,11 @@ +//---------------------------------------- +//-- define : SE No. (refer to sound_data.sadl) + +/* #### 20080726 #### Changed SE No. */ +/* #### 20080911 #### Changed SE No. */ + +var TWL_SHOP_SE_ONMOUSEDOWN = 16; // #define TWL_CMN_SE_TOUCH 16 // 16 // 20 +var TWL_SHOP_SE_ONCLICK = 17; // #define TWL_CMN_SE_DECIDE 17 // 17 // 19 +var TWL_SHOP_SE_TRANSIT = 37; // #define TWL_SHP_SE_LOADED 37 // 35 // 17 +var TWL_SHOP_SE_INVALID = 23; // #define TWL_CMN_SE_INVALID 23 // 23 // NEW +var TWL_SHOP_SE_WARNING = 36; // #define TWL_SHP_SE_WARNING_PAGE 36 // 34 // NEW diff --git a/error/violet_128x28_all.gif b/error/violet_128x28_all.gif new file mode 100644 index 0000000..5fd4879 Binary files /dev/null and b/error/violet_128x28_all.gif differ diff --git a/error/violet_128x40_all.gif b/error/violet_128x40_all.gif new file mode 100644 index 0000000..1c7880d Binary files /dev/null and b/error/violet_128x40_all.gif differ