mirror of
https://github.com/AnnulusGames/Alchemy.git
synced 2025-01-22 08:18:51 -05:00
Merge pull request #14 from AnnulusGames/fix-parameterless-button
Fix: Exception occurs on button of argumentless method whose return value is not void
This commit is contained in:
commit
725a61f290
@ -17,7 +17,7 @@ namespace Alchemy.Editor.Elements
|
||||
// Create parameterless button
|
||||
if (parameters.Length == 0)
|
||||
{
|
||||
button = new Button((Action)methodInfo.CreateDelegate(typeof(Action), target))
|
||||
button = new Button(() => methodInfo.Invoke(target, null))
|
||||
{
|
||||
text = methodInfo.Name
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user