Explorar o código

removing files

msDestiny14 %!s(int64=4) %!d(string=hai) anos
pai
achega
7c19c10ff9

+ 1 - 8
guiEditor/src/diagram/properties/genericNodePropertyComponent.tsx

@@ -5,8 +5,7 @@ import { IPropertyComponentProps } from './propertyComponentProps';
 import { CheckBoxLineComponent } from '../../sharedComponents/checkBoxLineComponent';
 import { FloatLineComponent } from '../../sharedComponents/floatLineComponent';
 import { SliderLineComponent } from '../../sharedComponents/sliderLineComponent';
-import { OptionsLineComponent } from '../../sharedComponents/optionsLineComponent';
-import { PropertyTypeForEdition, IPropertyDescriptionForEdition, IEditablePropertyListOption } from 'babylonjs/Materials/Node/nodeMaterialDecorator';
+import { PropertyTypeForEdition, IPropertyDescriptionForEdition } from 'babylonjs/Materials/Node/nodeMaterialDecorator';
 
 export class GenericPropertyComponent extends React.Component<IPropertyComponentProps> {
     constructor(props: IPropertyComponentProps) {
@@ -96,12 +95,6 @@ export class GenericPropertyTabComponent extends React.Component<IPropertyCompon
                     }
                     break;
                 }
-                case PropertyTypeForEdition.List: {
-                    components.push(
-                        <OptionsLineComponent label={displayName} options={options.options as IEditablePropertyListOption[]} target={this.props.guiBlock} propertyName={propertyName} onSelect={() => this.forceRebuild(options.notifiers)} />
-                    );
-                    break;
-                }
             }
         }
 

+ 0 - 31
guiEditor/src/sharedComponents/draggableLineWithButtonComponent.tsx

@@ -1,31 +0,0 @@
-import * as React from "react";
-
-export interface IDraggableLineWithButtonComponent {
-    data: string;
-    tooltip: string;
-    iconImage: any;
-    onIconClick: (value: string) => void;
-    iconTitle: string;
-}
-
-export class DraggableLineWithButtonComponent extends React.Component<IDraggableLineWithButtonComponent> {
-    constructor(props: IDraggableLineWithButtonComponent) {
-        super(props);
-    }
-
-    render() { 
-        return (
-            <div className="draggableLine withButton" 
-                title={this.props.tooltip}
-                draggable={true}
-                onDragStart={event => {
-                    event.dataTransfer.setData("babylonjs-material-node", this.props.data);
-                }}>
-                {this.props.data.substr(0, this.props.data.length - 6)}
-                <div className="icon" onClick={() => { this.props.onIconClick(this.props.data); }} title={this.props.iconTitle}>
-                    <img className="img" title={this.props.iconTitle} src={this.props.iconImage}/>
-                </div>
-            </div>
-        );
-    }
-}

+ 0 - 110
guiEditor/src/sharedComponents/optionsLineComponent.tsx

@@ -1,110 +0,0 @@
-import * as React from "react";
-
-import { Observable } from "babylonjs/Misc/observable";
-import { PropertyChangedEvent } from "./propertyChangedEvent";
-
-class ListLineOption {
-    public label: string;
-    public value: number | string;
-}
-
-interface IOptionsLineComponentProps {
-    label: string,
-    target: any,
-    className?: string,
-    propertyName?: string,
-    options: ListLineOption[],
-    noDirectUpdate?: boolean,
-    onSelect?: (value: number | string) => void,
-    onPropertyChangedObservable?: Observable<PropertyChangedEvent>,
-    valuesAreStrings?: boolean
-    defaultIfNull?: number,
-    getSelection?: (target: any) => number;
-}
-
-export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, { value: number | string }> {
-    private _localChange = false;
-
-    private _getValue(props: IOptionsLineComponentProps) {
-        if (props.getSelection) {
-            return props.getSelection(props.target);
-        }
-        return (props.target && props.propertyName) ? props.target[props.propertyName] : props.options[props.defaultIfNull || 0];
-    }
-
-    constructor(props: IOptionsLineComponentProps) {
-        super(props);
-
-        this.state = { value: this._getValue(props) };
-    }
-
-    setValue(value: string | number) {
-        this.setState({ value: value });
-    }
-
-    shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: { value: number }) {
-        if (this._localChange) {
-            this._localChange = false;
-            return true;
-        }
-
-        const newValue = this._getValue(nextProps);
-        if (newValue != null && newValue !== nextState.value) {
-            nextState.value = newValue;
-            return true;
-        }
-        return false;
-    }
-
-    raiseOnPropertyChanged(newValue: number | string, previousValue: number | string) {
-        if (!this.props.onPropertyChangedObservable) {
-            return;
-        }
-
-        this.props.onPropertyChangedObservable.notifyObservers({
-            object: this.props.target,
-            property: this.props.propertyName!,
-            value: newValue,
-            initialValue: previousValue
-        });
-    }
-
-    updateValue(valueString: string) {
-        const value = this.props.valuesAreStrings ? valueString : parseInt(valueString);
-        this._localChange = true;
-
-        const store = this.state.value;
-        if (!this.props.noDirectUpdate) {
-            this.props.target[this.props.propertyName!] = value;
-        }
-        this.setState({ value: value });
-
-        this.raiseOnPropertyChanged(value, store);
-
-        if (this.props.onSelect) {
-            this.props.onSelect(value);
-        }
-    }
-
-    render() {
-        return (
-            <div className="listLine">
-                <div className="label">
-                    {this.props.label}
-
-                </div>
-                <div className={"options" + (this.props.className ? " " + this.props.className : "")}>
-                    <select onChange={evt => this.updateValue(evt.target.value)} value={this.state.value ?? ""}>
-                        {
-                            this.props.options.map(option => {
-                                return (
-                                    <option key={option.label} value={option.value}>{option.label}</option>
-                                )
-                            })
-                        }
-                    </select>
-                </div>
-            </div>
-        );
-    }
-}

+ 1 - 1
guiEditor/src/workbenchEditor.tsx

@@ -6,13 +6,13 @@ import { Portal } from './portal';
 import { LogComponent, LogEntry } from './components/log/logComponent';
 import { DataStorage } from 'babylonjs/Misc/dataStorage';
 import { Nullable } from 'babylonjs/types';
-import { MessageDialogComponent } from './sharedComponents/messageDialog';
 import { BlockTools } from './blockTools';
 import { IEditorData } from './nodeLocationInfo';
 
 import { WorkbenchComponent } from './diagram/workbench';
 import { GUINode } from './diagram/guiNode';
 import { _TypeStore } from 'babylonjs/Misc/typeStore';
+import { MessageDialogComponent } from "./sharedComponents/messageDialog";
 
 require("./main.scss");