diff options
author | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-02-21 16:10:23 -0500 |
---|---|---|
committer | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-02-21 16:10:23 -0500 |
commit | 0f03110bab8d4636d33abf7568bf7c6cb14847b4 (patch) | |
tree | bda607650976d84200e74751c397ebf9b059bdd9 /src/client/views/nodes/PhysicsSimulationBox.tsx | |
parent | 0fd4eb6a8bf80861345633aabe6d482c24cb4d70 (diff) |
settings menu
Diffstat (limited to 'src/client/views/nodes/PhysicsSimulationBox.tsx')
-rw-r--r-- | src/client/views/nodes/PhysicsSimulationBox.tsx | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/src/client/views/nodes/PhysicsSimulationBox.tsx b/src/client/views/nodes/PhysicsSimulationBox.tsx index f0e009deb..7eb9092bf 100644 --- a/src/client/views/nodes/PhysicsSimulationBox.tsx +++ b/src/client/views/nodes/PhysicsSimulationBox.tsx @@ -361,16 +361,24 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi <div style = {{width: this.layoutDoc._width+'px', height: this.layoutDoc._height+'px'}}> {this.menuIsOpen && ( <div className="mechanicsSimulationSettingsMenu"> - <div className="close-button" onClick={() => {this.menuIsOpen = false; this.dataDoc.simulationReset = !this.dataDoc.simulationReset;}} style={{zIndex: 20000}}> - <FontAwesomeIcon icon={'times'} color="yellow" size={'lg'} /> + <div className="close-button" onClick={() => {this.menuIsOpen = false; this.dataDoc.simulationReset = !this.dataDoc.simulationReset;}}> + <FontAwesomeIcon icon={'times'} color="black" size={'lg'} /> </div> - <h4 style={{zIndex: 20000}}>Simulation Settings</h4> - {this.dataDoc.simulationType == "Free Weight" && - <div className="mechanicsSimulationSettingsMenuRow"> - <p style={{zIndex: 20000}}>Elastic collisions </p> - <input type="checkbox" checked={this.dataDoc.elasticCollisions} onClick={() => {this.dataDoc.elasticCollisions = !this.dataDoc.elasticCollisions}}/> + <h4>Simulation Settings</h4> + <div className="mechanicsSimulationSettingsMenuContents"> + <div className="mechanicsSimulationSettingsMenuColumn"> + <div><p>Show forces</p></div> + <div><p>Show acceleration</p></div> + <div><p>Show velocity</p></div> + {this.dataDoc.simulationType == "Free Weight" && <div><p>Elastic collisions </p></div>} + </div> + <div className="mechanicsSimulationSettingsMenuColumn"> + <div><input type="checkbox" checked={this.dataDoc.showForces} onClick={() => {this.dataDoc.showForces = !this.dataDoc.showForces}}/></div> + <div><input type="checkbox" checked={this.dataDoc.showAcceleration} onClick={() => {this.dataDoc.showAcceleration = !this.dataDoc.showAcceleration}}/></div> + <div><input type="checkbox" checked={this.dataDoc.showVelocity} onClick={() => {this.dataDoc.showVelocity = !this.dataDoc.showVelocity}}/></div> + {this.dataDoc.simulationType == "Free Weight" && <div><input type="checkbox" checked={this.dataDoc.elasticCollisions} onClick={() => {this.dataDoc.elasticCollisions = !this.dataDoc.elasticCollisions}}/></div>} </div> - } + </div> {/* {this.dataDoc.simulationType == "Inclined Plane" && <div className="mechanicsSimulationSettingsMenuRow"> <p>Inclined plane angle </p> @@ -383,18 +391,6 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi <p>input field!</p> </div> } */} - <div className="mechanicsSimulationSettingsMenuRow"> - <p style={{zIndex: 20000}}>Show forces </p> - <input type="checkbox" checked={this.dataDoc.showForces} onClick={() => {this.dataDoc.showForces = !this.dataDoc.showForces}}/> - </div> - <div className="mechanicsSimulationSettingsMenuRow"> - <p style={{zIndex: 20000}}>Show acceleration </p> - <input type="checkbox" checked={this.dataDoc.showAcceleration} onClick={() => {this.dataDoc.showAcceleration = !this.dataDoc.showAcceleration}}/> - </div> - <div className="mechanicsSimulationSettingsMenuRow"> - <p style={{zIndex: 20000}}>Show velocity </p> - <input type="checkbox" checked={this.dataDoc.showVelocity} onClick={() => {this.dataDoc.showVelocity = !this.dataDoc.showVelocity}}/> - </div> </div> )} </div> |