so, im wanting to make 2 DFrames next to each other, but i want like a spacing between them, so far my code is
[code]
InventoryPanel:SetPos( ModelPanel:GetWide() - InventoryPanel:GetWide(), ScrH()/2-(h2/1.5) )
[/code]
but it just over laps them
how would i have 2 DFrames exactly next to each other?
[IMG]http://img.ctrlv.in/img/15/12/05/5662f1b5190ea.png[/IMG]
-snip-
Read wrong...
Here's an idea:
Make a variable, that will define the width of BOTH panels combined. Something like
[code]local maxwidth = math.ceil( ScrW() / 2 )[/code]
Then, make a variable that will define the width of the first panel ( left ), that is LESS than the max variable above
[code]local leftwidth = math.ceil( ScrW() / 4 ) -- Alternatively, you could use math.ceil( maxwidth / 2 ) to make both panels the same width[/code]
Then when you have created the panels, width for the first one will be
[code]
PanelLeft:SetWide( leftwidth )
[/code]
And the width for the right one will be
[code]
PanelRight:SetWide( maxwidth - leftwidth )
[/code]
Seems logical and simple enough, right?
math.ceil is neccessary when dividing so that there will be no fractional widths like 35.5 so that there will be no random holes on some screen resolutions.
[QUOTE=Robotboy655;49251388]Here's an idea:
Make a variable, that will define the width of BOTH panels combined. Something like
[code]local maxwidth = math.ceil( ScrW() / 2 )[/code]
Then, make a variable that will define the width of the first panel ( left ), that is LESS than the max variable above
[code]local leftwidth = math.ceil( ScrW() / 4 ) -- Alternatively, you could use math.ceil( maxwidth / 2 ) to make both panels the same width[/code]
Then when you have created the panels, width for the first one will be
[code]
PanelLeft:SetWide( leftwidth )
[/code]
And the width for the right one will be
[code]
PanelRight:SetWide( maxwidth - leftwidth )
[/code]
Seems logical and simple enough, right?
math.ceil is neccessary when dividing so that there will be no fractional widths like 35.5 so that there will be no random holes on some screen resolutions.[/QUOTE]
thanks i managed to get it working!
[IMG]http://img.ctrlv.in/img/15/12/05/5663220b190ee.png[/IMG]
Sorry, you need to Log In to post a reply to this thread.