Skip to content

Commit

Permalink
streamconfig implementation completed
Browse files Browse the repository at this point in the history
  • Loading branch information
jankammerath committed Jan 21, 2018
1 parent c9ebb31 commit 93a7e6e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 9 deletions.
28 changes: 19 additions & 9 deletions app/js/app.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -94,15 +94,25 @@ var app = {
app.toggle(toggleComponent); app.toggle(toggleComponent);
} }


/* check if any element is active if(keyCode == 27){
and let it handle the key */ /* ESC key hides all elements */
for(var c=0; c<app.componentList.length; c++){ for(var c=0; c<app.componentList.length; c++){
var componentId = app.componentList[c]; var componentId = app.componentList[c];
var componentObject = window[app.componentList[c]]; if($("#"+componentId).is(":visible")){
if($("#"+componentId).is(":visible")){ $("#"+componentId).fadeOut();
/* check if it can handle keys */ }
if(app.isFunction(componentObject.handleKey)){ }
componentObject.handleKey(keyCode); }else{
/* check if any element is active
and let it handle the key */
for(var c=0; c<app.componentList.length; c++){
var componentId = app.componentList[c];
var componentObject = window[app.componentList[c]];
if($("#"+componentId).is(":visible")){
/* check if it can handle keys */
if(app.isFunction(componentObject.handleKey)){
componentObject.handleKey(keyCode);
}
} }
} }
} }
Expand Down
12 changes: 12 additions & 0 deletions app/js/streamconfig.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ var streamconfig = {


/* flush html to component */ /* flush html to component */
$("#streamconfig").html(html); $("#streamconfig").html(html);

/* attach mouse handler */
$(".track").mousemove(function(){
$(".track").attr("data-selected","false");
$(this).attr("data-selected","true");
});

$(".track").mouseup(function(){
$(".track").attr("data-selected","false");
$(this).attr("data-selected","true");
streamconfig.handleKey(13);
});
}, },


handleKey: function(keyCode){ handleKey: function(keyCode){
Expand Down
Binary file modified bin/iptvx
Binary file not shown.
3 changes: 3 additions & 0 deletions src/keycode.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ int keycode_convert_sdl_to_gtk(int sdl_keycode){
result = sdl_keycode + 65200; result = sdl_keycode + 65200;
} }


/* ESCAPE */
if(sdl_keycode == 27){result=65307;}

/* BACKSPACE */ /* BACKSPACE */
if(sdl_keycode == 8){result=65288;} if(sdl_keycode == 8){result=65288;}


Expand Down

0 comments on commit 93a7e6e

Please sign in to comment.