Commit 701c81fe authored by Tim Falken's avatar Tim Falken
Browse files

Input window has current memory as start value, refresh memory window after input

parent d8ee4450
No preview for this file type
......@@ -492,6 +492,7 @@ namespace PaintLang
if (color == colorPicker.Read)
{
InputByte input = new InputByte();
input.SetStartVal(memoryDisplayer.CurrentMemoryValue);
input.ShowDialog();
memoryDisplayer.SetMemory(input.UserInput);
......
......@@ -35,5 +35,10 @@ namespace PaintLang
UserInput = (byte)inputDec.Value;
hexBox.Text = "0x" + UserInput.ToString("X2");
}
internal void SetStartVal(byte currentMemoryValue)
{
inputDec.Value = (int)currentMemoryValue;
}
}
}
......@@ -133,6 +133,7 @@ namespace PaintLang
internal void SetMemory(byte userInput)
{
memory[pointer] = userInput;
RefreshWindows();
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment