public ColorQuad(byte[] buffer, int sunrise, int day, int sunset, int night) { Sunrise = new ColorAdapter(buffer, sunrise); Day = new ColorAdapter(buffer, day); Sunset = new ColorAdapter(buffer, sunset); Night = new ColorAdapter(buffer, night); }
public void Initialize() { this.colorTextures = ColorAdapter.GetTextures(path); // Read all color textures ColorAdapter.FillDropdown(this.colorTextures, this.dropdown); // Fill the dropdown with textures this.InitializeDropdownListener(); // Initialize listener this.OnDropdownChange(); // Reset current color }
// Fill dropdown based on parts array public static void FillDropdown(Texture[] textures, Dropdown dropdown) { dropdown.options.Clear(); // Clear previous options string[] names = ColorAdapter.GetNames(textures); // Get array of names dropdown.captionText.text = names[0]; // Set caption foreach (string name in names) // For each name { dropdown.options.Add(new Dropdown.OptionData(name)); // Add it to the dropdown options } }
public ColorOctave(byte[] buffer, int offset, int stride) { Dawn = new ColorAdapter(buffer, offset); Day = new ColorAdapter(buffer, offset + stride); Dusk = new ColorAdapter(buffer, offset + stride * 2); Night = new ColorAdapter(buffer, offset + stride * 3); EarlyDawn = new ColorAdapter(buffer, offset + stride * 4); LateDawn = new ColorAdapter(buffer, offset + stride * 5); EarlyDusk = new ColorAdapter(buffer, offset + stride * 6); LateDusk = new ColorAdapter(buffer, offset + stride * 7); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.Inflate(Resource.Layout.HomeLayout, container, false); GetColorItemsList(); colorAdapter = new ColorAdapter(this.Activity, colorItemsList); listView = view.FindViewById <ListView>(Resource.Id.myListView); listView.Adapter = colorAdapter; colorSearchView = view.FindViewById <SearchView>(Resource.Id.colorSearchView); colorSearchView.QueryTextSubmit += ColorSearchView_QueryTextSubmit; return(view); }
public override void Play(GameObject target) { // Set color adapter _colorAdapter = ColorAdapter.Get(target); // Set start _helper.Start = _colorAdapter.GetRGB(); if (_isRelative) { _helper.End += _helper.Start; } _helper.Play(); }
public override void Play(GameObject target) { // Set color adapter _colorAdapter = ColorAdapter.Get(target); // Set start _helper.Start = _colorAdapter.GetAlpha(); if (_isRelative) { _helper.AddEndByStart(); } _helper.Play(); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); GetColorItemsList(); colorAdapter = new ColorAdapter(this, colorItemsList); listView = FindViewById <ListView>(Resource.Id.myListView); listView.Adapter = colorAdapter; searchView = FindViewById <SearchView>(Resource.Id.searchView); searchView.QueryTextSubmit += SearchView_QueryTextSubmit; }
public override void Play(GameObject target) { // Set color adapter _colorAdapter = ColorAdapter.Get(target); // Set time _time = 0; // Set visible _isVisible = true; // Set not finished _isFinished = false; // Show _colorAdapter.SetAlpha(1.0f, _isRecursive); }
public DefaultCellMap(Cell[,] array, int square_size) { this.array = array; counter = 0; this.square_size = square_size; ColorAdapter dead = new ColorAdapter(Color.Black); color_adapters = new DefaultColorAdapterDictionary(new List <KeyValuePair <string, ColorAdapter> >(), dead); color_adapters.Add("NoNeighbor", new ColorAdapter(Color.OrangeRed)); color_adapters.Add("OneNeighbor", new ColorAdapter(Color.Yellow)); color_adapters.Add("TwoNeighbors", new ColorAdapter(Color.Orange)); color_adapters.Add("ThreeNeighbors", new ColorAdapter(Color.LightYellow)); color_adapters.Add("MoreThanThreeNeighbors", new ColorAdapter(Color.LightGreen)); color_adapters.Add("AlmostDead", new ColorAdapter(Color.DimGray)); color_adapters.Add("Dead", dead); color_adapters.Add("Default", new ColorAdapter(Color.White)); color_adapters.Add("Side", new ColorAdapter(Color.White)); }
public ColorLogic() { colorData = new ColorAdapter(); }
internal ColorProxy With(ColorAdapter adapter) { this.adapter = adapter; return(this); }
public override void Play(GameObject target) { // Set color adapter _colorAdapter = ColorAdapter.Get(target); // Set start _helper.Start = _colorAdapter.GetAlpha(); if (_isRelative) { _helper.End += _helper.Start; } _helper.Play(); }