/**** * Classes ****/ // No plugins needed for this game // Button class: a simple rectangular button with centered text var BlueButton = Container.expand(function () { var self = Container.call(this); // Button dimensions var btnWidth = 600; var btnHeight = 200; // Create button background (rounded rectangle using ellipse for corners) var btnBg = self.attachAsset('buttonBg', { width: btnWidth, height: btnHeight, color: 0x1e90ff, // Dodger blue shape: 'box', anchorX: 0.5, anchorY: 0.5 }); // Button label var btnLabel = new Text2('PRESS ME', { size: 90, fill: 0xFFFFFF }); btnLabel.anchor.set(0.5, 0.5); btnLabel.x = 0; btnLabel.y = 0; self.addChild(btnLabel); // Optional: visual feedback on press self.down = function (x, y, obj) { btnBg.alpha = 0.7; }; self.up = function (x, y, obj) { btnBg.alpha = 1; }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xffffff // Start with white background }); /**** * Game Code ****/ // Set initial background color (white) game.setBackgroundColor(0xffffff); // Create the button and center it var blueBtn = new BlueButton(); blueBtn.x = 2048 / 2; blueBtn.y = 2732 / 2; game.addChild(blueBtn); // Prevent button from being placed in the top-left 100x100 area // (It's centered, so this is always satisfied) // Handle button press: turn the whole screen blue blueBtn.up = function (x, y, obj) { // Instantly set background to blue screen color game.setBackgroundColor(0x0078d7); // Classic Windows blue screen color // Hide the button after press blueBtn.visible = false; // Show sad face var sadFace = new Text2(':(', { size: 400, fill: 0xFFFFFF }); sadFace.anchor.set(0.5, 0.5); sadFace.x = 2048 / 2; sadFace.y = 2732 / 2 - 350; game.addChild(sadFace); // Show Windows blue screen of death text var bsodText = new Text2("Your PC ran into a problem and needs to restart.\nWe're just collecting some error info, and then we'll restart for you.\n\nFor more information about this issue and possible fixes, visit\nhttps://www.windows.com/stopcode\n\nIf you call a support person, give them this info:\nSTOP CODE: FRVR_GAME_CRASHED", { size: 60, fill: 0xFFFFFF, align: "center" }); bsodText.anchor.set(0.5, 0); bsodText.x = 2048 / 2; bsodText.y = 2732 / 2 + 50; game.addChild(bsodText); // Optional: Show a QR code placeholder (Windows BSOD style) var qrText = new Text2("[R]", { size: 120, fill: 0xFFFFFF }); qrText.anchor.set(0.5, 0.5); qrText.x = 2048 / 2 - 400; qrText.y = 2732 / 2 + 350; game.addChild(qrText); }; // No update loop or other game logic needed for this MVP // No GUI elements needed // No sounds, music, or other effects per requirements
===================================================================
--- original.js
+++ change.js
@@ -81,9 +81,9 @@
bsodText.x = 2048 / 2;
bsodText.y = 2732 / 2 + 50;
game.addChild(bsodText);
// Optional: Show a QR code placeholder (Windows BSOD style)
- var qrText = new Text2("[QR]", {
+ var qrText = new Text2("[R]", {
size: 120,
fill: 0xFFFFFF
});
qrText.anchor.set(0.5, 0.5);