File tree Expand file tree Collapse file tree
Core/util/coreInitialFunction Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ interface IWebgalConfig {
2121 enableExtra ?: boolean ; // 启用鉴赏功能
2222 enablePanic ?: boolean ; // 启用紧急回避
2323 enableLegacyExpressionBlendMode ?: boolean ; // 启用旧版 Live2D 表情混合模式
24+ textboxMaxLine ?: number ; // 文字框最大行数
25+ textboxLineHeight ?: number ; // 文字框行高
2426}
2527
2628/**
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ export default function IMSSTextbox(props: ITextboxProps) {
189189
190190 const userDataState = useSelector ( ( state : RootState ) => state . userData ) ;
191191 const lineHeightValue = textSizeState === textSize . medium ? 2.2 : 2 ;
192- const textLineHeight = userDataState . globalGameVar . LineHeight ;
192+ const textLineHeight = userDataState . globalGameVar . textboxLineHeight ;
193193 const finalTextLineHeight = textLineHeight ? Number ( textLineHeight ) : lineHeightValue ;
194194 const lineHeightCssStr = `line-height: ${ finalTextLineHeight } em` ;
195195 const lhCss = css ( lineHeightCssStr ) ;
Original file line number Diff line number Diff line change @@ -33,14 +33,14 @@ export const TextBox = () => {
3333 size = getTextSize ( stageState . showTextSize ) + '%' ;
3434 textSizeState = stageState . showTextSize ;
3535 }
36- const MaxTextLine = Number ( userDataState . globalGameVar . Max_line ) ; // congfig定义字体行数
37- const lineLimit = Number . isNaN ( MaxTextLine )
36+ const maxTextLine = Number ( userDataState . globalGameVar . textboxMaxLine ) ; // congfig定义字体行数
37+ const lineLimit = Number . isNaN ( maxTextLine )
3838 ? match ( textSizeState )
3939 . with ( textSize . small , ( ) => 3 )
4040 . with ( textSize . medium , ( ) => 2 )
4141 . with ( textSize . large , ( ) => 2 )
4242 . default ( ( ) => 2 )
43- : MaxTextLine ;
43+ : maxTextLine ;
4444 // 拆字
4545 const textArray = compileSentence ( stageState . showText , lineLimit ) ;
4646 const isHasName = stageState . showName !== '' ;
You can’t perform that action at this time.
0 commit comments