Changes

Jump to navigation Jump to search
Line 142: Line 142:  
# <code>helper.Events.Input.ButtonPressed += this.OnButtonPressed;</code> adds an 'event handler' (''i.e.,'' a method to call) when the button-pressed event happens. In other words, when a button is pressed (the <samp>helper.Events.Input.ButtonPressed</samp> event), SMAPI will call your <samp>this.OnButtonPressed</samp> method. See [[Modding:Modder Guide/APIs/Events|events in the SMAPI reference]] for more info.
 
# <code>helper.Events.Input.ButtonPressed += this.OnButtonPressed;</code> adds an 'event handler' (''i.e.,'' a method to call) when the button-pressed event happens. In other words, when a button is pressed (the <samp>helper.Events.Input.ButtonPressed</samp> event), SMAPI will call your <samp>this.OnButtonPressed</samp> method. See [[Modding:Modder Guide/APIs/Events|events in the SMAPI reference]] for more info.
   −
Note: if you get compile errors along the lines of "Feature XX is not available in C# <number>. Please use language version <number> or greater", add the <samp>&lt;LangVersion&gt;Latest&lt;/Langversion&gt;</samp> to your <samp>.csproj</samp>.
+
Note: if you get compile errors along the lines of "Feature XX is not available in C# <number>. Please use language version <number> or greater", add <samp>&lt;LangVersion&gt;Latest&lt;/LangVersion&gt;</samp> to your <samp>.csproj</samp>.
    
===Add your manifest===
 
===Add your manifest===
528

edits

Navigation menu