PluginName: SDJB_htmlACP
Author: ShadowDragon
===
TERMS OF USE ===
Free for Non-Commercial and Commercial use when credit is given.
credit one of the following:
ShadowDragon
ShadowDragonJB
Version + UPDATE'S
5-09-2023 Version 0.1.0 first release
09-04-2025 Version 0.2.0 re-factored and streamlined
===
WARNING ===
YOU ARE NOT ALLOWED TO REDISTRIBUTE OR SELL IT OR TAKE CODE FOR YOUR OWN.
DO NOT REMOVE THE HEADER.
I added function for my
SDJB_CheatEngine to make this work with it. so place this plugin on
the top of all other plugins.
This plugin adds a HTML Custom Alert, Confirm or Prompt box, which is better than default,
it should work in MZ, but I could not test it, but should not conflict with any plugin!
this plugin can be used as stand alone or be used in any plugin using the same setup
or through a parameter.
(when using as stand alone, it can be used in your own plugin using the same setup).
(see spoilers how they look like and are highly customisable)
Spoiler: Custom Alert, Confirm, Prompt
Alert box with no title and with title
Confirm Window with custom OK and Cancel names.
Custom Prompt window through event or by calling the CheatEngine
When you click outside the window from Alert, Confirm or Prompt Box
There are 2 setups, basic setup and Advanced setup (choose what you want!)
Basic Setup
Spoiler: Basic Alert
Basic Alert consist of "title" and "message"
JavaScript: - acp.open({
- title: "Give it a title",
- message: "Your message to show in the window"
- })
复制代码
Basic Prompt require "type" as default is "Alert"
JavaScript: - acp.open({
- type: "Prompt",
- title: "Give it a title",
- message: "Your message to show in the window",
- onAccept: (value) => {
- $gameVariables.setValue(x, value)
- $gameMessage.add("your variable x is \\v[4].")
- }
- })
复制代码
Keep in mind that "Prompt" and "Confirm" require JS knowledge to fire the onAccept function.
the same apply for onCancel function (leave empty if nothing happens.
the entire setup if you wish to use looks like this:
JavaScript:
- acp.open({
- type: "Alert",
- title: "Give it a title",
- message: "Your message to show in the window",
- headercolor: "#FF0000",
- okText: "OK",
- cancelText: "Cancel",
- onAccept: () => console.log("Your function when pressed on OK"),
- onCancel: () => console.log("Your function when pressed on Cancel")
- })
复制代码
Download from itch
You see you can change the headercolor (Red in this case), but you can use "rbga(255, 0, 0, 0.4)"
the last number is opacity (alpha color). use 1 for fully opacity.
本贴来自国际rpgmaker官方论坛作者:ShadowDragon处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/sdjb_htmlacp.160985/