Skip to content

Commit 7feb0da

Browse files
author
Athanatos
committed
Really odd bug fixed
1 parent 08c8f53 commit 7feb0da

29 files changed

Lines changed: 50 additions & 15 deletions

3DRadSpace/.vs/3DRadSpace/v16/.suo

-10 KB
Binary file not shown.

3DRadSpace/3DRadSpace/Content/obj/Windows/Content/.mgstats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Source File,Dest File,Processor Type,Content Type,Source File Size,Dest File Siz
77
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Font.spritefont","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Font.xnb","FontDescriptionProcessor","SpriteFontContent",2068,21524,0.1389985
88
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Shaders/RedVertexSh.fx","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Shaders/RedVertexSh.xnb","EffectProcessor","CompiledEffectContent",948,1809,3.044576
99
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Shaders/SH_Skybox.fx","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Shaders/SH_Skybox.xnb","EffectProcessor","CompiledEffectContent",2325,2188,3.903923
10-
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Skinmeshes/terrain0100.dds","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Skinmeshes/terrain0100.xnb","TextureProcessor","Texture2DContent",2796344,2796345,1.474005
11-
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Skinmeshes/terrain0100.x","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Skinmeshes/terrain0100.xnb","ModelProcessor","ModelContent",594945,439265,3.263107
10+
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Skinmeshes/terrain0100.dds","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Skinmeshes/terrain0100.xnb","TextureProcessor","Texture2DContent",2796344,2796345,0.4109988
11+
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Skinmeshes/terrain0100.x","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Skinmeshes/terrain0100.xnb","ModelProcessor","ModelContent",594945,439265,1.353998
1212
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Sounds/sound.ogg","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Sounds/sound.xnb","SoundEffectProcessor","SoundEffectContent",6625,36201,0.6680005

3DRadSpace/3DRadSpace/Content/obj/Windows/Content/Skinmeshes/terrain0100.mgcontent

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<SourceFile>C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Skinmeshes/terrain0100.x</SourceFile>
44
<SourceTime>2011-09-09T11:04:28+03:00</SourceTime>
55
<DestFile>C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Skinmeshes/terrain0100.xnb</DestFile>
6-
<DestTime>2020-07-20T19:38:45.2133693+03:00</DestTime>
6+
<DestTime>2020-07-22T23:32:25.4400665+03:00</DestTime>
77
<Importer>XImporter</Importer>
88
<ImporterTime>2020-02-26T07:46:56+02:00</ImporterTime>
99
<Processor>ModelProcessor</Processor>

3DRadSpace/3DRadSpace/EventOnKeyW.cs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public EventOnKeyW(EventOnKey eok)
3535
}
3636
}
3737
DetermineInputType(eok.Key.State);
38+
Debug.Print("loading ->" + eok.Key.State);
3839
textBox2.Text = "" + eok.HoldingTime;
3940
_eok = eok;
4041
opcodes = eok.Behiavours;
@@ -46,17 +47,20 @@ public EventOnKeyW(EventOnKey eok)
4647
private void button1_Click(object sender, EventArgs e)
4748
{
4849
DialogResult = DialogResult.OK;
49-
EventOnKey k = new EventOnKey(
50-
Editor.ValidateTextInput(textBox1.Text),
51-
checkBox1.Checked,
52-
new KeyInput(
53-
GetKeyFromListBox(listBox1.Items[listBox1.SelectedIndex]+""),
54-
GetInputType()
55-
),
56-
Convert.ToUInt32(Editor.ValidateNumberTextInput(textBox2.Text))
57-
);
50+
EventOnKey k = new EventOnKey() {
51+
Name =Editor.ValidateTextInput(textBox1.Text),
52+
Enabled = checkBox1.Checked,
53+
Key = new KeyInput()
54+
{
55+
Key = GetKeyFromListBox(listBox1.Items[listBox1.SelectedIndex] + ""),
56+
State = GetInputType()
57+
},
58+
HoldingTime = Convert.ToUInt32(Editor.ValidateNumberTextInput(textBox2.Text))
59+
};
5860

5961
k.Behiavours = opcodes;
62+
Debug.Print("saving -> "+k.Key.State + " " + GetInputType());
63+
k.Key.State = GetInputType();
6064
Result = k;
6165
Close();
6266
}
@@ -182,13 +186,15 @@ private void button2_Click(object sender, EventArgs e)
182186
}
183187
bool DetermineInputType(KeyInputType t)
184188
{
189+
Debug.Print(t + " " + radioButton1.Checked + " " + radioButton2.Checked + " " + radioButton3.Checked);
185190
if (t == KeyInputType.Released) return radioButton1.Checked = true;
186191
if (t == KeyInputType.Pressed) return radioButton2.Checked = true;
187192
if (t == KeyInputType.Holding) return radioButton3.Checked = true;
188193
throw new Exception("some horrible bug happened there. It's because of WinForms.");
189194
}
190195
KeyInputType GetInputType()
191196
{
197+
Debug.Print( radioButton1.Checked + " " + radioButton2.Checked + " " + radioButton3.Checked);
192198
if (radioButton1.Checked == true) return KeyInputType.Released;
193199
if (radioButton2.Checked == true) return KeyInputType.Pressed;
194200
if (radioButton3.Checked == true) return KeyInputType.Holding;
512 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
512 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
3DRSP_text
2-
eok EventOnKey True 38 1 0
2+
eok EventOnKey True 38 0 0

0 commit comments

Comments
 (0)