Credits page
This commit is contained in:
@@ -2,6 +2,7 @@ import type { Client } from "$/client/client.ts";
|
||||
import { canvas, draw_rect, draw_text, measure_text } from "$/client/renderer/mod.ts";
|
||||
import { GuiScreen } from "./gui_screen.ts";
|
||||
import { Button, TEXT_HEIGHT } from "./widgets.ts";
|
||||
import { CreditsScreen } from "./credits_screen.ts";
|
||||
|
||||
const BUTTON_WIDTH = 440;
|
||||
const BUTTON_HEIGHT = 48;
|
||||
@@ -15,6 +16,9 @@ export class PauseScreen extends GuiScreen {
|
||||
super();
|
||||
this.buttons = [
|
||||
new Button("Back to game", BUTTON_WIDTH, BUTTON_HEIGHT, () => client.pop_screen()),
|
||||
new Button("Credits", BUTTON_WIDTH, BUTTON_HEIGHT, () => {
|
||||
client.push_screen(new CreditsScreen(() => client.pop_screen()));
|
||||
}),
|
||||
new Button("Disconnect", BUTTON_WIDTH, BUTTON_HEIGHT, () => client.disconnect()),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user