CS
public override void _GuiInput(InputEvent @event) {
	if (@event is not InputEventMouse @mouse) return;
	// 悬浮
	// @mouse...
	if (!(@event is InputEventMouseButton @button && @button.IsPressed())) return;
	// 按键事件
	// @button...
点击展开查看更多

版权声明

作者: Chaim

链接: https://chaim.eu.org/posts/guiinput%E9%BC%A0%E6%A0%87%E4%BA%8B%E4%BB%B6/

许可证: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.

开始搜索

输入关键词搜索文章内容

↑↓
ESC
⌘K 快捷键