Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Derma panels are cropped (Tested inside an entity) #20

Open
sigmasoldi3r opened this issue Mar 29, 2017 · 0 comments
Open

Derma panels are cropped (Tested inside an entity) #20

sigmasoldi3r opened this issue Mar 29, 2017 · 0 comments
Labels

Comments

@sigmasoldi3r
Copy link

What happens:

All derma drawing is discarded beyond a certain size (Seems that this size is similar to the screen's resolution).

gm_construct_flatgrass_v6-20002

Since Gmod Derma uses the very screen it may happen that this will not work never, but if there's a solution aside from scaling up the derma it would be nice. (Sure that scaling up the viewport may patch the issue, but the resolution is drastically decreased).

Steps to reproduce:

Create any derma panel using vgui.Create('DFrame');, then set a size higher than your screen resolution.

Code used:

if SERVER then return; end; --Ensure clientside only
function ENT:Initialize()
	local frame = vgui.Create( "DFrame" );
	frame:SetTitle( self.title );
	frame:SetPos( 0, 0 );
	frame:SetSize( 2048, 2048 ); --This can be any W x H
	self.frame = frame;
end
function ENT:Draw()
	self:DrawModel();
	local o = self:GetPos();
	local ang = self:GetAngles();
	local topleft = ang:Forward() * self.corner.x + ang:Right() * self.corner.y;
	-- Above code is for positioning the screen only.
	vgui.Start3D2D( o - topleft + ang:Up() * 1.6, ang, self.scale);
		self.frame:Paint3D2D(); -- here paint the frame
	vgui.End3D2D();
end
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants