import pygame.locals as pgl
import pygame
-from naja import constants
from naja.constants import KEYS, SCREEN, PALETTE
from naja.events import SceneChangeEvent, LoadGameEvent
from naja.gamestate import GameState
from naja.scenes.dummygame import DummyGameScene
from naja.widgets.image_box import PreRenderedImageBox
+
class IntroductionScene(Scene):
def __init__(self, state):
super(IntroductionScene, self).__init__(state)
self.add(TextBoxWidget(
(24, 72), '\n'.join([
- "These are your robot's status bits. On the left we have "
- "the Most Signiticant Bit (MSB, currently set), then Red, "
- "Green (set) and Blue (set) key bits, and finally the four "
- "bits which control movement options, of which only left is "
- "set. You can only move in directions which are set. \n"
+ "These are your robot's status bits. On the left we have"
+ " the Most Signiticant Bit (MSB, currently set), then the"
+ " Red (unset), Green (set) and Blue (set) key bits, and"
+ " finally the four bits which control movement options, of"
+ " which only left is set. You can only move in directions"
+ " which are set.",
"Enter to continue.",
]), fontsize=32,
colour=PALETTE.GREEN, padding=12, border=8,
(24, 132), '\n'.join([
"This text box describes the current game mode. The game is "
"divided into movements and actions, and each mode has "
- "different options, shown here.\n"
+ "different options, shown here.",
"During movement, you can examine the entire board, but you "
- "can only move to hi-lighted tiles (including the one you are "
- "on. Actions come next... \n"
+ "can only move to highlighted tiles (including the one you"
+ " are on). Actions come next ...",
"Enter to continue.",
]), fontsize=32,
colour=PALETTE.GREEN, padding=12, border=8,
"Some actions have requirements and are only selectable if "
"you have the correct bits set (unavailable actions are "
"greyed out). Actions usually change the bits set on "
- "your robot. This is often not beneficial.\n"
+ "your robot. This is often not beneficial.",
"Some actions have additional effects if the MSB is "
- "set.\n"
+ "set.",
"Enter to continue.",
]), fontsize=32,
colour=PALETTE.GREEN, padding=12, border=8,
pygame.draw.rect(game_surface, PALETTE.GREEN, (488, 52, 304, 240), 8)
-
def handle_scene_event(self, ev):
if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT:
from naja.scenes.menu import MenuScene