Skip to content

Commit

Permalink
Made stage bigger
Browse files Browse the repository at this point in the history
  • Loading branch information
jcreedcmu committed Oct 14, 2023
1 parent d04bb26 commit a1e6d0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useEffectfulReducer } from './ui/use-effectful-reducer';
import { relpos } from './util/dutil';
import { Point } from './util/types';
import { vint } from './util/vutil';
import { canvas_bds_in_canvas } from './ui/widget-helpers';

type Dispatch = (action: Action) => void;

Expand Down Expand Up @@ -143,8 +144,8 @@ export function resizeView(c: HTMLCanvasElement): ViewData {
const ratio = devicePixelRatio;

const parent = c.parentElement?.getBoundingClientRect();
const w = 640;
const h = 480;
const w = canvas_bds_in_canvas.sz.x;
const h = canvas_bds_in_canvas.sz.y;

c.width = w;
c.height = h;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/widget-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { GameState } from "../core/state";

export const HAND_WIDTH = 100;

export const canvas_bds_in_canvas: Rect = { p: { x: 0, y: 0 }, sz: { x: 640, y: 480 } };
export const canvas_bds_in_canvas: Rect = { p: { x: 0, y: 0 }, sz: { x: 800, y: 600 } };
export const hand_bds_in_canvas: Rect = {
p: { x: canvas_bds_in_canvas.sz.x - HAND_WIDTH, y: 0 },
sz: { x: HAND_WIDTH, y: canvas_bds_in_canvas.sz.y }
Expand Down

0 comments on commit a1e6d0f

Please sign in to comment.