convert ui to term-ui

materials
Bronwen 2021-07-20 16:45:49 -04:00
parent 5f193829c8
commit 6ea53cbefb
18 changed files with 15 additions and 20 deletions

View File

@ -6,7 +6,7 @@ const moduleAliases = {
"@tasks": "./out/src/registries/Tasks.js",
"@items": "./out/src/registries/Items.js",
"@world": "./out/src/World.js",
"@ui": "./out/src/ui/UI.js",
"@ui": "./out/src/term-ui/UI.js",
"@game": "./out/src/Game.js"
};

View File

@ -3,9 +3,8 @@ import { DEBUG } from 'frigid/out/Serializable.js';
import { Pawn } from './Pawn.js';
import { TaskList } from './TaskList.js';
import { Inventory } from './Inventory.js';
import { Menu } from './ui/Menu.js';
import Time, { Tickable } from './Time.js';
import { render, Renderable, setTitle, start } from '@ui';
import { render, Renderable, setTitle, start, Menu } from '@ui';
import { ready } from './multiplayer/mDNS.js';
import faker from 'faker';
import { World } from '@world';

View File

@ -1,8 +1,7 @@
import { Serializable } from 'frigid';
import { Game } from './Game.js';
import { Item, ItemState } from './registries/Items.js';
import { Popup } from './ui/Popup.js';
import { Renderable } from '@ui';
import { Renderable, Popup } from '@ui';
export class Inventory extends Serializable implements Renderable {
items: ItemState<any>[];

View File

@ -6,7 +6,7 @@ import faker from 'faker';
import chalk from 'chalk';
import { Item } from '../registries/Items.js';
import WebSocket from 'ws';
import { Popup } from '../ui/Popup.js';
import { Popup } from '@ui';
import { inspect } from 'util'
import { Pawn } from '../Pawn.js';
import { Game } from '../Game.js';

View File

@ -1,6 +1,6 @@
import { Game } from "@game";
import { boxStyle, getTheme } from "@themes";
import { panels } from "@ui";
import { panels } from "./UI.js";
import blessed from 'neo-blessed';
import { quit, restart } from "../index.js";
@ -25,10 +25,6 @@ export class EscapeMenu {
top: 3,
left: 'center',
width: 20,
height: 'shrink',
content: '',
tags: true,

View File

@ -5,7 +5,7 @@ import { ItemState } from '../registries/Items.js';
import { Player } from "../multiplayer/Player";
import { Pawn } from '../Pawn.js';
import { getTheme, boxStyle } from '@themes';
import { panels } from '@ui';
import { panels } from './UI.js';
export class GiftPopup {
box;

View File

@ -1,5 +1,5 @@
import { Pawn } from '../Pawn.js';
import { panels, Renderable } from '@ui';
import { panels, Renderable } from './UI.js';
import { Game } from '../Game.js';
import { progressbar, stats } from '../Progressbar.js';
import { Popup } from './Popup.js';

View File

@ -4,7 +4,7 @@ import { Game } from '../Game.js';
import { stringify } from '../Memory.js';
import { Pawn } from '../Pawn.js';
import Time from '../Time.js';
import { panels } from '@ui';
import { panels } from './UI.js';
import { boxStyle } from '@themes';
export class PawnDetails {

View File

@ -2,7 +2,7 @@ import chalk from 'chalk';
import blessed from 'neo-blessed';
import { Game } from '../Game.js';
import { boxStyle, getTheme } from '@themes';
import { panels } from '@ui';
import { panels } from './UI.js';
export class Popup {
box;

View File

@ -1,7 +1,7 @@
import { Game } from "@game";
import { ItemState } from "@items";
import { boxStyle, getTheme } from "@themes";
import { panels } from "@ui";
import { panels } from "./UI";
import EventEmitter from "events";
import blessed from 'neo-blessed';

View File

@ -1,4 +1,4 @@
import { Renderable, RenderMode } from '@ui';
import { Renderable, RenderMode } from './UI';
import { KeypressAcceptor } from './Menu.js';
import { getTheme } from '@themes';

View File

@ -3,6 +3,7 @@ import blessed from 'neo-blessed';
import ansi from 'sisteransi';
import { boxStyle, getTheme } from '@themes';
export { Popup } from './Popup.js';
export { Menu } from './Menu.js'
export interface Renderable {
render(mode?: RenderMode): string

View File

@ -1,4 +1,4 @@
import { Renderable } from '@ui';
import { Renderable } from './UI';
import { KeypressAcceptor } from './Menu.js';
export abstract class View implements Renderable, KeypressAcceptor {

View File

@ -2,7 +2,7 @@ import { getTheme } from "@themes";
import { Game } from "../../Game.js";
import { progressbar } from "../../Progressbar.js";
import { PawnDetails } from "../PawnDetails.js";
import { panels } from "@ui";
import { panels } from "../UI";
import { View } from "../View.js";
export default class PawnsView extends View {

View File

@ -13,7 +13,7 @@
"@tasks": ["./src/registries/Tasks"],
"@items": ["./src/registries/Items"],
"@world": ["./src/World"],
"@ui": ["./src/ui/UI"],
"@ui": ["./src/term-ui/UI"],
"@game": ["./src/Game"]
},
"noImplicitAny": true