53 lines
1000 B
Python
53 lines
1000 B
Python
import arcade
|
|
import assets
|
|
import controls
|
|
import menu
|
|
import text
|
|
import renderers
|
|
|
|
text = text.TextRenderer(6, 186, 210)
|
|
panel = renderers.NineSlicesPanel(0,100,230,100)
|
|
|
|
m = []
|
|
|
|
def mos_1x(g):
|
|
g.mosaic = 1
|
|
g.mos_enabled = False
|
|
|
|
def mos_2x(g):
|
|
g.mosaic = 8
|
|
g.mos_enabled = True
|
|
|
|
def switch(game):
|
|
global m
|
|
m = [
|
|
menu.MenuItem("1", 100, 90, None, None, None, None, mos_1x, game),
|
|
menu.MenuItem("2", 100, 70 , None, None, None, None, mos_2x, game)
|
|
]
|
|
|
|
m[0].down = m[1]
|
|
m[1].up = m[0]
|
|
m[0].select()
|
|
|
|
def update(game, dt):
|
|
controltext = ""
|
|
|
|
for c in controls.controls:
|
|
controltext += f"{c.label}: {c.pressed}-{c.held}\n"
|
|
|
|
for i in m:
|
|
i.update()
|
|
text.reset(controltext)
|
|
text.type_all()
|
|
|
|
def draw(game):
|
|
arcade.draw_rect_filled(
|
|
arcade.LBWH(0, 0, game.screen_width, game.screen_height),
|
|
arcade.color.RED,
|
|
)
|
|
for i in m:
|
|
i.render()
|
|
|
|
panel.render()
|
|
text.render()
|