Use godot style for property names

This commit is contained in:
Ruslan Mustakov 2017-07-26 14:20:09 +07:00
commit dc00986f29
2 changed files with 4 additions and 4 deletions

View file

@ -300,11 +300,11 @@ template registerGodotField(classNameLit, classNameIdent, propNameLit,
cast[classNameIdent](nimPtr).propNameIdent = nimVal
of ConversionResult.TypeError:
let errStr = typeError(propTypeLit, $val, val.getType(),
classNameLit, propNameLit)
classNameLit, astToStr(propNameIdent))
printError(errStr)
of ConversionResult.RangeError:
let errStr = rangeError(propTypeLit, $val,
classNameLit, propNameLit)
classNameLit, astToStr(propNameIdent))
printError(errStr)
proc getFuncIdent(obj: ptr GodotObject, methData: pointer,
@ -408,7 +408,7 @@ proc genType(obj: ObjectDecl): NimNode {.compileTime.} =
let usageIdent = ident(usage)
result.add(getAst(
registerGodotField(classNameLit, classNameIdent,
newCStringLit($field.name.basename()),
newCStringLit(toGodotStyle($field.name.basename())),
ident(field.name), newCStringLit($field.typ),
field.typ, genSym(nskProc, "setFunc"),
genSym(nskProc, "getFunc"),