diff options
Diffstat (limited to 'src/api')
-rwxr-xr-x | src/api/Button.py | 4 | ||||
-rwxr-xr-x | src/api/Game.py | 4 | ||||
-rwxr-xr-x | src/api/Image.py | 4 | ||||
-rwxr-xr-x | src/api/Label.py | 2 | ||||
-rwxr-xr-x | src/api/Math.py | 5 | ||||
-rwxr-xr-x | src/api/Mouse.py | 3 | ||||
-rwxr-xr-x | src/api/MultiLabel.py | 2 | ||||
-rwxr-xr-x | src/api/Sprite.py | 3 | ||||
-rwxr-xr-x | src/api/SuperSprite.py | 2 | ||||
-rwxr-xr-x | src/api/Vector.py | 4 |
10 files changed, 24 insertions, 9 deletions
diff --git a/src/api/Button.py b/src/api/Button.py index abe5863..cc26f80 100755 --- a/src/api/Button.py +++ b/src/api/Button.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*-
+
import pygame
import api.Label
from api.Label import CLabel
@@ -21,8 +23,6 @@ class CButton(CLabel): self.bgColor = (0xCC, 0xCC, 0xCC)
self.set_text('Button')
- def setCenter(self, aCenter):
- self.set_center(aCenter)
def clicked(self):
return self.mclicked
diff --git a/src/api/Game.py b/src/api/Game.py index 0b89f73..584a208 100755 --- a/src/api/Game.py +++ b/src/api/Game.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*-
+
import pygame
#from pygame.locals import *
import pygame.font
@@ -155,4 +157,4 @@ class CGame(object): def setBackground(self, aBackgroundImage):
self.mBackground = None
self.mBackground = aBackgroundImage
- self.mScreen.blit(self.mBackground, (0, 0))
\ No newline at end of file + self.mScreen.blit(self.mBackground, (0, 0))
diff --git a/src/api/Image.py b/src/api/Image.py index 7630c15..3351c1b 100755 --- a/src/api/Image.py +++ b/src/api/Image.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*-
+
import pygame
# ------------------------------------------------------------------------------
@@ -26,4 +28,4 @@ def loadImage(aImageFilename, aIsTransparent = True): else:
image = image.convert()
- return image
\ No newline at end of file + return image
diff --git a/src/api/Label.py b/src/api/Label.py index bd7577d..f4ff9ac 100755 --- a/src/api/Label.py +++ b/src/api/Label.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*-
+
import pygame
class CLabel(pygame.sprite.Sprite):
diff --git a/src/api/Math.py b/src/api/Math.py index e8b4845..7ac64a8 100755 --- a/src/api/Math.py +++ b/src/api/Math.py @@ -1,5 +1,6 @@ #!/usr/bin/env python
-# -*- coding: cp1252 -*-
+# -*- coding: utf-8 -*-
+#cp1252
import math
@@ -44,4 +45,4 @@ def degToRad(aAngle): def dist(ax1, ay1, ax2, ay2):
- return math.sqrt((ax2-ax1)**2 + (ay2-ay1)**2)
\ No newline at end of file + return math.sqrt((ax2-ax1)**2 + (ay2-ay1)**2)
diff --git a/src/api/Mouse.py b/src/api/Mouse.py index 54f3b3b..c487c56 100755 --- a/src/api/Mouse.py +++ b/src/api/Mouse.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import pygame @@ -7,4 +8,4 @@ def get_position(): return pygame.mouse.get_pos() def get_pressed(): - return pygame.mouse.get_pressed()
\ No newline at end of file + return pygame.mouse.get_pressed() diff --git a/src/api/MultiLabel.py b/src/api/MultiLabel.py index 122ee13..be11511 100755 --- a/src/api/MultiLabel.py +++ b/src/api/MultiLabel.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*-
+
import pygame
class CMultiLabel(pygame.sprite.Sprite):
diff --git a/src/api/Sprite.py b/src/api/Sprite.py index 5639e4a..dd3b342 100755 --- a/src/api/Sprite.py +++ b/src/api/Sprite.py @@ -1,5 +1,6 @@ #!/usr/bin/env python
-# -*- coding: cp1252 -*-
+# -*- coding: utf-8 -*-
+#cp1252
import pygame
import math
diff --git a/src/api/SuperSprite.py b/src/api/SuperSprite.py index e8730d6..d044541 100755 --- a/src/api/SuperSprite.py +++ b/src/api/SuperSprite.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*-
+
import pygame
import math
diff --git a/src/api/Vector.py b/src/api/Vector.py index bbe6580..bd89b9c 100755 --- a/src/api/Vector.py +++ b/src/api/Vector.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*-
+
import math
from math import *
@@ -124,4 +126,4 @@ class CVector(object): # public function dotXY( aX:Number, aY:Number ):Number
# {
# return x * aX + y * aY;
-# }
\ No newline at end of file +# }
|