Comments (9)
I can't seem to reproduce. Can you post the code you're using. Here's the code I tested with
ENT.Type = "anim"
function ENT:Initialize()
if SERVER then
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetModel("models/props_borealis/bluebarrel001.mdl")
end
end
function ENT:Draw()
self:DrawModel()
self.p = self.p or tdui.Create()
if self.p:Button("Woop", "DermaLarge", 0, 0, 100, 50) then
self:SetColor(Color(math.random(0, 255), math.random(0, 255), math.random(0, 255)))
end
self.p:Render(self:GetPos() + self:GetForward() * -25, self:GetAngles(), 0.1)
end
from 3d2d-imgui.
A sec i'll make you a video
from 3d2d-imgui.
But wait is that rendering server side? I am rendering client side, any problems with that?
from 3d2d-imgui.
It is rendering on clientside. It is a shared file. I spawned two barrels and the button on each of them works independently of each other.
If I had to guess, I'd say you're maybe not caching the tdui panel properly. Make sure you don't store it in a local variable but the self
object.
from 3d2d-imgui.
http://i.imgur.com/N1uYn4O.jpg = 1 Printer Works fine
http://i.imgur.com/niuF8fX.jpg = 2 Printers, struggle(sorry for bug on the print)
from 3d2d-imgui.
I just tested two independently working entities, so I'm not sure if it's my code not working. Are you sure you don't for example store the printer status in ENT
instead of `self`` or use the same tdui panel for two entities?
I don't think I can help you further without seeing the code you're using.
from 3d2d-imgui.
Oh that you said was the actual problem, it was storing it on local p, now it is self.p, so no bug, thanks for the help tho! :D
from 3d2d-imgui.
The thing was on the readme i saw "local p" so that's why i did it, thanks for the help 👍
from 3d2d-imgui.
Yeah, I'll try to clarify it a bit. Maybe a PostDrawTranslucentRenderables hook isn't the best example, because most people want to use it for entities
from 3d2d-imgui.
Related Issues (20)
- Font helpers
- Better scale controls
- Skins
- Angle being set by something else HOT 2
- Does this not work anymore? HOT 1
- Input fails if there are reflective surfaces visible on screen HOT 2
- installation link
- Button's and sliders don't work when using gui.EnableScreenClicker? HOT 1
- 3d2d button isn't pressing. HOT 13
- Running serverside code in a button HOT 1
- Interacting with buttons trough walls and props HOT 2
- Performance
- No cursor + Can't press HOT 2
- Buttons not registering? HOT 7
- Text wrapping
- Performance/Usage improvements
- Add pnl:SetMaxRenderDistance
- Add performance debugging tools
- Stencil rectangle should use render queue
- Memoize functions added to render queue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 3d2d-imgui.