Skip to content

Commit

Permalink
3.346
Browse files Browse the repository at this point in the history
fixed little issues
  • Loading branch information
thisdp committed Mar 23, 2019
1 parent 559ca79 commit 30105c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
7 changes: 4 additions & 3 deletions Core/tabpanel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ function dgsCreateTabPanel(x,y,sx,sy,relative,parent,tabHeight,defbgColor)
local _ = dgsIsDxElement(parent) and dgsSetParent(tabpanel,parent,true,true) or table.insert(CenterFatherTable,tabpanel)
dgsSetType(tabpanel,"dgs-dxtabpanel")
dgsSetData(tabpanel,"renderBuffer",{})
dgsSetData(tabpanel,"tabHeight",{tabHeight or styleSettings.tabpanel.tabHeight,false})
local tabHeight = tabHeight or styleSettings.tabpanel.tabHeight
dgsSetData(tabpanel,"tabHeight",{tabHeight,false})
dgsSetData(tabpanel,"tabMaxWidth",{10000,false})
dgsSetData(tabpanel,"tabMinWidth",{10,false})
dgsSetData(tabpanel,"font",systemFont)
Expand All @@ -26,8 +27,8 @@ function dgsCreateTabPanel(x,y,sx,sy,relative,parent,tabHeight,defbgColor)
insertResourceDxGUI(sourceResource,tabpanel)
calculateGuiPositionSize(tabpanel,x,y,relative,sx,sy,relative,true)
local abx = dgsElementData[tabpanel].absSize[1]
local rendertarget = dxCreateRenderTarget(abx,tabHeight or 20,true)
if not isElement(renderTarget) then
local rendertarget = dxCreateRenderTarget(abx,tabHeight,true)
if not isElement(rendertarget) then
local videoMemory = dxGetStatus().VideoMemoryFreeForMTA
outputDebugString("Failed to create render target for tab list of dgs-dxtabpanel [Expected:"..(0.0000076*abx*(tabHeight or 20)).."MB/Free:"..videoMemory.."MB]",2)
end
Expand Down
2 changes: 0 additions & 2 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2544,8 +2544,6 @@ function renderGUI(v,mx,my,enabled,rndtgt,position,OffsetX,OffsetY,galpha,visibl
end
elseif dxType == "dgs-dxcombobox-Box" then
local combo = eleData.myCombo
local x,y = dgsGetPosition(v,false,true)
local w,h = eleData.absSize[1],eleData.absSize[2]
if x and y then
if eleData.PixelInt then
x,y,w,h = x-x%1,y-y%1,w-w%1,h-h%1
Expand Down
15 changes: 7 additions & 8 deletions test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ function createTest3()
end

function createTest4()
rb1 = dgsCreateComboBox(500,400,200,30,"test",false)
local window = dgsCreateWindow(100,100,400,400,"test",false)
tabp = dgsCreateTabPanel(0,0,400,400,false,window)
tab1 = dgsCreateTab("DGS",tabp)
rb1 = dgsCreateComboBox(0,0,200,30,"test",false,tab1)
for i=1,20 do
dgsComboBoxAddItem(rb1,i)
end
Expand Down Expand Up @@ -185,12 +188,6 @@ function centerEdit()
dgsSetProperty(edit,"alignment","center")
end

function mediaTest()
local media = dgsCreateMedia(600,600)
--local image = dgsCreateImage(200,100,400,400,media,false)
dgsMediaLoadMedia(media,"liquicity.mp4","VIDEO")
end

function dgsAnimTest()
if not dgsEasingFunctionExists("shadowOffset") then
dgsAddEasingFunction("shadowOffset",[[
Expand Down Expand Up @@ -243,7 +240,9 @@ end

function Plugin_media()
bro = dgsCreateMediaBrowser(600,600)
img = dgsCreateImage(400,200,600,600,bro,false)
rndRect1 = dgsCreateRoundRect(1,tocolor(255,255,255,255),bro)
material1 = dgsCreate3DInterface(0,0,4,4,2,800,500,tocolor(255,255,255,255),1,0,0,_,0)
img = dgsCreateImage(0,0,800,500,rndRect1,false,material1)
dgsMediaLoadMedia(bro,"test.webm","VIDEO") -- Give a video file PLZ! (Only .webm file)
--dgsMediaLoadMedia(bro,"test.ogg","AUDIO") -- Give a audio file PLZ! (Only .ogg file)
dgsMediaPlay(bro)
Expand Down

0 comments on commit 30105c4

Please sign in to comment.