forked from fofix/fofix
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allows thememakers to make their own Custom Layers with customRMLayer…
…s.py in the theme's folder. (Very simple example provided)
- Loading branch information
Showing
4 changed files
with
71 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
from Rockmeter import * | ||
|
||
class Spinner(ImageLayer): | ||
def __init__(self, stage, section): | ||
|
||
self.stage = stage | ||
super(Spinner, self).__init__(stage, section, os.path.join("themes", self.stage.themename, "rockmeter", "platinum.png")) | ||
|
||
self.xposexpr = ".80" | ||
self.yposexpr = ".80" | ||
|
||
self.condition = "True" | ||
|
||
def updateLayer(self, playerNum): | ||
super(ImageLayer, self).updateLayer(playerNum) | ||
|
||
self.angle += 2 | ||
|
||
def render(self, visibility, playerNum): | ||
|
||
self.updateLayer(playerNum) | ||
|
||
coord = self.position | ||
scale = self.scale | ||
rot = self.angle | ||
color = self.color | ||
alignment = self.alignment | ||
valignment = self.valignment | ||
drawing = self.drawing | ||
rect = self.rect | ||
|
||
#frameX = self.frameX | ||
#frameY = self.frameY | ||
|
||
if bool(eval(self.condition)): | ||
self.engine.drawImage(drawing, scale, coord, rot, color, rect, | ||
alignment = alignment, valignment = valignment) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters