Changeset - e53fa6e66029
[Not reviewed]
T9_V7 default
0 2 0
Jason Maltzen - 4 years ago 2019-11-08 22:36:00
jason@hiddenachievement.com
Add a button for marking a reaction as 'no reaction'
2 files changed with 53 insertions and 0 deletions:
0 comments (0 inline, 0 general)
UI/CaptureView.cs
Show inline comments
...
 
@@ -82,2 +82,3 @@ namespace DesertPaintLab
 
            recordButton.Sensitive = false;
 
            recordNoReactionButton.Sensitive = false;
 
        }
...
 
@@ -156,4 +157,7 @@ namespace DesertPaintLab
 
            recordButton.Sensitive = false;
 
            recordNoReactionButton.Sensitive = false;
 
            clearReactionButton.Sensitive = false;
 
            clearReactionButton.Visible = false;
 
            recordNoReactionButton.Sensitive = false;
 
            recordNoReactionButton.Visible = false;
 
    
...
 
@@ -169,2 +173,4 @@ namespace DesertPaintLab
 
                captureButton.Sensitive = false;
 
                recordNoReactionButton.Sensitive = false;
 
                recordNoReactionButton.Visible = false;
 
                return;
...
 
@@ -178,2 +184,4 @@ namespace DesertPaintLab
 
                recordButton.Sensitive = false;
 
                recordNoReactionButton.Sensitive = false;
 
                recordNoReactionButton.Visible = false;
 
                reactionKnown = false;
...
 
@@ -187,2 +195,3 @@ namespace DesertPaintLab
 
            captureButton.Sensitive = true;
 
            recordNoReactionButton.Sensitive = true;
 
            
...
 
@@ -196,2 +205,4 @@ namespace DesertPaintLab
 
                ingredient3ComboBox.Sensitive = true;
 
                recordNoReactionButton.Sensitive = false;
 
                recordNoReactionButton.Visible = false;
 
                if ((reagentName = GetSelectedReagentName(3)) != null)
...
 
@@ -200,2 +211,4 @@ namespace DesertPaintLab
 
                    clearReactionButton.Visible = false;
 
                    recordNoReactionButton.Sensitive = false;
 
                    recordNoReactionButton.Visible = false;
 
                    recipe.AddReagent(reagentName);
...
 
@@ -250,2 +263,4 @@ namespace DesertPaintLab
 
                ingredient3ComboBox.Sensitive = false;
 
                recordNoReactionButton.Sensitive = recordEnabled;
 
                recordNoReactionButton.Visible = true;
 
            }
...
 
@@ -274,2 +289,3 @@ namespace DesertPaintLab
 
            clearReactionButton.Sensitive = false;
 
            recordNoReactionButton.Sensitive = false;
 

	
...
 
@@ -277,2 +293,3 @@ namespace DesertPaintLab
 
            recordButton.Hide();
 
            recordNoReactionButton.Hide();
 

	
...
 
@@ -430,2 +447,3 @@ namespace DesertPaintLab
 
                    recordButton.Sensitive = false;
 
                    recordNoReactionButton.Sensitive = false;
 
                }
...
 
@@ -434,2 +452,3 @@ namespace DesertPaintLab
 
                    recordButton.Sensitive = recordEnabled;
 
                    recordNoReactionButton.Sensitive = false;
 
                }
...
 
@@ -561,2 +580,15 @@ namespace DesertPaintLab
 
        
 
        protected virtual void OnRecordNoReaction(object sender, System.EventArgs e)
 
        {
 
            if (ReactionRecorder.Instance.RecordReaction(profile, expectedColor, expectedColor, reagents))
 
            {
 
                recordNoReactionButton.Sensitive = false;
 
                recordNoReactionButton.Visible = false;
 
                clearReactionButton.Sensitive = true;
 
                clearReactionButton.Visible = true;
 
                this.reactionSwatch.Color = expectedColor;
 
                this.reactedColor.Set(expectedColor);
 
            }
 
        }
 

	
 
        protected virtual void OnChangedIngredient1(object sender, System.EventArgs e)
...
 
@@ -602,2 +634,8 @@ namespace DesertPaintLab
 
                        profile.ClearReaction(reagent1, reagent2);
 
                        reactionSwatch.Clear();
 
                        reactedColor.Clear();
 
                        clearReactionButton.Sensitive = false;
 
                        clearReactionButton.Visible = false;
 
                        recordNoReactionButton.Sensitive = true;
 
                        recordNoReactionButton.Visible = true;
 
                    }
gtk-gui/DesertPaintLab.CaptureView.cs
Show inline comments
...
 
@@ -60,2 +60,4 @@ namespace DesertPaintLab
 
		
 
        private global::Gtk.Button recordNoReactionButton;
 
		
 
		private global::Gtk.Label reactionLabel;
...
 
@@ -173,2 +175,14 @@ namespace DesertPaintLab
 
			w10.Padding = ((uint)(6));
 
            this.recordNoReactionButton = new global::Gtk.Button();
 
            this.recordNoReactionButton.CanFocus = true;
 
            this.recordNoReactionButton.Name = "recordNoReactionButton";
 
            this.recordNoReactionButton.UseUnderline = true;
 
            this.recordNoReactionButton.Label = "No Reaction";
 
            this.vbox2.Add(this.recordNoReactionButton);
 
            global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.recordNoReactionButton]));
 
            w21.PackType = ((global::Gtk.PackType)(1));
 
            w21.Position = 4;
 
            w21.Expand = false;
 
            w21.Fill = false;
 
            w21.Padding = ((uint)(6));
 
			this.GtkAlignment.Add (this.vbox2);
...
 
@@ -317,2 +331,3 @@ namespace DesertPaintLab
 
            this.recordButton.Clicked += new global::System.EventHandler (this.OnRecord);
 
            this.recordNoReactionButton.Clicked += new global::System.EventHandler(this.OnRecordNoReaction);
 
		}
0 comments (0 inline, 0 general)