Change generated On{SignalName} to EmitSignal{SignalName}
This commit is contained in:
parent
76a135926a
commit
fa48ed9945
3 changed files with 5 additions and 5 deletions
|
@ -32,7 +32,7 @@ partial class EventSignals
|
|||
add => backing_MySignal += value;
|
||||
remove => backing_MySignal -= value;
|
||||
}
|
||||
protected void OnMySignal(string str, int num)
|
||||
protected void EmitSignalMySignal(string str, int num)
|
||||
{
|
||||
EmitSignal(SignalName.MySignal, str, num);
|
||||
}
|
||||
|
|
|
@ -282,7 +282,7 @@ namespace Godot.SourceGenerators
|
|||
.Append(" -= value;\n")
|
||||
.Append("}\n");
|
||||
|
||||
// Generate On{EventName} method to raise the event
|
||||
// Generate EmitSignal{EventName} method to raise the event
|
||||
|
||||
var invokeMethodSymbol = signalDelegate.InvokeMethodData.Method;
|
||||
int paramCount = invokeMethodSymbol.Parameters.Length;
|
||||
|
@ -291,7 +291,7 @@ namespace Godot.SourceGenerators
|
|||
"private" :
|
||||
"protected";
|
||||
|
||||
source.Append($" {raiseMethodModifiers} void On{signalName}(");
|
||||
source.Append($" {raiseMethodModifiers} void EmitSignal{signalName}(");
|
||||
for (int i = 0; i < paramCount; i++)
|
||||
{
|
||||
var paramSymbol = invokeMethodSymbol.Parameters[i];
|
||||
|
|
|
@ -3228,10 +3228,10 @@ Error BindingsGenerator::_generate_cs_signal(const BindingsGenerator::TypeInterf
|
|||
|
||||
p_output.append(CLOSE_BLOCK_L1);
|
||||
|
||||
// Generate On{EventName} method to raise the event.
|
||||
// Generate EmitSignal{EventName} method to raise the event.
|
||||
if (!p_itype.is_singleton) {
|
||||
p_output.append(MEMBER_BEGIN "protected void ");
|
||||
p_output << "On" << p_isignal.proxy_name;
|
||||
p_output << "EmitSignal" << p_isignal.proxy_name;
|
||||
if (is_parameterless) {
|
||||
p_output.append("()\n" OPEN_BLOCK_L1 INDENT2);
|
||||
p_output << "EmitSignal(SignalName." << p_isignal.proxy_name << ");\n";
|
||||
|
|
Loading…
Reference in a new issue