【发布时间】:2015-07-27 04:14:00
【问题描述】:
我正在处理我的菜单,这里有几个玩家可以选择的类(表示为 GUI 按钮)。我已经让它们在悬停时突出显示,并且在选择一个类时它也会注册。
我不知道如何解决的问题是,我希望选定的类在单击后保持“悬停”状态,以便它保持突出显示并且玩家知道他已经选择了该类。
if (GUI.Button (new Rect (Screen.width / 2 - 625, 500, 200, 30), "The Cunning", buttonStyle))
{
classValgt = "1";
// Some code here that makes the button appear as if hovered with the effects I added via my GUI style
}
【问题讨论】:
标签: c# user-interface unity3d