From 86026b4e766f8fd2dd9ca102261a1e1626d859e4 Mon Sep 17 00:00:00 2001 From: Songhun Date: Mon, 29 Oct 2012 08:59:25 +0900 Subject: [PATCH 1/2] Fixed coding bug --- static/cbox.sdk.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/cbox.sdk.js b/static/cbox.sdk.js index b55c32e..c2ddc63 100644 --- a/static/cbox.sdk.js +++ b/static/cbox.sdk.js @@ -257,11 +257,11 @@ jQuery(function ($) { //TODO : Connect Here for Keyboard Events console.log(arguments); }; - var CBOX_SDK_gamepad : function(){ + var CBOX_SDK_gamepad = function(){ //TODO : Connect Here for Gamepad Events console.log(arguments); }; - var CBOX_SDK_nunchuk : function(){ + var CBOX_SDK_nunchuk = function(){ //TODO : Connect Here for Nunchuk Events console.log(arguments); }; From 2753702b0cfe3b0b9247d6df17d9f529b47caf1b Mon Sep 17 00:00:00 2001 From: Songhun Date: Wed, 31 Oct 2012 17:46:46 +0900 Subject: [PATCH 2/2] Fixed Desgin of Layer Remove unused logs --- main.html | 8 ++++---- static/backbone.tv.keyevent.js | 5 ++++- static/cbox.css | 2 +- static/cbox.sdk.js | 19 +++++++++---------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/main.html b/main.html index d6ccc89..7e1887e 100644 --- a/main.html +++ b/main.html @@ -7,8 +7,8 @@ - + @@ -17,11 +17,11 @@
-
Connect Game Controllers
+
게임 컨트롤러 시작 하기
- Click button for connecting controllers. -

+ 컨트롤러와 연결이 끊어졌습니다. 연결을 하시기 바랍니다. +

diff --git a/static/backbone.tv.keyevent.js b/static/backbone.tv.keyevent.js index 6cb2e63..c210b54 100644 --- a/static/backbone.tv.keyevent.js +++ b/static/backbone.tv.keyevent.js @@ -109,6 +109,9 @@ // the events can handle that occurred at body element only. if (!(keyevent.srcElement instanceof HTMLBodyElement)) return this; + + console.log(keyevent); + var r = KeyEventListener.responder() , events = KeyEventListener._hotkeys[keyevent.which]; @@ -125,7 +128,7 @@ on: function(events, callback, context) { var keyEvents = this.keyEvents || (this.keyEvents = {}) , hotKeyEvents = KeyEventListener._hotkeys || (KeyEventListener._hotkeys = {}) - , event; + , event; events = events.split(/\s+/); while (event = events.shift()) { diff --git a/static/cbox.css b/static/cbox.css index e433dbd..53c8b7f 100644 --- a/static/cbox.css +++ b/static/cbox.css @@ -126,7 +126,7 @@ body { #osx-overlay {background-color:#000; cursor:wait;} /* Container */ -#osx-container {background-color:#eee; color:#000; font: 16px/24px "Lucida Grande",Arial,sans-serif; padding-bottom:4px; width:600px; -moz-border-radius-bottomleft:6px; -webkit-border-bottom-left-radius:6px; -moz-border-radius-bottomright:6px; -webkit-border-bottom-right-radius:6px; border-radius:0 0 6px 6px; -moz-box-shadow:0 0 64px #000; -webkit-box-shadow:0 0 64px #000; box-shadow:0 0 64px #000;} +#osx-container {background-color:#eee; color:#000; margin: 0 auto; font: 16px/24px "Lucida Grande",Arial,sans-serif; padding-bottom:4px; width:600px; -moz-border-radius-bottomleft:6px; -webkit-border-bottom-left-radius:6px; -moz-border-radius-bottomright:6px; -webkit-border-bottom-right-radius:6px; border-radius:0 0 6px 6px; -moz-box-shadow:0 0 64px #000; -webkit-box-shadow:0 0 64px #000; box-shadow:0 0 64px #000;} #osx-container a {color:#ddd;} #osx-container #osx-modal-title {color:#000; background-color:#ddd; border-bottom:1px solid #ccc; font-weight:bold; padding:6px 8px; text-shadow:0 1px 0 #f4f4f4;} #osx-container .close {display:none; position:absolute; right:0; top:0;} diff --git a/static/cbox.sdk.js b/static/cbox.sdk.js index c2ddc63..4d0944d 100644 --- a/static/cbox.sdk.js +++ b/static/cbox.sdk.js @@ -1,11 +1,3 @@ -/** - * Created with PyCharm. - * User: songhun - * Date: 10/27/12 - * Time: 3:12 PM - * To change this template use File | Settings | File Templates. - */ - // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -57,7 +49,6 @@ var common = (function () { // to ensure that the listeners are active before the NaCl module 'load' // event fires. var listenerDiv = document.getElementById('listener'); - console.log(listenerDiv, moduleEl); listenerDiv.appendChild(moduleEl); } @@ -237,7 +228,7 @@ document.addEventListener('DOMContentLoaded', function() { if (loadFunction) { loadFunction("cbox_sdk", "static", "cbox_sdk", - 120, 30); + 70, 25); } }); @@ -248,14 +239,17 @@ jQuery(function ($) { var CBOX_SDK_focusIn = function(){ //TODO : Hide Layer + $("#osx-container").css("visibility","hidden"); }; var CBOX_SDK_focusOut = function(){ //TODO : Show Connect Layer + $("#osx-container").css("visibility","visible"); }; var CBOX_SDK_keyboard = function(){ //TODO : Connect Here for Keyboard Events console.log(arguments); + }; var CBOX_SDK_gamepad = function(){ //TODO : Connect Here for Gamepad Events @@ -292,7 +286,12 @@ jQuery(function ($) { } } + $("#osx-modal-content").fadeIn('slow'); + setTimeout(function(){ + $("#nacl_module").css("position","absolute"); + $("#nacl_module").css("margin","-5px 0 0 -60px"); + },100); });