GE Lua Documentation

Press F to search!

SetCurrentEditor

Definition


-- @/lua/common/extensions/ui/flowgraph/editor_api_luaintf.lua:100

  M.SetCurrentEditor = function(ctx)
    M.ctx = ctx
    fge.SetCurrentEditor(ctx)
  end

Callers

@/lua/ge/extensions/editor/missionPlaybook/missionTreeViewer.lua

      ui_flowgraph_editor.SetCurrentEditor(M.previewEctx)

      ui_flowgraph_editor.SetCurrentEditor(savedEctx)
@/lua/common/extensions/ui/flowgraph/editor_api_luaintf.lua
    M.ctx = ctx
    fge.SetCurrentEditor(ctx)
  end
@/lua/ge/extensions/flowgraph/manager.lua
  -- first, save the copy of the graph as a macro file. put copy into macro list.
  ui_flowgraph_editor.SetCurrentEditor(self.fgEditor.ectx)
  local serialized = graph:_onSerialize()
    --print("Changed Macro " .. macro.name .. " (" .. macro.id .. ")")
    ui_flowgraph_editor.SetCurrentEditor(self.fgEditor.ectx)
    macro:forceRecursiveNodeUpdatePosition()

  ui_flowgraph_editor.SetCurrentEditor(self.fgEditor.ectx)
  for id, graph in pairs(self.graphs) do
  --print("createInstanceFromMacro ".. macro.name)
  --ui_flowgraph_editor.SetCurrentEditor(self.fgEditor.ectx)
  local serializedData = macro:_onSerialize()
  -- check if we have the macro already loaded.
  --ui_flowgraph_editor.SetCurrentEditor(self.fgEditor.ectx)
  for id, macro in pairs(self.macros) do

  ui_flowgraph_editor.SetCurrentEditor(self.fgEditor.ectx)
  self.copyData = {
  self.__graphNodeOffset = self.__graphNodeOffset - self.copyData.minId + 1
  ui_flowgraph_editor.SetCurrentEditor(self.fgEditor.ectx)
  ui_flowgraph_editor.ClearSelection()
  if self.fgEditor and self.fgEditor.ectx then
    ui_flowgraph_editor.SetCurrentEditor(self.fgEditor.ectx)
    for _, gr in pairs(self.graphs) do
  if self.fgEditor and self.fgEditor.ectx then
    ui_flowgraph_editor.SetCurrentEditor(self.fgEditor.ectx)
    for _, gr in pairs(self.graphs) do
@/lua/ge/extensions/editor/flowgraph/nodePreview.lua

    ui_flowgraph_editor.SetCurrentEditor(self.previewEctx)
      for id, node in pairs(self.hover.nodes) do
        ui_flowgraph_editor.SetCurrentEditor(self.fgEditor.ectx)
        local pos = ui_flowgraph_editor.GetNodePosition(id)

        ui_flowgraph_editor.SetCurrentEditor(self.previewEctx)
        local status, err, res = xpcall(node.draw, debug.traceback, node, builder, style, drawType)

  ui_flowgraph_editor.SetCurrentEditor(savedEctx)
end
@/lua/ge/extensions/editor/flowgraphEditor.lua
  im.PushStyleVar2(im.StyleVar_WindowPadding, im.ImVec2(8, 8))
  ui_flowgraph_editor.SetCurrentEditor(M.ectx)
  mgr:updateEditorSelections()
  M.drawContextMenus()
  ui_flowgraph_editor.SetCurrentEditor(nil)
  M.nodePreviewPopup:draw()
    M.ectx = ui_flowgraph_editor.CreateEditor(ui_imgui.ctx)
    ui_flowgraph_editor.SetCurrentEditor(M.ectx)
    ui_flowgraph_editor.EnableShortcuts(true)
  --dumpz(mgr,2)
  ui_flowgraph_editor.SetCurrentEditor(M.ectx)
  for _, m in ipairs(fgMgr.getAllManagers()) do