public UI(ViewDB db_, Camera c_, SelectionCallback onSelect_) { db = db_; c = c_; newSel = new Point(-1, -1); onSelect = onSelect_; }
public void SetCallback(int marksExpected, SelectionCallback callback, object args, params Permission[] requiredPermissions) { SelectionArgs = args; SelectionMarksExpected = marksExpected; SelectionMarks.Clear(); SelectionMarkCount = 0; SelectionCallback = callback; SelectionPermissions = requiredPermissions; }
public InputMachine() { this.currentState = State.idle; this.currentCharSet = null; this.currentIndex = 0; this.selectionCallback = null; this.addCharacterCallback = null; this.deleteCallback = null; }
public GUI(ViewDB db_, Viewport v, SelectionCallback onSelect, EventDispatcher disp) { db = db_; c = new Camera(0, 0, v); r = new Renderer(db, c); ui = new UI(db, c, onSelect); disp.AddListener(r, EventType.View); disp.AddListener(ui, EventType.UI); }
public static void Show(DirectoryInfo levelDir, FilterCallback filter, SelectionCallback callback) { //ListSelector ls = null; if (_instance == null) { _instance = ScriptableWizard.DisplayWizard <LevelPickerWizard>("Select level"); } _instance._viewOnly = callback == null; _instance._levelDir = levelDir; _instance._filter = filter; _instance._callback = callback; _instance.Refresh(); _instance.Focus(); }
public static void Show( string title, dfAtlas atlas, string sprite, SelectionCallback callback ) { if( atlas == null ) throw new Exception( "No Texture Atlas was specified" ); // Detect whether the user has deleted the textures after adding them to the Atlas if( atlas.Texture == null ) throw new Exception( "The Texture Atlas does not have a texture or the texture was deleted" ); var dialog = ScriptableWizard.DisplayWizard<dfSpriteSelectionDialog>( title ); dialog.atlas = atlas; dialog.selectedSprite = sprite; dialog.minSize = new Vector2( 300, 200 ); dialog.callback = callback; dialog.selectionShown = string.IsNullOrEmpty( sprite ); dialog.ShowAuxWindow(); }
public static dfPrefabSelectionDialog Show( string title, Type componentType, SelectionCallback callback, PreviewCallback previewCallback, FilterCallback filterCallback = null ) { var dialog = ScriptableWizard.DisplayWizard<dfPrefabSelectionDialog>( title ); dialog.previewSize = DEFAULT_PREVIEW_SIZE; dialog.padding = DEFAULT_PADDING; dialog.componentType = componentType; dialog.minSize = new Vector2( 300, 200 ); dialog.callback = callback; dialog.previewCallback = previewCallback; dialog.filterCallback = filterCallback; dialog.getFilteredItems(); dialog.ShowAuxWindow(); return dialog; }
public static void Show(string title, dfAtlas atlas, string sprite, SelectionCallback callback) { if (atlas == null) { throw new Exception("No Texture Atlas was specified"); } // Detect whether the user has deleted the textures after adding them to the Atlas if (atlas.Texture == null) { throw new Exception("The Texture Atlas does not have a texture or the texture was deleted"); } var dialog = ScriptableWizard.DisplayWizard <dfSpriteSelectionDialog>(title); dialog.atlas = atlas; dialog.selectedSprite = sprite; dialog.minSize = new Vector2(300, 200); dialog.callback = callback; dialog.selectionShown = string.IsNullOrEmpty(sprite); dialog.ShowAuxWindow(); }
public void RunAlgorithm() { CreatePopulation(_initialPopulation); if (_crossoverMethod == CrossoverMethod.One_point) { _crossoverCallback = OnePointCrossover; } else { _crossoverCallback = TwoPointCrossover; } switch (_selectionMethod) { case SelectionMethod.Proportional: { _selectionCallback = ProportionalSelection; } break; case SelectionMethod.Tournament: { _selectionCallback = TournamentSelection; } break; case SelectionMethod.Truncation: { _selectionCallback = TruncationSelection; } break; } _procreationIndex = new SelectionPair(0, _population.Count - 1); _tProcreation = new Timer(_procreationStep * 2, true, Procreate); ModuleManager.Play(_tProcreation); }
public static dfPrefabSelectionDialog Show(string title, Type componentType, SelectionCallback callback, PreviewCallback previewCallback, FilterCallback filterCallback) { if (componentType == null) { throw new Exception("Component type cannot be null"); } var dialog = ScriptableWizard.DisplayWizard <dfPrefabSelectionDialog>(title); dialog.previewSize = DEFAULT_PREVIEW_SIZE; dialog.padding = DEFAULT_PADDING; dialog.componentType = componentType; dialog.minSize = new Vector2(640, 480); dialog.callback = callback; dialog.previewCallback = previewCallback; dialog.filterCallback = filterCallback; dialog.getFilteredItems(); dialog.ShowAuxWindow(); return(dialog); }
public static dfPrefabSelectionDialog Show(string title, Type componentType, SelectionCallback callback, PreviewCallback previewCallback) { return(Show(title, componentType, callback, previewCallback, null)); }
private void Init() { Select = new CustomCommand(arg => SelectionCallback?.Invoke(this)); }
public void registerSelectionCallback(SelectionCallback cb) { this.selectionCallback = cb; }
public static dfPrefabSelectionDialog Show( string title, Type componentType, SelectionCallback callback, PreviewCallback previewCallback ) { return Show ( title, componentType, callback, previewCallback, null ); }
public void SetCallback( int marksExpected, SelectionCallback callback, object args, params Permission[] requiredPermissions ) { SelectionArgs = args; SelectionMarksExpected = marksExpected; SelectionMarks.Clear(); SelectionMarkCount = 0; SelectionCallback = callback; SelectionPermissions = requiredPermissions; }