diff --git a/doc/events/monitor_resize.md b/doc/events/monitor_resize.md index 0bd4ef98e..bbc72be08 100644 --- a/doc/events/monitor_resize.md +++ b/doc/events/monitor_resize.md @@ -8,7 +8,7 @@ SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers SPDX-License-Identifier: MPL-2.0 --> -The [`monitor_resize`] event is fired when an adjacent or networked monitor's size is changed. +The [`monitor_resize`] event is fired when an adjacent or networked [monitor's][`monitor`] size is changed. ## Return Values 1. [`string`]: The event name. diff --git a/doc/events/monitor_touch.md b/doc/events/monitor_touch.md index 400b57881..099ffd719 100644 --- a/doc/events/monitor_touch.md +++ b/doc/events/monitor_touch.md @@ -8,7 +8,7 @@ SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers SPDX-License-Identifier: MPL-2.0 --> -The [`monitor_touch`] event is fired when an adjacent or networked Advanced Monitor is right-clicked. +The [`monitor_touch`] event is fired when an adjacent or networked [Advanced Monitor][`monitor`] is right-clicked. ## Return Values 1. [`string`]: The event name. diff --git a/projects/common/src/main/java/dan200/computercraft/shared/peripheral/monitor/MonitorPeripheral.java b/projects/common/src/main/java/dan200/computercraft/shared/peripheral/monitor/MonitorPeripheral.java index 8e44aa0e0..c07bfb41e 100644 --- a/projects/common/src/main/java/dan200/computercraft/shared/peripheral/monitor/MonitorPeripheral.java +++ b/projects/common/src/main/java/dan200/computercraft/shared/peripheral/monitor/MonitorPeripheral.java @@ -21,7 +21,11 @@ * Monitors act as [terminal redirects][`term.Redirect`] and so expose the same methods, as well as several additional * ones, which are documented below. *

- * Like computers, monitors come in both normal (no colour) and advanced (colour) varieties. + * If the monitor is resized (by adding new blocks to the monitor, or by calling {@link setTextScale}), then a + * [`monitor_resize`] event will be queued. + *

+ * Like computers, monitors come in both normal (no colour) and advanced (colour) varieties. Advanced monitors be right + * clicked, which will trigger a [`monitor_touch`] event. *

* ## Recipes *

@@ -37,6 +41,9 @@ * monitor.setCursorPos(1, 1) * monitor.write("Hello, world!") * } + * + * @cc.see monitor_resize Queued when a monitor is resized. + * @cc.see monitor_touch Queued when an advanced monitor is clicked. */ public class MonitorPeripheral extends TermMethods implements IPeripheral { private final MonitorBlockEntity monitor;