Főképernyő és stáblista képernyő
This commit is contained in:
@@ -1,52 +1,36 @@
|
||||
import arcade
|
||||
import assets
|
||||
import controls
|
||||
import menu
|
||||
import text
|
||||
import renderers
|
||||
import gamestate
|
||||
|
||||
text = text.TextRenderer(6, 186, 210)
|
||||
panel = renderers.NineSlicesPanel(0,100,230,100)
|
||||
text = text.TextRenderer(0, 50, 210)
|
||||
panel = renderers.NineSlicesPanel(84,100,64,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 new_game(g):
|
||||
gamestate.switch_gamestate(g, "overworld")
|
||||
|
||||
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)
|
||||
menu.MenuItem("Új játék!", 98, 150, None, None, None, None, new_game, game),
|
||||
menu.MenuItem("Kilépés", 98, 130, None, None, None, None, quit)
|
||||
]
|
||||
|
||||
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.reset("Irányítás:\n -WASD = mozgás\n -Enter = válaszás / interakció\n -Bal shift = Vissza")
|
||||
text.type_all()
|
||||
|
||||
def draw(game):
|
||||
arcade.draw_rect_filled(
|
||||
arcade.LBWH(0, 0, game.screen_width, game.screen_height),
|
||||
arcade.color.RED,
|
||||
)
|
||||
def update(game, dt):
|
||||
for i in m:
|
||||
i.render()
|
||||
i.update()
|
||||
|
||||
def draw(game):
|
||||
panel.render()
|
||||
text.render()
|
||||
for i in m:
|
||||
i.render()
|
||||
|
||||
Reference in New Issue
Block a user