Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 732445: Make the game playable in Opera when WebSockets are enabled

  • Loading branch information...
commit a6234bfde64a56c9e6ead655566e952d7af8ede4 1 parent bacd714
@glecollinet glecollinet authored
View
10 client/css/main.css
@@ -1220,3 +1220,13 @@ footer, header, hgroup, menu, nav, section {
.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 .alert, .windows footer, .windows .bubble p, .windows #population {font-family:'AdvoCut';}
+
+/* Workarounds for opera's lack of pointer-events support */
+
+ .opera.intro #bubbles, .opera.intro #canvas, .opera.intro #container { z-index: -30000;}
+ .opera .credits #credits, .opera .createcharacter #createcharacter, .opera .loadcharacter #loadcharacter, .opera .confirmation #confirmation, .opera .death #death,
+ .opera .error #error, .opera .about #about { z-index: 30000; }
+ .opera #instructions, .opera #achievements { z-index: -30000;}
+ .opera #achievements.active, .opera #instructions.active { z-index: 30000;}
+ .opera #coinsparks {display:none;}
+ .opera #death, .opera #about, .opera #credits, .opera #error, .opera #confirmation, .opera #loadcharacter { z-index: -30000; }
View
2  client/index.html
@@ -206,8 +206,6 @@ <h1 id="logo">
<div class="parchment-right"></div>
</section>
</div>
- <div id="mask"></div>
- <!--<div style="font-family:Ladybug;"></div>-->
<div id="container">
<div id="canvasborder">
<article id="instructions" class="clickable">
View
4 client/js/detect.js
@@ -33,4 +33,8 @@ Detect.canPlayMP3 = function() {
Detect.isSafari = function() {
return Detect.userAgentContains('Safari') && !Detect.userAgentContains('Chrome');
+};
+
+Detect.isOpera = function() {
+ return Detect.userAgentContains('Opera');
};
View
5 client/js/main.js
@@ -11,6 +11,11 @@ define(['jquery', 'app'], function($, App) {
// Workaround for graphical glitches on text
$('body').addClass('windows');
}
+
+ if(Detect.isOpera()) {
+ // Fix for no pointer events
+ $('body').addClass('opera');
+ }
$('body').click(function(event) {
if($('#parchment').hasClass('credits')) {
Please sign in to comment.
Something went wrong with that request. Please try again.