Project1
标题:
选中选项后字体怎么变色
[打印本页]
作者:
公仪治
时间:
2022-5-27 00:55
标题:
选中选项后字体怎么变色
在window_selectable里没有看到修改字体颜色的地方。
作者:
VIPArcher
时间:
2022-5-27 23:23
如果你是说要在显示选项里设置文本的颜色,那你可以用控制符例如 \c[1]
如果你是要光标选中的那行变色,那得改默认脚本,并且导致上面的控制符无法使用,不是很建议做这样的效果,
一定要这样做的话,可以参考如下代码
未测试
class Window_ChoiceList < Window_Command
def draw_item(index)
rect = item_rect_for_text(index)
change_color(index == self.index ? system_color : normal_color)
draw_text(rect.x, rect.y, rect.width, rect.height, command_name(index))
end
def update_cursor
super
refresh
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1