Jump to content

Recommended Posts

  • Scripting Moderators
6 hours ago, Taka said:

Can I somehow return the font from 2.78?

msyh.ttf is very big and has bad effect in render target. If you want this font, use dxCreateFont.

11 hours ago, DmitrySkripak said:

image.png

How to fix this fuzziness? help))


You can use absolute column before add row.

dgsDxGridListSetColumnRelative(gridlist,false)

 

Or you can use no render target mode.

dgsDxGUISetProperty(gridlist,"mode",true)

  • Thanks 1
Link to comment
  • Scripting Moderators
7 hours ago, anchor said:

update:
i use this https://wiki.multitheftauto.com/wiki/Filepath to get the function working..

 

and another question is, the color code, i dont know what color code did dsg use?

Why not use dxCreateTexture. It will work faster. If not, dgs will first copy the image file to its directory and then load it from disk when creating dxgui.

The color in dgs is always using an integer which can translated by tocolor().

Link to comment
14 hours ago, thisdp said:

Why not use dxCreateTexture. It will work faster. If not, dgs will first copy the image file to its directory and then load it from disk when creating dxgui.

The color in dgs is always using an integer which can translated by tocolor().

ah yes, it's work faster, thanks!

2 hours ago, Skully said:

@thisdp Do you plan to make GuiEditSetMasked?

dgsDxGUISetProperty(editBox,"masked",true)
  • Like 1
Link to comment
25 minutes ago, SmoothGarlic said:

Hey, i am it again.

Am i able to do animations with dgs functions like dgsMoveTo ? Like with InterpolateBetween for GUIs or other dx things?

Can u explain me this functions or add it to the wiki ? :)

DGS = exports.dgs
showCursor(true)
cmd = DGS:dgsDxCreateCmd(299, 167, 451, 427,false,false,false,false,false,false,tocolor(113, 206, 106, 62)) 
DGS:dgsDxGUISetVisible(cmd,true) 


setTimer(function()
local x,y = interpolateBetween(200,100,0,299,167,0,(getTickCount()-start)/3000,"OutElastic") 
DGS:dgsMoveTo(cmd,x,y,false,false,"OutQuad",300)
end,310,1)


start = getTickCount()

 

Link to comment
  • Scripting Moderators
On 2017/9/12 at 02:23, DmitrySkripak said:

When pictures try to draw, it's clear that the turbidity. I do not use relativ. I use the dimensions of the picture itself and still vague. How can I decide? Sorry for the bad english.

Give me the screenshot :D

--[[Easing Type can be found through the function such as getEasingValue or others.]]
DGS:dgsMoveTo(dxgui,targetX,targetY,Relative,false,EasingType,timeMS) -- This works fine.
DGS:dgsMoveTo(dxgui,targetX,targetY,Relative,true,EasingType,speedX,speedY) -- I think this is buggy.

DGS:dgsSizeTo(dxgui,targetW,targetH,Relative,false,EasingType,timeMS) -- This works fine.
DGS:dgsSizeTo(dxgui,targetW,targetH,Relative,true,EasingType,speedX,speedY) -- I think this is buggy.

DGS:dgsAlphaTo(dxgui,targetAlpha,false,EasingType,timeMS) -- This works fine.
DGS:dgsAlphaTo(dxgui,targetAlpha,true,EasingType,speed) -- I think this is buggy.

 

Edited by thisdp
  • Like 1
  • Thanks 1
Link to comment
19 hours ago, thisdp said:

Give me the screenshot :D


--[[Easing Type can be found through the function such as getEasingValue or others.]]
DGS:dgsMoveTo(dxgui,targetX,targetY,Relative,false,EasingType,timeMS) -- This works fine.
DGS:dgsMoveTo(dxgui,targetX,targetY,Relative,true,EasingType,speedX,speedY) -- I think this is buggy.

DGS:dgsSizeTo(dxgui,targetW,targetH,Relative,false,EasingType,timeMS) -- This works fine.
DGS:dgsSizeTo(dxgui,targetW,targetH,Relative,true,EasingType,speedX,speedY) -- I think this is buggy.

DGS:dgsAlphaTo(dxgui,targetAlpha,false,EasingType,timeMS) -- This works fine.
DGS:dgsAlphaTo(dxgui,targetAlpha,true,EasingType,speed) -- I think this is buggy.

 

Thank you. I already figured out) I had to give up (relative = true ) and use the actual size of the images, without stretching and decreasing.

Link to comment
  • Scripting Moderators
5 hours ago, DmitrySkripak said:

Thank you. I already figured out) I had to give up (relative = true ) and use the actual size of the images, without stretching and decreasing.

relative = true should work fine.

Link to comment
  • Scripting Moderators
1 hour ago, DmitrySkripak said:

This is work fine, but how i use images then they become turbid

You can use image. But it requires dgsDxGUISetProperty. And turbid?  If you want to let the image blur,  you should make a shader (.fx file).

If you just want to set its alpha smoothly, use dgsAlphaTo.

Link to comment
  • Scripting Moderators
13 hours ago, DmitrySkripak said:

How to align text in editbox to center? Thank you for answers)

Can't do it now XD. But you can create a label above the edit.

Edited by thisdp
  • Like 1
Link to comment

Hello i have an problem. I've created an window with couple buttons, but when i press the button it calls the function two times or even more..
code: 
 

--the button
gButtonVehRespawn = edit:dgsDxCreateButton(0.825, 0.076, 0.16, 0.06, "Respawn", true, tabVehicles)

-- code
	addEventHandler("onClientDgsDxMouseClick",root,function()
	if source == gButtonVehRespawn  then
		btRespawnOneVehicle()
		
		elseif source == gButtonAllVehRespawn then
			showrespawn()
		end
	end)

 

Link to comment
  • Scripting Moderators
2 hours ago, Daniels69 said:

Hello i have an problem. I've created an window with couple buttons, but when i press the button it calls the function two times or even more..
code: 
 


--the button
gButtonVehRespawn = edit:dgsDxCreateButton(0.825, 0.076, 0.16, 0.06, "Respawn", true, tabVehicles)

-- code
	addEventHandler("onClientDgsDxMouseClick",root,function()
	if source == gButtonVehRespawn  then
		btRespawnOneVehicle()
		
		elseif source == gButtonAllVehRespawn then
			showrespawn()
		end
	end)

 

You must read wiki : https://wiki.multitheftauto.com/wiki/OnClientDgsDxMouseClick

This is different from onClientGUIClick

Both Press and Release will be detected.

Link to comment

 

Ok, a possible question
 

Why appear in Chat twice?

Example
outputChatBox("Test",255,255,255)
Test this appears in Twic 

 

 

8 minutes ago, #x1MeKky said:

 

Ok, a possible question
 


Why appear in Chat twice?


Example
outputChatBox("Test",255,255,255)
Test this appears in Twic 

 

 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...