Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 736616: Fix most of the text glitches in Windows

  • Loading branch information...
commit db02dedefaae54cd9df43f1962cfdd04c76f171d 1 parent d877fcd
@glecollinet glecollinet authored
View
10 client/css/main.css
@@ -656,6 +656,7 @@ footer, header, hgroup, menu, nav, section {
#notifications {width:392px;margin-left:-196px;font-size:16px;color:#eee;top:2px;height:30px;}
#notifications div.top {top:-30px;}
#notifications span {line-height:30px;height:30px;}
+ .windows #notifications span {line-height:34px;}
#playercount {font-size:16px;left:717px;top:10px;width:114px;text-align:center;}
#population {background-size:960px;right:70px;bottom:44px;width:262px;background-position:-480px -96px;font-size:14px;line-height:20px;}
@@ -711,6 +712,7 @@ footer, header, hgroup, menu, nav, section {
#close-about {margin:153px auto 0 auto;text-align:center;clear:both;font-size:14px;color:#373737;}
#about #game-desc {font-size:18px;text-align:center;max-width:70%;margin:25px auto;line-height:24px;}
#about .left p, #about .right p {font-size:14px;text-align:left;line-height:20px;padding:0;margin-top:-8px;}
+ .windows #about .left p, .windows #about .right p {font-size:13px;text-align:left;line-height:20px;padding:0;margin-top:-10px;}
#about .left {width:31%;float:left;margin-left:12%;}
#about .right {width:37%;float:right;margin-right:12%;}
#about .left .img {height:60px;width:54px;float:left;background-position:-708px -344px;margin-right:14px;}
@@ -813,6 +815,7 @@ footer, header, hgroup, menu, nav, section {
#notifications {width:392px;margin-left:-196px;font-size:16px;color:#eee;top:2px;height:30px;}
#notifications div.top {top:-30px;}
#notifications span {line-height:30px;height:30px;}
+ .windows #notifications span {line-height:34px;}
#playercount {font-size:16px;left:717px;top:10px;width:114px;text-align:center;}
#population {background-size:960px;right:70px;bottom:44px;width:262px;background-position:-480px -96px;font-size:14px;line-height:20px;}
@@ -867,6 +870,7 @@ footer, header, hgroup, menu, nav, section {
#close-about {margin:153px auto 0 auto;text-align:center;clear:both;font-size:14px;color:#373737;}
#about #game-desc {font-size:18px;text-align:center;max-width:70%;margin:25px auto;line-height:24px;}
#about .left p, #about .right p {font-size:14px;text-align:left;line-height:20px;padding:0;margin-top:-8px;}
+ .windows #about .left p, .windows #about .right p {font-size:13px;text-align:left;line-height:20px;padding:0;margin-top:-10px;}
#about .left {width:31%;float:left;margin-left:12%;}
#about .right {width:37%;float:right;margin-right:12%;}
#about .left .img {height:60px;width:54px;float:left;background-position:-708px -344px;margin-right:14px;}
@@ -1242,6 +1246,6 @@ footer, header, hgroup, menu, nav, section {
/* Workarounds for chrome windows bugs */
- .chromewin #parchment, .chromewin #parchment input, .chromewin #notifications, .chromewin #instructions, .chromewin #achievements, .chromewin #achievement-notification,
- .chromewin #playercount, .chromewin #credits, .chromewin #loadcharacter, .chromewin #confirmation, .chromewin #death, .chromewin #error, .chromewin #about,
- .chromewin #parchment p, .chromewin #portrait p, .chromewin #noscript, .chromewin footer, .chromewin .bubble p, .chromewin #population {font-family:'AdvoCut';}
+ .windows #parchment, .windows #parchment input, .windows #notifications, .windows #instructions, .windows #achievements, .windows #achievement-notification,
+ .windows #playercount, .windows #credits, .windows #loadcharacter, .windows #confirmation, .windows #death, .windows #error, .windows #about,
+ .windows #parchment p, .windows #portrait p, .windows #noscript, .windows footer, .windows .bubble p, .windows #population {font-family:'AdvoCut';}
View
6 client/js/detect.js
@@ -19,10 +19,14 @@ Detect.isTablet = function(screenWidth) {
return false;
};
+Detect.isWindows = function() {
+ return Detect.userAgentContains('Windows');
+}
+
Detect.isChromeOnWindows = function() {
return Detect.userAgentContains('Chrome') && Detect.userAgentContains('Windows');
};
Detect.canPlayMP3 = function() {
return Modernizr.audio.mp3;
-};
+};
View
4 client/js/main.js
@@ -7,9 +7,9 @@ define(['jquery', 'app'], function($, App) {
app = new App();
app.center();
- if(Detect.isChromeOnWindows()) {
+ if(Detect.isWindows()) {
// Workaround for graphical glitches on text
- $('body').addClass('chromewin');
+ $('body').addClass('windows');
}
$('body').click(function(event) {
View
2  client/js/renderer.js
@@ -116,7 +116,7 @@ function(Camera, Item, Character, Player, Timer) {
case 1:
fontsize = 10; break;
case 2:
- fontsize = Detect.isChromeOnWindows() ? 10 : 13; break;
+ fontsize = Detect.isWindows() ? 10 : 13; break;
case 3:
fontsize = 20;
}
Please sign in to comment.
Something went wrong with that request. Please try again.