作者:rebot | 分类:模组
Minecraft 版本: 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11
平台: fabric
标签: utility
A powerful and flexible keystrokes display mod for Minecraft Fabric, featuring a unique Lua-based engine for deep visual customization.
.lua files to config/keystrokes/ThemeManager/..jar file into your mods folder.config/keystrokes/ThemeManager/ folder to tweak the default scripts or add new ones.Creating a theme is easy. Just create a .lua file in the config/keystrokes/ThemeManager/ folder. Here is a starter template:
-- Save this as "my_custom_theme.lua" in config/keystrokes/ThemeManager/
-- Optional: This runs once when the theme is loaded or selected
function onThemeLoad()
-- Sets the default color of the menu sliders (R, G, B, A)
setMenuColor(255, 165, 0, 255) -- Default to Orange
end
-- This runs every frame for every key and mouse button
-- Parameters: label (String), isPressed (Boolean), x, y, w, h (Position/Size), r, g, b, a (Menu Colors)
function renderKey(label, isPressed, x, y, w, h, r, g, b, a)
-- Combine the R, G, B, A values from the menu into a single color
local menuColor = bit.bor(bit.lshift(a, 24), bit.lshift(r, 16), bit.lshift(g, 8), b)
if isPressed then
-- Draw a solid background using the menu color
fill(x, y, w, h, menuColor)
-- Tell the mod to draw the text in Black
setTextColor(0xFF000000)
else
-- Draw a semi-transparent black background when not pressed
fill(x, y, w, h, 0x80000000)
-- Tell the mod to draw the text in White
setTextColor(0xFFFFFFFF)
end
end请登录后举报
暂无评论,抢个沙发吧~