projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use centering on Credits screen.
[naja.git]
/
naja
/
scenes
/
credits.py
diff --git
a/naja/scenes/credits.py
b/naja/scenes/credits.py
index b6f95b3effaf754375bd63159eedf74d6ef3a306..a6ae05d2b6ce1de404332d50fe48cc7a7753b67d 100644
(file)
--- a/
naja/scenes/credits.py
+++ b/
naja/scenes/credits.py
@@
-6,7
+6,7
@@
import pygame.locals as pgl
from naja.constants import KEYS
from naja.scenes.scene import Scene
from naja.constants import KEYS
from naja.scenes.scene import Scene
-from naja.widgets.text import TextBoxWidget
+from naja.widgets.text import Text
Widget, Text
BoxWidget
from naja.widgets.image_box import ImageBox
from naja.events import SceneChangeEvent
from naja.widgets.image_box import ImageBox
from naja.events import SceneChangeEvent
@@
-22,11
+22,11
@@
class CreditsScene(Scene):
background = ImageBox(
(0, 0), "screens/splash.png")
self.add(background)
background = ImageBox(
(0, 0), "screens/splash.png")
self.add(background)
+ self.add(TextWidget(
+ (400, 300), 'CREDITS', colour='white', centre=True))
self.add(TextBoxWidget(
self.add(TextBoxWidget(
- (10, 350), '\n'.join([
- 'CREDITS',
- '',
+ (400, 340), '\n'.join([
'A game about robots and bits and other things',
'',
'by',
'A game about robots and bits and other things',
'',
'by',
@@
-41,7
+41,7
@@
class CreditsScene(Scene):
]),
colour='white', padding=1,
bg_colour=(0, 0, 0, 0), centre=True,
]),
colour='white', padding=1,
bg_colour=(0, 0, 0, 0), centre=True,
- box_width=
640, view_port=(780, 23
0)))
+ box_width=
780, view_port=(780, 25
0)))
def handle_scene_event(self, ev):
if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT:
def handle_scene_event(self, ev):
if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT: