Skip to content

Commit

Permalink
-Attempt to fix protection screen issue
Browse files Browse the repository at this point in the history
-Fixed player screen UI localization bug removing space between
'Viewers' word and number
-Now adding highlight to whichever mode user is currently on
-Removed code limiting ability to reset the same quality
-Changed version to 3.2
  • Loading branch information
Nikita Katchik committed Jul 10, 2014
1 parent cf4c725 commit c954991
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 11 deletions.
13 changes: 9 additions & 4 deletions app/htmls/SceneBrowser.html
Expand Up @@ -28,6 +28,11 @@
line-height: 42px;
}

div.tip_icon_active {
outline: 1px solid white;
outline-offset: 2px;
}

div.tip_label {
width: 86px;
height: 42px;
Expand Down Expand Up @@ -201,13 +206,13 @@
<img style="float: left; width: 8%; padding-left: 3%; padding-top: 2.0%; padding-bottom: 1.5%;" src="images/twitchlogo.png"/>

<div style="float: right; padding-top: 3.0%;">
<div class="tip_icon" style="background-color: #ff3333">A</div>
<div id="tip_icon_channels" class="tip_icon" style="background-color: #ff3333">A</div>
<div class="tip_label label_channels">STR_CHANNELS</div>
<div class="tip_icon" style="background-color: #55d459">B</div>
<div id="tip_icon_games" class="tip_icon" style="background-color: #55d459">B</div>
<div class="tip_label label_games">STR_GAMES</div>
<div class="tip_icon" style="background-color: #eded00">C</div>
<div id="tip_icon_open" class="tip_icon" style="background-color: #eded00">C</div>
<div class="tip_label label_open">STR_OPEN</div>
<div class="tip_icon" style="background-color: #3d81f2">D</div>
<div id="tip_icon_refresh" class="tip_icon" style="background-color: #3d81f2">D</div>
<div class="tip_label label_refresh">STR_REFRESH</div>
</div>

Expand Down
14 changes: 13 additions & 1 deletion app/scenes/SceneBrowser.js
Expand Up @@ -5,12 +5,13 @@ SceneSceneBrowser.selectedChannel;
SceneSceneBrowser.ItemsLimit = 100;
SceneSceneBrowser.ColoumnsCount = 4;

SceneSceneBrowser.MODE_NONE = -1;
SceneSceneBrowser.MODE_ALL = 0;
SceneSceneBrowser.MODE_GAMES = 1;
SceneSceneBrowser.MODE_GAMES_STREAMS = 2;
SceneSceneBrowser.MODE_GO = 3;

SceneSceneBrowser.mode = SceneSceneBrowser.MODE_ALL;
SceneSceneBrowser.mode = SceneSceneBrowser.MODE_NONE;
SceneSceneBrowser.gameSelected = null;
SceneSceneBrowser.itemsCount = 0;
SceneSceneBrowser.cursorX = 0;
Expand Down Expand Up @@ -335,21 +336,30 @@ SceneSceneBrowser.switchMode = function(mode)
if (mode != SceneSceneBrowser.mode)
{
SceneSceneBrowser.mode = mode;

$("#tip_icon_channels").removeClass('tip_icon_active');
$("#tip_icon_games").removeClass('tip_icon_active');
$("#tip_icon_open").removeClass('tip_icon_active');
$("#tip_icon_refresh").removeClass('tip_icon_active');

if (mode == SceneSceneBrowser.MODE_ALL)
{
$("#tip_icon_channels").addClass('tip_icon_active');
SceneSceneBrowser.refresh();
}
else if (mode == SceneSceneBrowser.MODE_GAMES)
{
$("#tip_icon_games").addClass('tip_icon_active');
SceneSceneBrowser.refresh();
}
else if (mode == SceneSceneBrowser.MODE_GAMES_STREAMS)
{
$("#tip_icon_games").addClass('tip_icon_active');
SceneSceneBrowser.refresh();
}
else if (mode == SceneSceneBrowser.MODE_GO)
{
$("#tip_icon_open").addClass('tip_icon_active');
SceneSceneBrowser.clean();
SceneSceneBrowser.showInput();
SceneSceneBrowser.refreshInputFocus();
Expand Down Expand Up @@ -466,6 +476,8 @@ SceneSceneBrowser.prototype.initialize = function ()
SceneSceneBrowser.initLanguage();

SceneSceneBrowser.loadingData = false;

SceneSceneBrowser.switchMode(SceneSceneBrowser.MODE_ALL);
};


Expand Down
11 changes: 6 additions & 5 deletions app/scenes/SceneChannel.js
Expand Up @@ -145,6 +145,8 @@ SceneSceneChannel.prototype.handleHide = function () {

SceneSceneChannel.prototype.handleFocus = function () {
alert("SceneSceneChannel.handleFocus()");

sf.service.setScreenSaver(true, 100000);

SceneSceneChannel.Player.OnConnectionFailed = 'SceneSceneChannel.onConnectionFailed';
SceneSceneChannel.Player.OnAuthenticationFailed = 'SceneSceneChannel.onAuthenticationFailed';
Expand Down Expand Up @@ -177,6 +179,8 @@ SceneSceneChannel.prototype.handleFocus = function () {

SceneSceneChannel.prototype.handleBlur = function () {
alert("SceneSceneChannel.handleBlur()");

sf.service.setScreenSaver(false);
};

SceneSceneChannel.prototype.handleKeyDown = function (keyCode) {
Expand Down Expand Up @@ -230,10 +234,7 @@ SceneSceneChannel.prototype.handleKeyDown = function (keyCode) {
case sf.key.ENTER:
if (SceneSceneChannel.isPanelShown())
{
if (SceneSceneChannel.qualityIndex != SceneSceneChannel.qualityPlayingIndex)
{
SceneSceneChannel.qualityChanged();
}
SceneSceneChannel.qualityChanged();
}
else
{
Expand Down Expand Up @@ -391,7 +392,7 @@ SceneSceneChannel.updateStreamInfo = function()
{
var response = JSON.parse(xmlHttp.responseText);
$("#stream_info_title").text(response.stream.channel.status);
$("#stream_info_viewer").text(addCommas(response.stream.viewers) + STR_VIEWER);
$("#stream_info_viewer").text(addCommas(response.stream.viewers) + ' ' + STR_VIEWER);
$("#stream_info_icon").attr("src", response.stream.channel.logo);
}
catch (err)
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Expand Up @@ -10,7 +10,7 @@
<BigListIcon>icon/icon_95_78.png</BigListIcon>
<category></category>
<autoUpdate>n</autoUpdate>
<ver>3.1</ver>
<ver>3.2</ver>
<mgrver></mgrver>
<fullwidget>y</fullwidget>
<type>user</type>
Expand Down

0 comments on commit c954991

Please sign in to comment.