An IMGUI inspired GUI Framework for javascript thats designed to be as simple to use as IMGUI.
目前為
此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/535798/1590637/ImmediateGUI.js
An IMGUI inspired GUI Framework for javascript thats designed to be as simple to use as IMGUI. Its actively developed, which means stuff might change and bugs (most definitely) will occur when using this
Supports most of the default controls one could need, can drag the gui around with the mouse, toggle between light/dark mode etc.
For how to use it, check the example code down below (and look at the code of the library)
Example Images (and pseudo code how they were made)


const gui = new ImmediateGUI({
theme: 'dark', /* or 'light' depending on what you want */
position: 'right', /* what side of the screen the form should display at by default */
width: 400,
draggable: true, /* true by default, so this can be omitted */
});
gui.Header("Image Downloader", 5);
gui.Separator();
gui.BeginSection("Filename Options");
const cbPreserveOriginalFilename = gui.Checkbox("Preserve original filename", false);
const txtNamePrefix = gui.Textbox("Filename Prefix");
const txtNameSuffix = gui.Textbox("Filename Suffix");
gui.EndSection();
gui.BeginSection("Advanced Options");
const cbHumanize = gui.Checkbox("Humanize Downloads", true);
const cbRequestlessDownload = gui.Checkbox("Attempt a requestless download for images", true);
gui.BeginIndentation();
const cbRequestLessParallel = gui.Checkbox("Use parallelism for requestless downloads", cbRequestlessDownload.checked);
gui.EndIndentation();
gui.BeginIndentation(2); // Custom indentation levels supported, this is 2 levels deep which is calculated as 2 * this.indentationSize (which defaults to 10 pixels)
const inputParallelChunkCount = gui.NumberInput("Parallel Chunk Count", 3, 1, (25 / 3) + 1);
gui.EndIndentation();
const cbRequestLessParallelModeCompability = gui.Checkbox("Parallel Compability Mode", true);
cbRequestLessParallelModeCompability.disabled = true;
gui.BeginIndentation();
const cbPreferWebpIfSupported = gui.Checkbox("Prefer WEBP images (if supported)", true);
gui.EndIndentation();
gui.EndSection();
gui.BeginSection();
const numFilenameIndexStart = gui.NumberInput("Start filename index at", -1, -1, 9999);
gui.Separator();
const inpStart = gui.NumberInput("Download Start Range", 1, 1, 25);
const inpEnd = gui.NumberInput("Download End Range", 25, 1, 25);
const btnDownload = gui.Button(`Download 25 Images`, async () => {
// Your button click event here
});
const btnDownloadRange = gui.Button(`Download Range (25 Images)`, async () => {
// Your button click event here
});
gui.EndSection();
gui.BeginIndentation();
gui.Checkbox("Play sound when downloads are done", true);
gui.EndIndentation();
// This shows the GUI to the user
gui.Show();