Compare commits
	
		
			No commits in common. "cc07f6a03c461f519109ea5945a8ea2a8fa910fa" and "a40bbd7cf694a8da19b56e3712d3be8dcdfa40e9" have entirely different histories.
		
	
	
		
			cc07f6a03c
			...
			a40bbd7cf6
		
	
		
| @ -40,6 +40,8 @@ div.behavior-list { | |||||||
|                 z-index: 1; |                 z-index: 1; | ||||||
| 
 | 
 | ||||||
|                 div.behavior-popup-layout { |                 div.behavior-popup-layout { | ||||||
|  |                     transition: opacity 150ms cubic-bezier(0, 0, 1, 1), | ||||||
|  |                                 width 220ms cubic-bezier(.1, .9, .2, 1); | ||||||
|                     width: 0; |                     width: 0; | ||||||
|                     opacity: 0; |                     opacity: 0; | ||||||
|                     height: 100%; |                     height: 100%; | ||||||
|  | |||||||
| @ -1,26 +0,0 @@ | |||||||
| 
 |  | ||||||
| div.behavior-picker-list { |  | ||||||
|     width: 100%; |  | ||||||
|     max-width: 400px; |  | ||||||
| 
 |  | ||||||
|     div.behavior-picker-line { |  | ||||||
|         width: 100%; |  | ||||||
|         padding: 0 !important; |  | ||||||
|         display: flex !important; |  | ||||||
|         justify-content: flex-start !important; |  | ||||||
| 
 |  | ||||||
|         div.behavior-picker-line-color-view { |  | ||||||
|             width: 0; |  | ||||||
|             max-width: 0; |  | ||||||
|             height: 100%; |  | ||||||
| 
 |  | ||||||
|             div { |  | ||||||
|                 width: 0; |  | ||||||
|                 height: 0; |  | ||||||
|                 border-bottom: 10px solid transparent; |  | ||||||
|                 position: relative; |  | ||||||
|                 z-index: 2; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,49 +0,0 @@ | |||||||
| import { DetailsList } from "@Component/DetailsList/DetailsList"; |  | ||||||
| import { Component, ReactNode } from "react"; |  | ||||||
| import { Behavior } from "@Model/Behavior"; |  | ||||||
| import "./BehaviorPicker.scss"; |  | ||||||
| 
 |  | ||||||
| interface IBehaviorPickerProps { |  | ||||||
|     behavior: Behavior[] |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| class BehaviorPicker extends Component<IBehaviorPickerProps> { |  | ||||||
| 
 |  | ||||||
|     private getData() { |  | ||||||
|         let data: Array<{key: string, behavior: Behavior}> = []; |  | ||||||
|         for (let i = 0; i < this.props.behavior.length; i++) { |  | ||||||
|             data.push({ |  | ||||||
|                 key: this.props.behavior[i].id, |  | ||||||
|                 behavior: this.props.behavior[i] |  | ||||||
|             }) |  | ||||||
|         } |  | ||||||
|         return data; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private renderColor(color: string): ReactNode { |  | ||||||
|         return <div className="behavior-picker-line-color-view"> |  | ||||||
|             <div style={{ borderLeft: `10px solid ${color}` }}/> |  | ||||||
|         </div>     |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private renderLine = (behavior: Behavior): ReactNode => { |  | ||||||
|         return <> |  | ||||||
|             {this.renderColor(behavior.color)} |  | ||||||
|         </>; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public render(): ReactNode { |  | ||||||
|         return <DetailsList |  | ||||||
|             hideCheckBox |  | ||||||
|             className="behavior-picker-list" |  | ||||||
|             items={this.getData()} |  | ||||||
|             columns={[{ |  | ||||||
|                 className: "behavior-picker-line", |  | ||||||
|                 key: "behavior", |  | ||||||
|                 render: this.renderLine |  | ||||||
|             }]} |  | ||||||
|         /> |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| export { BehaviorPicker }; |  | ||||||
| @ -77,14 +77,10 @@ class BehaviorPopupComponent extends Component< | |||||||
|     private renderBehaviors = (behaviors: ICategoryBehavior, first: boolean) => { |     private renderBehaviors = (behaviors: ICategoryBehavior, first: boolean) => { | ||||||
| 
 | 
 | ||||||
|         let language = this.props.setting?.language ?? "EN_US"; |         let language = this.props.setting?.language ?? "EN_US"; | ||||||
|         let filterReg: RegExp | undefined = undefined; |  | ||||||
|         if (this.state.searchValue) { |  | ||||||
|             filterReg = new RegExp(this.state.searchValue, "i"); |  | ||||||
|         } |  | ||||||
|         let filterItem = behaviors.item.filter((item) => { |         let filterItem = behaviors.item.filter((item) => { | ||||||
|             let name = item.getTerms(item.behaviorName, this.props.setting?.language); |             let name = item.getTerms(item.behaviorName, this.props.setting?.language); | ||||||
|             if (filterReg) { |             if (this.state.searchValue) { | ||||||
|                 return filterReg.test(name); |                 return name.includes(this.state.searchValue); | ||||||
|             } else { |             } else { | ||||||
|                 return true; |                 return true; | ||||||
|             } |             } | ||||||
|  | |||||||
| @ -40,9 +40,6 @@ class HeaderBar extends Component< | |||||||
| 
 | 
 | ||||||
|     private createFpsCalc(type: "renderFps" | "physicsFps") { |     private createFpsCalc(type: "renderFps" | "physicsFps") { | ||||||
|         return (t: number) => { |         return (t: number) => { | ||||||
|             if (t === 0) { |  | ||||||
|                 return; |  | ||||||
|             } |  | ||||||
|             let newState: HeaderBarState = {} as any; |             let newState: HeaderBarState = {} as any; | ||||||
|             newState[type] = 1 / t; |             newState[type] = 1 / t; | ||||||
|             if (this.updateTime > 20) { |             if (this.updateTime > 20) { | ||||||
|  | |||||||
| @ -69,7 +69,6 @@ const EN_US = { | |||||||
|     "Common.Attr.Title.Basic": "Basic properties", |     "Common.Attr.Title.Basic": "Basic properties", | ||||||
|     "Common.Attr.Title.Spatial": "Spatial property", |     "Common.Attr.Title.Spatial": "Spatial property", | ||||||
|     "Common.Attr.Title.Individual.Generation": "Individual generation", |     "Common.Attr.Title.Individual.Generation": "Individual generation", | ||||||
|     "Common.Attr.Title.Behaviors": "Behaviors list", |  | ||||||
|     "Common.Attr.Title.Individual.kill": "Individual kill", |     "Common.Attr.Title.Individual.kill": "Individual kill", | ||||||
|     "Common.Attr.Key.Display.Name": "Display name", |     "Common.Attr.Key.Display.Name": "Display name", | ||||||
|     "Common.Attr.Key.Position.X": "Position X", |     "Common.Attr.Key.Position.X": "Position X", | ||||||
|  | |||||||
| @ -69,7 +69,6 @@ const ZH_CN = { | |||||||
|     "Common.Attr.Title.Basic": "基础属性", |     "Common.Attr.Title.Basic": "基础属性", | ||||||
|     "Common.Attr.Title.Spatial": "空间属性", |     "Common.Attr.Title.Spatial": "空间属性", | ||||||
|     "Common.Attr.Title.Individual.Generation": "生成个体", |     "Common.Attr.Title.Individual.Generation": "生成个体", | ||||||
|     "Common.Attr.Title.Behaviors": "行为列表", |  | ||||||
|     "Common.Attr.Title.Individual.kill": "消除个体", |     "Common.Attr.Title.Individual.kill": "消除个体", | ||||||
|     "Common.Attr.Key.Display.Name": "显示名称", |     "Common.Attr.Key.Display.Name": "显示名称", | ||||||
|     "Common.Attr.Key.Position.X": "X 坐标", |     "Common.Attr.Key.Position.X": "X 坐标", | ||||||
|  | |||||||
| @ -11,7 +11,6 @@ import { AllI18nKeys } from "@Component/Localization/Localization"; | |||||||
| import { ComboInput, IDisplayItem } from "@Component/ComboInput/ComboInput"; | import { ComboInput, IDisplayItem } from "@Component/ComboInput/ComboInput"; | ||||||
| import { ObjectPicker } from "@Component/ObjectPicker/ObjectPicker"; | import { ObjectPicker } from "@Component/ObjectPicker/ObjectPicker"; | ||||||
| import { ConfirmPopup } from "@Component/ConfirmPopup/ConfirmPopup"; | import { ConfirmPopup } from "@Component/ConfirmPopup/ConfirmPopup"; | ||||||
| import { BehaviorPicker } from "@Component/BehaviorPicker/BehaviorPicker"; |  | ||||||
| import "./GroupDetails.scss"; | import "./GroupDetails.scss"; | ||||||
| 
 | 
 | ||||||
| interface IGroupDetailsProps {} | interface IGroupDetailsProps {} | ||||||
| @ -109,12 +108,6 @@ class GroupDetails extends Component<IGroupDetailsProps & IMixinStatusProps> { | |||||||
| 				}} | 				}} | ||||||
| 			/> | 			/> | ||||||
| 
 | 
 | ||||||
|             <Message i18nKey="Common.Attr.Title.Behaviors" isTitle/> |  | ||||||
| 
 |  | ||||||
|             <BehaviorPicker |  | ||||||
|                 behavior={group.behaviors} |  | ||||||
|             /> |  | ||||||
| 
 |  | ||||||
|             <Message i18nKey="Common.Attr.Title.Individual.Generation" isTitle/> |             <Message i18nKey="Common.Attr.Title.Individual.Generation" isTitle/> | ||||||
| 
 | 
 | ||||||
|             <ComboInput |             <ComboInput | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user