convert ui to term-ui
parent
5f193829c8
commit
6ea53cbefb
|
|
@ -6,7 +6,7 @@ const moduleAliases = {
|
||||||
"@tasks": "./out/src/registries/Tasks.js",
|
"@tasks": "./out/src/registries/Tasks.js",
|
||||||
"@items": "./out/src/registries/Items.js",
|
"@items": "./out/src/registries/Items.js",
|
||||||
"@world": "./out/src/World.js",
|
"@world": "./out/src/World.js",
|
||||||
"@ui": "./out/src/ui/UI.js",
|
"@ui": "./out/src/term-ui/UI.js",
|
||||||
"@game": "./out/src/Game.js"
|
"@game": "./out/src/Game.js"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,8 @@ import { DEBUG } from 'frigid/out/Serializable.js';
|
||||||
import { Pawn } from './Pawn.js';
|
import { Pawn } from './Pawn.js';
|
||||||
import { TaskList } from './TaskList.js';
|
import { TaskList } from './TaskList.js';
|
||||||
import { Inventory } from './Inventory.js';
|
import { Inventory } from './Inventory.js';
|
||||||
import { Menu } from './ui/Menu.js';
|
|
||||||
import Time, { Tickable } from './Time.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 { ready } from './multiplayer/mDNS.js';
|
||||||
import faker from 'faker';
|
import faker from 'faker';
|
||||||
import { World } from '@world';
|
import { World } from '@world';
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import { Serializable } from 'frigid';
|
import { Serializable } from 'frigid';
|
||||||
import { Game } from './Game.js';
|
import { Game } from './Game.js';
|
||||||
import { Item, ItemState } from './registries/Items.js';
|
import { Item, ItemState } from './registries/Items.js';
|
||||||
import { Popup } from './ui/Popup.js';
|
import { Renderable, Popup } from '@ui';
|
||||||
import { Renderable } from '@ui';
|
|
||||||
|
|
||||||
export class Inventory extends Serializable implements Renderable {
|
export class Inventory extends Serializable implements Renderable {
|
||||||
items: ItemState<any>[];
|
items: ItemState<any>[];
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import faker from 'faker';
|
||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import { Item } from '../registries/Items.js';
|
import { Item } from '../registries/Items.js';
|
||||||
import WebSocket from 'ws';
|
import WebSocket from 'ws';
|
||||||
import { Popup } from '../ui/Popup.js';
|
import { Popup } from '@ui';
|
||||||
import { inspect } from 'util'
|
import { inspect } from 'util'
|
||||||
import { Pawn } from '../Pawn.js';
|
import { Pawn } from '../Pawn.js';
|
||||||
import { Game } from '../Game.js';
|
import { Game } from '../Game.js';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Game } from "@game";
|
import { Game } from "@game";
|
||||||
import { boxStyle, getTheme } from "@themes";
|
import { boxStyle, getTheme } from "@themes";
|
||||||
import { panels } from "@ui";
|
import { panels } from "./UI.js";
|
||||||
import blessed from 'neo-blessed';
|
import blessed from 'neo-blessed';
|
||||||
import { quit, restart } from "../index.js";
|
import { quit, restart } from "../index.js";
|
||||||
|
|
||||||
|
|
@ -25,10 +25,6 @@ export class EscapeMenu {
|
||||||
top: 3,
|
top: 3,
|
||||||
left: 'center',
|
left: 'center',
|
||||||
width: 20,
|
width: 20,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
height: 'shrink',
|
height: 'shrink',
|
||||||
content: '',
|
content: '',
|
||||||
tags: true,
|
tags: true,
|
||||||
|
|
@ -5,7 +5,7 @@ import { ItemState } from '../registries/Items.js';
|
||||||
import { Player } from "../multiplayer/Player";
|
import { Player } from "../multiplayer/Player";
|
||||||
import { Pawn } from '../Pawn.js';
|
import { Pawn } from '../Pawn.js';
|
||||||
import { getTheme, boxStyle } from '@themes';
|
import { getTheme, boxStyle } from '@themes';
|
||||||
import { panels } from '@ui';
|
import { panels } from './UI.js';
|
||||||
|
|
||||||
export class GiftPopup {
|
export class GiftPopup {
|
||||||
box;
|
box;
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Pawn } from '../Pawn.js';
|
import { Pawn } from '../Pawn.js';
|
||||||
import { panels, Renderable } from '@ui';
|
import { panels, Renderable } from './UI.js';
|
||||||
import { Game } from '../Game.js';
|
import { Game } from '../Game.js';
|
||||||
import { progressbar, stats } from '../Progressbar.js';
|
import { progressbar, stats } from '../Progressbar.js';
|
||||||
import { Popup } from './Popup.js';
|
import { Popup } from './Popup.js';
|
||||||
|
|
@ -4,7 +4,7 @@ import { Game } from '../Game.js';
|
||||||
import { stringify } from '../Memory.js';
|
import { stringify } from '../Memory.js';
|
||||||
import { Pawn } from '../Pawn.js';
|
import { Pawn } from '../Pawn.js';
|
||||||
import Time from '../Time.js';
|
import Time from '../Time.js';
|
||||||
import { panels } from '@ui';
|
import { panels } from './UI.js';
|
||||||
import { boxStyle } from '@themes';
|
import { boxStyle } from '@themes';
|
||||||
|
|
||||||
export class PawnDetails {
|
export class PawnDetails {
|
||||||
|
|
@ -2,7 +2,7 @@ import chalk from 'chalk';
|
||||||
import blessed from 'neo-blessed';
|
import blessed from 'neo-blessed';
|
||||||
import { Game } from '../Game.js';
|
import { Game } from '../Game.js';
|
||||||
import { boxStyle, getTheme } from '@themes';
|
import { boxStyle, getTheme } from '@themes';
|
||||||
import { panels } from '@ui';
|
import { panels } from './UI.js';
|
||||||
|
|
||||||
export class Popup {
|
export class Popup {
|
||||||
box;
|
box;
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Game } from "@game";
|
import { Game } from "@game";
|
||||||
import { ItemState } from "@items";
|
import { ItemState } from "@items";
|
||||||
import { boxStyle, getTheme } from "@themes";
|
import { boxStyle, getTheme } from "@themes";
|
||||||
import { panels } from "@ui";
|
import { panels } from "./UI";
|
||||||
import EventEmitter from "events";
|
import EventEmitter from "events";
|
||||||
import blessed from 'neo-blessed';
|
import blessed from 'neo-blessed';
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Renderable, RenderMode } from '@ui';
|
import { Renderable, RenderMode } from './UI';
|
||||||
import { KeypressAcceptor } from './Menu.js';
|
import { KeypressAcceptor } from './Menu.js';
|
||||||
import { getTheme } from '@themes';
|
import { getTheme } from '@themes';
|
||||||
|
|
||||||
|
|
@ -3,6 +3,7 @@ import blessed from 'neo-blessed';
|
||||||
import ansi from 'sisteransi';
|
import ansi from 'sisteransi';
|
||||||
import { boxStyle, getTheme } from '@themes';
|
import { boxStyle, getTheme } from '@themes';
|
||||||
export { Popup } from './Popup.js';
|
export { Popup } from './Popup.js';
|
||||||
|
export { Menu } from './Menu.js'
|
||||||
|
|
||||||
export interface Renderable {
|
export interface Renderable {
|
||||||
render(mode?: RenderMode): string
|
render(mode?: RenderMode): string
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Renderable } from '@ui';
|
import { Renderable } from './UI';
|
||||||
import { KeypressAcceptor } from './Menu.js';
|
import { KeypressAcceptor } from './Menu.js';
|
||||||
|
|
||||||
export abstract class View implements Renderable, KeypressAcceptor {
|
export abstract class View implements Renderable, KeypressAcceptor {
|
||||||
|
|
@ -2,7 +2,7 @@ import { getTheme } from "@themes";
|
||||||
import { Game } from "../../Game.js";
|
import { Game } from "../../Game.js";
|
||||||
import { progressbar } from "../../Progressbar.js";
|
import { progressbar } from "../../Progressbar.js";
|
||||||
import { PawnDetails } from "../PawnDetails.js";
|
import { PawnDetails } from "../PawnDetails.js";
|
||||||
import { panels } from "@ui";
|
import { panels } from "../UI";
|
||||||
import { View } from "../View.js";
|
import { View } from "../View.js";
|
||||||
|
|
||||||
export default class PawnsView extends View {
|
export default class PawnsView extends View {
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
"@tasks": ["./src/registries/Tasks"],
|
"@tasks": ["./src/registries/Tasks"],
|
||||||
"@items": ["./src/registries/Items"],
|
"@items": ["./src/registries/Items"],
|
||||||
"@world": ["./src/World"],
|
"@world": ["./src/World"],
|
||||||
"@ui": ["./src/ui/UI"],
|
"@ui": ["./src/term-ui/UI"],
|
||||||
"@game": ["./src/Game"]
|
"@game": ["./src/Game"]
|
||||||
},
|
},
|
||||||
"noImplicitAny": true
|
"noImplicitAny": true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue