Mouse 4 as back 图标

Mouse 4 as back

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0+1.21-1.21.5
本资源为搬运资源,原资源地址: https://modrinth.com/mod/mouse-4-as-back
资源信息

Minecraft 版本: 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5

平台: fabric

标签: game-mechanics management utility

资源介绍

Adds a new keybind that makes you go back to the previous screen.

It has 4 ways of finding the previous screen.

It first tries to find any buttons on screen that in the en_us language, has any of these words as its title: back, return, done, cancel. If it finds any button that only contain one of those words, then it will click that.

If that fails, it tries to check the screen class. Some screens store a variable to remember the previous screen it was on. Think going from the video settings subscreen back to the settings screen. The mod tries to find any field that is named the following:
previous, previousscreen, lastscreen, parent, parentscreen. These variable names are taken from any vanilla screen class I can find. If you have suggestions of ones to add then im all ears.

If that fails. It tries to go to the extending class. Some classes extend other classes and the class they extend may store a variable to the previous screen. So it tries to search with a depth of 7, arbitrarily chosen, and does the field technique described above.

If all of that fails, it tries calling the close method, basically just pressing escape.

If you are for some reason wondering, as a mod dev, on how to make sure this mod works. Then just simple have either a button that only has the text being: back, return, done, cancel. Or store a previous screen variable as previous, lastscreen, previousscreen, parent, parentscreen

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
NetherPortalHelper

价格:0 墨喵币
下载量:0

查看详情
Starry GUI and Hotbar ✨

价格:0 墨喵币
下载量:0

查看详情
Horror Reborn

价格:0 墨喵币
下载量:0

查看详情
Ingot UI - White Version

价格:0 墨喵币
下载量:0

查看详情