public override void onAction() { GuiEditorPrefsDlg GuiEditorPrefsDlg = "GuiEditorPrefsDlg"; GuiEditorPrefsDlgGridEdit GuiEditorPrefsDlgGridEdit = "GuiEditorPrefsDlgGridEdit"; GuiCanvas Canvas = "Canvas"; GuiEditorGui.GuiEditor GuiEditor = "GuiEditor"; GuiEditor["snap2gridsize"] = GuiEditorPrefsDlgGridEdit.getValue(); if (GuiEditor["snap2grid"].AsBool()) { GuiEditor.setSnapToGrid(GuiEditor["snap2gridsize"].AsUint()); } Canvas.popDialog(GuiEditorPrefsDlg); }