YouGroove Posted March 19, 2013 Share Posted March 19, 2013 I have the context in app.lua self.window=Window:Create(self.title) self.window:HideMouse() --Create the graphics context self.context=Context:Create(self.window,0) if self.context==nil then return false end I would want to access it from some other entity script : Caus i don't know how to call the context from App.lua ? Can i get the context from current entity character ? This code don't work caus the context is not created in the entity script : framePlayer = self.entity.animationmanager:getFrame() local text = "Leadwerks" self.context:SetBlendMode(Blend.Alpha) self.context:DrawText(text,0,0) self.context:SetBlendMode(Blend.Solid) Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted March 19, 2013 Share Posted March 19, 2013 I think it's App.context. If you look at PostRender on the player.lua file I believe it uses it there. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.