Skip to content

Commit 064da5a

Browse files
committed
v0.4 Alpha
1 parent fe40c81 commit 064da5a

File tree

5 files changed

+37
-25
lines changed

5 files changed

+37
-25
lines changed

libraries/src/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export async function startApp() {
2424
console.log(chalk.yellow("Ffmpeg is not installed, you can install in 'more options'"));
2525
}
2626

27-
await show(async ({ buffer, readkey, consolekeys }) => {
27+
/*await show(async ({ buffer, readkey, consolekeys }) => {
2828
buffer.secondary();
2929
buffer.clear();
3030
let grid = new Grid();
@@ -60,7 +60,7 @@ export async function startApp() {
6060
6161
buffer.primary();
6262
});
63-
return;
63+
return;*/
6464
let option = await show(mainMenu);
6565
let optionPage = null;
6666

libraries/src/binder.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,16 @@ async function bindDirectoryButtons(project, buttons) {
208208
}
209209

210210
export async function bindButtons(project, buttons) {
211+
let fileAssoc = constants.regkey;
211212
let ext = project.ext;
212213
if (project.ext === "[dir]") {
213-
return bindDirectoryButtons(project, buttons);
214+
return bindDirectory(project, button, location);
214215
} else if (project.ext !== "*") {
215216
ext = "." + project.ext;
216217
}
217-
let rawRoot = `${constants.regkey}/${ext}/shell`;
218+
let fileAssocExt = `${fileAssoc}/${ext}`;
219+
let rawRoot = `${fileAssocExt}/shell`;
220+
218221
let extRoot;
219222
try {
220223
extRoot = registry(rawRoot);

libraries/src/gui/IRenderable.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ export default class IRenderable {
874874
this._nominal.scrollX = Math.max(0, this._nominal.scrollX - 1);
875875
}
876876

877-
streamConsoleViewportAsync = async (getViewport, cancelCallback) => {
877+
streamConsoleViewportAsync = async (cancelCallback) => {
878878
const { readkey, consolekeys, cursor } = useContext();
879879

880880
let loop = true;
@@ -885,13 +885,9 @@ export default class IRenderable {
885885
if (cancelCallback) cancelCallback(cancel);
886886

887887
while (loop) {
888-
if (getViewport === undefined || getViewport === null) {
889-
console.clear();
890-
cursor.hide();
891-
this.useConsoleViewport();
892-
} else {
893-
this.setViewport(getViewport());
894-
}
888+
console.clear();
889+
cursor.hide();
890+
this.useConsoleViewport();
895891

896892
this.focus();
897893
this.show();

libraries/src/gui/grid2.js

+25-12
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,20 @@ export default class Grid extends IRenderableWithChildren {
77
super("Grid");
88
}
99

10-
columns = 3;
11-
rows = 3;
12-
gapX = 2;
10+
columns = this.sizes.UNSET;
11+
rows = this.sizes.UNSET;
12+
gapX = 1;
1313
gapY = 1;
14+
gapRatio = [1, 1];
15+
16+
getSizingType() {
17+
if (this.columns === this.sizes.UNSET) {
18+
}
19+
if (this.rows === this.sizes.UNSET) {
20+
}
21+
22+
}
23+
1424

1525
render() {
1626
let { width, height } = this.getSize();
@@ -23,36 +33,39 @@ export default class Grid extends IRenderableWithChildren {
2333
*/
2434

2535
let cBuffers = this.renderChildren();
26-
let cSizes = this.getChildrenSizes();
2736

37+
/*
38+
let cBuffers = this.renderChildren();
39+
let cSizes = this.getChildrenSizes();
40+
2841
let cellWidth = Math.floor((width - (this.columns - 1) * this.gapX) / this.columns);
2942
let cellHeight = Math.floor((height - (this.rows - 1) * this.gapY) / this.rows);
30-
43+
3144
for (let row = 0; row < this.rows; row++) {
3245
for (let rowHeight = 0; rowHeight < cellHeight; rowHeight++) {
3346
let tempBuffer = [];
3447
for (let col = 0; col < this.columns; col++) {
3548
let tempStringBuffer = "";
36-
49+
3750
let _cellWidth = cellWidth;
38-
51+
3952
if (col === this.columns - 1) {
4053
// this is last, check and make sure the column widths + gaps are equal to the width of the grid
4154
let totalWidth = cellWidth * this.columns + this.gapX * (this.columns - 1);
4255
let remainingWidth = width - totalWidth;
4356
_cellWidth += remainingWidth;
4457
}
45-
58+
4659
//tempStringBuffer += s("", _cellWidth, "A");
4760
repeat(_cellWidth, () => {
4861
tempStringBuffer += chalk.bgYellow("A");
4962
});
50-
51-
63+
64+
5265
if (col !== this.columns - 1) {
5366
tempStringBuffer += " ".repeat(this.gapX);
5467
}
55-
68+
5669
tempBuffer.push(tempStringBuffer);
5770
}
5871
this.fillOnce(tempBuffer.join(""));
@@ -62,7 +75,7 @@ export default class Grid extends IRenderableWithChildren {
6275
this.fillOnce(" ");
6376
}
6477
}
65-
}
78+
}*/
6679

6780
//this.fillOnce(largestLength.toString());
6881
//this.fillOnce(widths.join(","));

menuify.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
echo Launching...
33
title Loading...
44
:: Check / Get administrator privelages
5-
if not "%1"=="am_admin" ("powershell" start -verb runas '%0' -argumentList am_admin,"yes" & exit /b)
5+
if not "%1"=="am_admin" ("powershell" start -verb runas ""%0"" -argumentList am_admin,"yes" & exit /b)
66
if not "%2"=="" (
77
cls
88
cd /d "%~dp0"

0 commit comments

Comments
 (0)