MCPcopy Create free account
hub / github.com/The-Powder-Toy/The-Powder-Toy / GetGraphics

Method GetGraphics

src/lua/LuaScriptInterface.h:115–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113 NonGraphicsContext ngc;
114
115 std::variant<Graphics *, Renderer *, NonGraphicsContext *> GetGraphics()
116 {
117 if (eventTraits & eventTraitSimGraphics)
118 {
119 // This is ok without calling gameModel->view->PauseRendererThread() because
120 // the renderer thread gets paused anyway if there are handlers
121 // installed for eventTraitSimGraphics and *SimDraw events.
122 return ren;
123 }
124 if (eventTraits & eventTraitInterfaceGraphics)
125 {
126 return g;
127 }
128 return &ngc;
129 }
130
131 std::vector<CustomElement> customElements; // must come after luaState
132 std::vector<CustomTool> customTools;

Callers 7

drawTextFunction · 0.45
drawPixelFunction · 0.45
drawLineFunction · 0.45
drawRectFunction · 0.45
fillRectFunction · 0.45
drawCircleFunction · 0.45
fillCircleFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected