1
1
package Flameborn .InSpire .Access ;
2
2
3
+ import Flameborn .InSpire .InSpire ;
3
4
import Flameborn .InSpire .utils .Reflection ;
4
5
import Flameborn .InSpire .utils .Speech ;
6
+ import com .megacrit .cardcrawl .core .CardCrawlGame ;
5
7
import com .megacrit .cardcrawl .helpers .Hitbox ;
6
8
import java .util .ArrayList ;
7
9
@@ -21,6 +23,7 @@ public void add(Object item, AObject.Types type) {
21
23
obj .type = type ;
22
24
if (Reflection .hasField (item , "label" ) && Reflection .isPrivate (item , "label" )) {
23
25
obj .label = (String ) Reflection .getPrivate (item , item .getClass (), "label" );
26
+ InSpire .logger .info (obj .label );
24
27
}
25
28
this .items .add (obj );
26
29
}
@@ -31,8 +34,7 @@ public AObject curItem() {
31
34
32
35
public void readCurItem () {
33
36
AObject o = this .curItem ();
34
- this .handleHitbox (o .hb );
35
- Speech .speak (o .label );
37
+ Speech .speak (o .label , true );
36
38
}
37
39
38
40
public void handleHitbox (Hitbox hb ) {
@@ -42,13 +44,27 @@ public void handleHitbox(Hitbox hb) {
42
44
43
45
public void prevItem () {
44
46
this .index --;
45
- if (this .index < 0 ) this .index = 0 ;
47
+ if (this .index < 0 ) {
48
+ this .index = 0 ;
49
+ return ;
50
+ }
46
51
this .readCurItem ();
52
+ CardCrawlGame .sound .play ("UI_HOVER" , 0.75f );
47
53
}
48
54
49
55
public void nextItem () {
50
56
this .index ++;
51
- if (this .index > items .size () - 1 ) this .index = this .items .size () - 1 ;
57
+ if (this .index > items .size () - 1 ) {
58
+ this .index = this .items .size () - 1 ;
59
+ return ;
60
+ }
52
61
this .readCurItem ();
62
+ CardCrawlGame .sound .play ("UI_HOVER" );
63
+ }
64
+
65
+ public void activateItem () {
66
+ if (this .curItem ().hb == null ) return ;
67
+ CardCrawlGame .sound .playA ("UI_CLICK_1" , -0.1f );
68
+ this .curItem ().hb .clicked = true ;
53
69
}
54
70
}
0 commit comments