0
我有兩個按鈕(A & B),我試圖讓我的代碼如此,當我點擊按鈕A然後點擊B,A將自己重置爲正常狀態(發佈)。每個按鈕有3個狀態:上,下和檢查。Libgdx以編程方式重置按鈕的狀態
if (one_h.isPressed()) {
//reset button 2 if pressed
two_h.getStyle().up = menuSkin10.getDrawable("200 released");
two_h.getStyle().down = menuSkin10.getDrawable("200 pressed");
two_h.getStyle().checked = menuSkin10.getDrawable("200 gray");
} else if (two_h.isPressed()) {
//reset button 1