Skip to content

Commit

Permalink
Link to monitor events from the main monitor page
Browse files Browse the repository at this point in the history
  • Loading branch information
SquidDev committed Nov 28, 2024
1 parent ea670cc commit fdb65c9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/events/monitor_resize.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion doc/events/monitor_touch.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <p>
* 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.
* <p>
* 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.
* <p>
* ## Recipes
* <div class="recipe-container">
Expand All @@ -37,6 +41,9 @@
* monitor.setCursorPos(1, 1)
* monitor.write("Hello, world!")
* }</pre>
*
* @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;
Expand Down

0 comments on commit fdb65c9

Please sign in to comment.