3
3
using Microsoft . Xna . Framework ;
4
4
using Microsoft . Xna . Framework . Graphics ;
5
5
using Microsoft . Xna . Framework . Input ;
6
+ using StardewModdingAPI ;
6
7
using StardewValley ;
7
8
using StardewValley . BellsAndWhistles ;
8
9
using StardewValley . Menus ;
@@ -151,14 +152,14 @@ public void RepositionItems() {
151
152
currentTab = Utility . Clamp ( currentTab , 0 , ( categoryItems [ currentPage ] . Count - 1 ) / itemsPerCategoryPage ) ;
152
153
}
153
154
154
- protected virtual void customSnapBehavior ( int direction , int oldRegion , int oldID ) {
155
+ protected override void customSnapBehavior ( int direction , int oldRegion , int oldID ) {
155
156
if ( oldID != 103 || direction != 1 || ! showForwardButton ( ) )
156
157
return ;
157
158
currentlySnappedComponent = getComponentWithID ( 102 ) ;
158
159
snapCursorToCurrentSnappedComponent ( ) ;
159
160
}
160
161
161
- public virtual void snapToDefaultClickableComponent ( ) {
162
+ public override void snapToDefaultClickableComponent ( ) {
162
163
if ( currentPage != - 1 )
163
164
currentlySnappedComponent = getComponentWithID ( 103 ) ;
164
165
else
@@ -256,7 +257,7 @@ public string getCategoryName(int index) {
256
257
}
257
258
}
258
259
259
- public virtual void update ( GameTime time ) {
260
+ public override void update ( GameTime time ) {
260
261
base . update ( time ) ;
261
262
if ( _hasFinished ) {
262
263
shipItems ( ) ;
@@ -451,13 +452,13 @@ public string getCategorySound(int which) {
451
452
}
452
453
}
453
454
454
- public virtual void applyMovementKey ( int direction ) {
455
+ public override void applyMovementKey ( int direction ) {
455
456
if ( ! CanReceiveInput ( ) )
456
457
return ;
457
458
base . applyMovementKey ( direction ) ;
458
459
}
459
460
460
- public virtual void performHoverAction ( int x , int y ) {
461
+ public override void performHoverAction ( int x , int y ) {
461
462
if ( ! CanReceiveInput ( ) )
462
463
return ;
463
464
base . performHoverAction ( x , y ) ;
@@ -476,7 +477,7 @@ public bool CanReceiveInput() {
476
477
return introTimer <= 0 && ! outro ;
477
478
}
478
479
479
- public virtual void receiveKeyPress ( Keys key ) {
480
+ public override void receiveKeyPress ( Keys key ) {
480
481
if ( ! CanReceiveInput ( ) )
481
482
return ;
482
483
if ( introTimer <= 0 && ! Game1 . options . gamepadControls && ( key . Equals ( ( Keys ) 27 ) ||
@@ -492,7 +493,7 @@ public virtual void receiveKeyPress(Keys key) {
492
493
}
493
494
}
494
495
495
- public virtual void receiveGamePadButton ( Buttons b ) {
496
+ public override void receiveGamePadButton ( Buttons b ) {
496
497
if ( ! CanReceiveInput ( ) )
497
498
return ;
498
499
base . receiveGamePadButton ( b ) ;
@@ -528,7 +529,7 @@ private void okClicked() {
528
529
Game1 . changeMusicTrack ( "none" ) ;
529
530
}
530
531
531
- public virtual void receiveLeftClick ( int x , int y , bool playSound = true ) {
532
+ public override void receiveLeftClick ( int x , int y , bool playSound = true ) {
532
533
if ( ! CanReceiveInput ( ) )
533
534
return ;
534
535
if ( outro && ! savedYet ) {
@@ -593,18 +594,20 @@ public virtual void receiveLeftClick(int x, int y, bool playSound = true) {
593
594
}
594
595
}
595
596
596
- public virtual void receiveRightClick ( int x , int y , bool playSound = true ) { }
597
+ public override void receiveRightClick ( int x , int y , bool playSound = true ) { }
597
598
598
599
public bool showForwardButton ( ) {
599
600
return categoryItems [ currentPage ] . Count > itemsPerCategoryPage * ( currentTab + 1 ) ;
600
601
}
601
602
602
- public virtual void gameWindowSizeChanged ( Rectangle oldBounds , Rectangle newBounds ) {
603
+ public override void gameWindowSizeChanged ( Rectangle oldBounds , Rectangle newBounds ) {
603
604
initialize ( 0 , 0 , Game1 . viewport . Width , Game1 . viewport . Height ) ;
604
605
RepositionItems ( ) ;
605
606
}
606
607
607
- public virtual void draw ( SpriteBatch b ) {
608
+ public override void draw ( SpriteBatch b )
609
+ {
610
+ SaveAnywhere . ModMonitor . Log ( "Test" , LogLevel . Debug ) ;
608
611
if ( Game1 . wasRainingYesterday ) {
609
612
b . Draw ( Game1 . mouseCursors , new Rectangle ( 0 , 0 , Game1 . viewport . Width , Game1 . viewport . Height ) ,
610
613
new Rectangle ( 639 , 858 , 1 , 184 ) ,
0 commit comments