1- import { startFast , stopAll , stopFast } from '@/Core/controller/gamePlay/fastSkip' ;
1+ import { setFastButton , startFast , stopAll , stopFast } from '@/Core/controller/gamePlay/fastSkip' ;
22import { nextSentence } from '@/Core/controller/gamePlay/nextSentence' ;
33import { fastSaveGame } from '@/Core/controller/storage/fastSaveLoad' ;
44import { setStorage } from '@/Core/controller/storage/storageController' ;
@@ -10,7 +10,6 @@ import { setVisibility } from '@/store/GUIReducer';
1010import { RootState } from '@/store/store' ;
1111import { setOptionData } from '@/store/userDataReducer' ;
1212import styles from '@/UI/Backlog/backlog.module.scss' ;
13- import bottomControlPanelStyles from '@/UI/BottomControlPanel/bottomControlPanel.module.scss' ;
1413import throttle from 'lodash/throttle' ;
1514import { useCallback , useEffect , useRef } from 'react' ;
1615import { useDispatch } from 'react-redux' ;
@@ -141,17 +140,13 @@ export function useMouseWheel() {
141140 } else if ( isGameActive ( ) && direction === 'down' && ! ctrlKey ) {
142141 clearTimeout ( wheelTimeout ) ;
143142 // 已开启快进模式
144- if ( WebGAL . gameplay . fastInterval !== null ) {
145- clearInterval ( WebGAL . gameplay . fastInterval ) ;
146- WebGAL . gameplay . fastInterval = null ;
147- }
148- const autoIcon = document . getElementById ( 'Button_ControlPanel_fast' ) ;
143+ if ( WebGAL . gameplay . isFast ) stopFast ( ) ;
149144 WebGAL . gameplay . isFast = true ;
150145 // 滚轮视作快进
151- if ( autoIcon ) autoIcon . className = bottomControlPanelStyles . button_on ;
146+ setFastButton ( true ) ;
152147 setTimeout ( ( ) => {
153148 WebGAL . gameplay . isFast = false ;
154- if ( autoIcon ) autoIcon . className = bottomControlPanelStyles . singleButton ;
149+ setFastButton ( false ) ;
155150 } , 150 ) ;
156151 next ( ) ;
157152 }
0 commit comments