Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
term.clear();
term.singleLineMenu(items1, options, (error: any, response: any) => {
term("\n").eraseLineAfter.green(
"#%s selected: %s (%s,%s)\n",
response.selectedIndex,
response.selectedText,
response.x,
response.y
);
});
term.cyan("The hall is spacious. Someone lighted few chandeliers.\n");
term.cyan("There are doorways south and west.\n");
const items2 = ["a. Go south", "b. Go west", "c. Go back to the street"];
term.singleColumnMenu(items2, (error: any, response: any) => {
term("\n").eraseLineAfter.green(
"#%s selected: %s (%s,%s)\n",
response.selectedIndex,
response.selectedText,
response.x,
response.y
);
});
term.cyan("Choose a file:\n");
const items = fs.readdirSync(process.cwd());
term.cyan("The hall is spacious. Someone lighted few chandeliers.\n");
term.cyan("There are doorways south and west.\n");
const items2 = ["a. Go south", "b. Go west", "c. Go back to the street"];
term.singleColumnMenu(items2, (error: any, response: any) => {
term("\n").eraseLineAfter.green(
"#%s selected: %s (%s,%s)\n",
response.selectedIndex,
response.selectedText,
response.x,
response.y
);
});
term.cyan("Choose a file:\n");
const items = fs.readdirSync(process.cwd());
term.gridMenu(items, (error: any, response: any) => {
term("\n").eraseLineAfter.green(
"#%s selected: %s (%s,%s)\n",
response.selectedIndex,
response.selectedText,
response.x,
response.y
);
});
let progressBar: Terminal.ProgressBarController;
let progress = 0;
selectedStyle: term.dim.blue.bgGreen
};
term.clear();
term.singleLineMenu(items1, options, (error: any, response: any) => {
term("\n").eraseLineAfter.green(
"#%s selected: %s (%s,%s)\n",
response.selectedIndex,
response.selectedText,
response.x,
response.y
);
});
term.cyan("The hall is spacious. Someone lighted few chandeliers.\n");
term.cyan("There are doorways south and west.\n");
const items2 = ["a. Go south", "b. Go west", "c. Go back to the street"];
term.singleColumnMenu(items2, (error: any, response: any) => {
term("\n").eraseLineAfter.green(
"#%s selected: %s (%s,%s)\n",
response.selectedIndex,
response.selectedText,
response.x,
response.y
);
});
term.cyan("Choose a file:\n");
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
"use strict" ;
var term = require( 'terminal-kit' ).terminal ;
var fs = require( 'fs' ) ;
term.cyan( 'Choose a file:\n' ) ;
var items = fs.readdirSync( process.cwd() ) ;
term.gridMenu( items , function( error , response ) {
term( '\n' ).eraseLineAfter.green(
"#%s selected: %s (%s,%s)\n" ,
response.selectedIndex ,
response.selectedText ,
response.x ,
response.y
) ;
process.exit() ;
} ) ;
* @param nativename Name of the native fivem
*
* @return void
*/
public static onFileUpdate = (stats: { native: { total: number; current: number } }, filename: String, nativename: String): void => {
stats.native.current++;
term.yellow("[File : " + filename + " ]\n");
term.magenta("[Native : " + nativename + " ]\n");
if (stats.native.current == stats.native.total)
process.exit();
};
}
term.cyan('Welcome to the native completion generator tool for Jetbrain IDEs for cfx.re projects.\n');
term.cyan('Please select the game concerned.\n');
let items = [
'1. FiveM',
'2. RedM',
];
term.singleColumnMenu(items, function (error, response) {
switch (response.selectedIndex) {
case 0:
new Main.onEnable("build/cfx/fivem", GamesType.FiveM);
break;
case 1:
new Main.onEnable("build/cfx/redm", GamesType.RedM);
break;
default:
*
* @return void
*/
public static onFileUpdate = (stats: { native: { total: number; current: number } }, filename: String, nativename: String): void => {
stats.native.current++;
term.yellow("[File : " + filename + " ]\n");
term.magenta("[Native : " + nativename + " ]\n");
if (stats.native.current == stats.native.total)
process.exit();
};
}
term.cyan('Welcome to the native completion generator tool for Jetbrain IDEs for cfx.re projects.\n');
term.cyan('Please select the game concerned.\n');
let items = [
'1. FiveM',
'2. RedM',
];
term.singleColumnMenu(items, function (error, response) {
switch (response.selectedIndex) {
case 0:
new Main.onEnable("build/cfx/fivem", GamesType.FiveM);
break;
case 1:
new Main.onEnable("build/cfx/redm", GamesType.RedM);
break;
default:
new Main.onEnable("build/cfx/fivem", GamesType.FiveM);
lines.forEach((line) => {
if(line.backgroundLineNum < state.top || line.backgroundLineNum >= endLine) {
return;
}
let y = line.backgroundLineNum - state.top + state.headerHeight + 1;
let x = background[line.backgroundLineNum].length + 1;
term.moveTo(x, y);
if(line.value) {
switch(line.type) {
case 'string':
term.yellow('"'+line.value+'"');
break;
case 'number':
term.cyan(line.value);
break;
case 'boolean':
term.magenta(line.value);
break;
case 'json':
term.colorRgb(150, 200, 255, line.value);
break;
default:
term(line.value);
break;
}
}
else if(line.empty) {
term.yellow('""');
}
public static onFolderGenerate = (response: void) => {
term.cyan("Create build directory successfully : " + response);
};
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
"use strict" ;
var term = require( 'terminal-kit' ).terminal ;
term.cyan( 'The hall is spacious. Someone lighted few chandeliers.\n' ) ;
term.cyan( 'There are doorways south and west.\n' ) ;
var items = [
'a. Go south' ,
'b. Go west' ,
'c. Go back to the street'
] ;
term.singleColumnMenu( items , function( error , response ) {
term( '\n' ).eraseLineAfter.green(
"#%s selected: %s (%s,%s)\n" ,
response.selectedIndex ,
response.selectedText ,
response.x ,
response.y
) ;
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
"use strict" ;
var term = require( 'terminal-kit' ).terminal ;
term.clear() ;
term.cyan( 'Where will you go?\n' ) ;
var items = [
'a. Go north' ,
'b. Go south' ,
'c. Go east' ,
'd. Go west'
] ;
var menu = term.singleColumnMenu( items , { continueOnSubmit: true } ) ;
menu.on( 'submit' , data => {
term.saveCursor() ;
term.moveTo( 1 , term.height - 1 , "Submit: %s" , data.selectedText ) ;
term.restoreCursor() ;
} ) ;