-
Posts
535 -
Joined
-
Last visited
-
Days Won
9
Posts posted by thisdp
-
-
make sure DGS in your server has higher start priority than those resources that use DGS.
make sure your panel is created after event onClientResourceStart
-
You can download MTA server from https://nightly.mtasa.com/
-
11 hours ago, relvarten said:
I realized that the MTA rotation system is broken when I was trying to write the most common vehicle flip. I encountered exactly the same (or about the same) that you show on the video – broken Rotation Y.
As I understand it, the MTA tries to avoid Rotation Y. For example, instead of RY + 90, the MTA seems to have used the chain RX - 90 > RZ - 90 > RX + 90. I believe this is a global MTA flaw, which I hope will be fixed sooner or later.
P.S. I would understand if you indicated the wrong ZXY instead of the correct ZYX, but all seems correct...
Refer to Gimbal Lock of Euler rotation system. To resolve this, use rotation matrix to apply rotation changes, and then convert back to eular angles.
- 2
-
16 hours ago, AngelAlpha said:
elements.main_profile = dgsCreateScrollPane (0, 80*px, sx, sy - 80*px, false) ........... local gradient = dgsCreateGradient (tocolor(255, 107, 0), tocolor(255, 240, 0), 90 - 12) local gradient2 = dgsCreateGradient (Config.colors[1], Config.colors[1], 0) elements.tabPanel_profile = dgsCreateTabPanel (100*px, 650*px, 1140*px, 332*px, false, elements.main_profile, 60*px, _, tocolor(50, 50, 50, 0)) elements.tabPanel_profile_main = dgsCreateTab("Основная статистика", elements.tabPanel_profile) elements.tabPanel_profile_finance = dgsCreateTab("Имущество", elements.tabPanel_profile) elements.tabPanel_profile_job = dgsCreateTab("Занятость", elements.tabPanel_profile) dgsSetProperty(elements.tabPanel_profile,"tabImage",{gradient2,gradient2,gradient}) dgsSetProperty(elements.tabPanel_profile,"tabPadding",{15*px, false}) dgsSetProperty(elements.tabPanel_profile_main,"textColor",{tocolor(255, 255, 255), tocolor(150, 150, 150), tocolor(0, 0, 0)}) dgsSetProperty(elements.tabPanel_profile_finance,"textColor",{tocolor(255, 255, 255), tocolor(150, 150, 150), tocolor(0, 0, 0)}) dgsSetProperty(elements.tabPanel_profile_job,"textColor",{tocolor(255, 255, 255), tocolor(150, 150, 150), tocolor(0, 0, 0)})
@thisdp and i find a few mistakes
mask.lua > 16 line
if not(masks[texture2]) then error(dgsGenAsrt(texture2,"dgsCreateMask",2,"texture",_,_"unsupported type")) end > if not(masks[texture2]) then error(dgsGenAsrt(texture2,"dgsCreateMask",2,"texture",_,_,"unsupported type")) end
mask.lua > line 69-81
function dgsMaskCenterTexturePosition(dgsMask,w,h) if not(dgsGetPluginType(mask) == "dgs-dxmask") then error(dgsGenAsrt(mask,"dgsMaskCenterTexturePosition",1,"dgs-dxmask")) end local ratio = w/h local scaleW,scaleH = (ratio>1 and ratio or 1),(1/ratio>1 and 1/ratio or 1) dgsMaskSetSetting(dgsMask,"offset",{scaleW/2-0.5,scaleH/2-0.5,1}) end function dgsMaskAdaptTextureSize(dgsMask,w,h) if not(dgsGetPluginType(mask) == "dgs-dxmask") then error(dgsGenAsrt(mask,"dgsMaskAdaptTextureSize",1,"dgs-dxmask")) end local ratio = w/h local scaleW,scaleH = (ratio>1 and ratio or 1),(1/ratio>1 and 1/ratio or 1) dgsMaskSetSetting(dgsMask,"scale",{scaleW,scaleH,1}) end >>> function dgsMaskCenterTexturePosition(mask,w,h) if not(dgsGetPluginType(mask) == "dgs-dxmask") then error(dgsGenAsrt(mask,"dgsMaskCenterTexturePosition",1,"dgs-dxmask")) end local ratio = w/h local scaleW,scaleH = (ratio>1 and ratio or 1),(1/ratio>1 and 1/ratio or 1) dgsMaskSetSetting(mask,"offset",{scaleW/2-0.5,scaleH/2-0.5,1}) end function dgsMaskAdaptTextureSize(mask,w,h) if not(dgsGetPluginType(mask) == "dgs-dxmask") then error(dgsGenAsrt(mask,"dgsMaskAdaptTextureSize",1,"dgs-dxmask")) end local ratio = w/h local scaleW,scaleH = (ratio>1 and ratio or 1),(1/ratio>1 and 1/ratio or 1) dgsMaskSetSetting(mask,"scale",{scaleW,scaleH,1}) end
fixed
- 1
-
2 hours ago, AngelAlpha said:
@thisdp bug with tabPanel. When create tabpanel with attach to parent, Y pos tab wrong.
Pos cursor when tab activated
Pos cursor on tab
Tab panel attached to scrollpanewhat function did you use? I need method to reproduce.
-
Using dxDrawLine3D in onClientPreRender to get better quality
-
Are you trying to find this? https://wiki.multitheftauto.com/wiki/dgs
-
The main reason of the missing button is that you are using "absolute position / size" but you put a "true" in "relative" argument which means you need "relative position / size".
- 1
-
Cheers! And have a nice new year!
- 2
-
here is an example resource for you that you can refer to. https://community.multitheftauto.com/index.php?p=resources&s=details&id=2852
-
Merry Christmas
- 1
-
because you scaled text size in dxGetTextWidth, while in dxDrawText, the text scale is still 1
-
by the way, you need to move your camera at the same coordinate of processLineOfSight, because of the streaming system.
-
19 hours ago, amirmahdi said:
For the car lights, I don't know exactly what engine was used, I only know that the .fx file was used
The road textures are also from the .fx file , jpg file is used to replace the road texture Using engineApplyShaderToWorldTexture
then you have to set "layered"' argument to the texture replace shader
-
There's one in community.mtasa.com : https://community.multitheftauto.com/index.php?p=resources&s=details&id=7613
Or DGS has also implemented 3d text : https://wiki.multitheftauto.com/wiki/DgsCreate3DText
-
how did you replace the texture, shader or engine function?
-
If the quality is what you focus, do not resize text using "scale" in dxDrawText.
The size should be determined when using "dxCreateFont".
-
On 27/09/2022 at 01:37, lMilesl said:
Oh, and one last question - how do I stop the music (destroy it's element I suppose) if after collecting next checkpoint player gets something, that is not a truck anymore? I've been trying to code this in different ways, but can't seem to succeed
try this instead of destroying https://wiki.multitheftauto.com/wiki/SetSoundPaused
-
On 01/09/2022 at 23:39, DaeRoNz said:
@thisdp is possible change border color and size in element dgsCreateRoundRect ?
if yes how .. i tryed some property but nothign workyou have to use dxSetShaderValue, with borderThickness and borderColor. But in dgs roundeded rectangle plugin, there are functions to do that:
dgsRoundRectSetColor
dgsRoundRectSetBorderThickness
-
We don't provide support for MTA Province and Next RP. Ask for help in their forum.
-
I can say: well the same.
-
use dgsSetEnabled to disable the "click action" of a dgs element
- 1
-
combine with rounded rectangle https://wiki.multitheftauto.com/wiki/DgsCreateRoundRect
-
You need to render it with dxDrawImage. Refer to the example https://wiki.multitheftauto.com/wiki/CreateBrowser
Need Help with Layering DGS Elements over dxDraw
in Scripting
Posted · Edited by thisdp
For animation, you can also use dgsAnimTo/dgsMoveTo/dgsSizeTo/dgsAlphaTo
With dgsAddEasingFunction, you can even custom your animation function
If these still can not satisfy you, maybe using dgsCreateCustomRenderer with dgs image to create your dgs plugin, which can make your dxDraws can interact with dgs layer.