Jump to content

Recommended Posts

1 hour ago, Skully said:

@thisdp Is the combobox working? I'm getting this error everytime I try to make one.

dgs\functions.lua:239: attempt to index field '?' (a nil value)

This is the code I'm testing it with;


addEventHandler("onClientResourceStart", resourceRoot,    function()        mainWindow = exports.dgs:dgsDxCreateWindow(0.65, 0.59, 0.22, 0.14, "ComboBox Window", true)	        testCombo = exports.dgs:dgsDxCreateComboBox(0.09, 0.27, 0.52, 0.54, true, mainWindow)        exports.dgs:dgsDxComboBoxAddItem(testCombo, "Test Item")    end)

I'm on update 2.75.

the code should be working

Link to comment
  • Scripting Moderators
On 2017/8/19 at 11:39, Skully said:

@thisdp Is the combobox working? I'm getting this error everytime I try to make one.

dgs\functions.lua:239: attempt to index field '?' (a nil value)

This is the code I'm testing it with;


addEventHandler("onClientResourceStart", resourceRoot,
    function()
        mainWindow = exports.dgs:dgsDxCreateWindow(0.65, 0.59, 0.22, 0.14, "ComboBox Window", true)
	        testCombo = exports.dgs:dgsDxCreateComboBox(0.09, 0.27, 0.52, 0.54, true, mainWindow)
        exports.dgs:dgsDxComboBoxAddItem(testCombo, "Test Item")
    end
)

I'm on update 2.75.

I tested, it works.

Link to comment
  • Scripting Moderators
2 minutes ago, Skully said:

Did you test with the latest from the GitHub? I didn't change anything and I'm using the one from there.

use /updatedgs to update to the latest version. It seems dgs get the width and height of a dgs-dxgui , but the dgs-dxgui is not existing.

11 minutes ago, Skully said:

Did you test with the latest from the GitHub? I didn't change anything and I'm using the one from there.

and dgsDxGridListGetSelectedItem returns -1 as guiGridListGetSelectedIte was so, if not selected.

Edited by thisdp
Link to comment
  • Scripting Moderators
15 hours ago, Semih2281 said:

if i change the design of the lib completely, like outlined button etc. and type updatedgs will it overwrite my designed button and change it back to default?

Well. You can use dgsDxGUISetProperty to change the style (color,image,font...).

But if you change the code of DGS, plz don't use updatedgs again. Because it will overwrite what you have changed.

  • Like 1
Link to comment
  • Scripting Moderators
3 hours ago, Malone. said:

GUI Need Few Edits it's so bigger, try to low it , you should making it more small .

waht do you mean?

Link to comment
  • Administrators
1 hour ago, Malone. said:

the Size is so bigger the window check it in the screenshot you put it.

If your recent posts are anything to go by, you're probably using this resource incorrectly.

Care to share a better explanation or provide screenshots yourself of the problem you're having?

  • Like 1
Link to comment
  • Scripting Moderators
On 2017/8/24 at 13:51, maksam07 said:

Edit the wiki

https://wiki.multitheftauto.com/wiki/DgsDxCreateWindow


row = 0

change to


row = 1

Because the lines begin with one (at least in the latest versions)

Thanks. Row and Column in dgs start from 1, because I use table and table count #mytable.

Edited by thisdp
Link to comment
  • Scripting Moderators
21 hours ago, DmitrySkripak said:

How to put dgsDxCreateWindow Over all elements? property AlwayOnTop doesn`t work. Thank you

AlwayOnTop is not dgs property.

21 hours ago, DmitrySkripak said:

How to put dgsDxCreateWindow Over all elements? property AlwayOnTop doesn`t work. Thank you
DGS = exports.dgs

window = DGS:dgsDxCreateWindow(...)

addEventHandler("onClientDgsDxBlur",root,function()

  if source == window then

    DGS:dgsDxGUIBringToFront(window)

  end

end)



addEventHandler("onClientDgsDxGUICreate",root,function()

    DGS:dgsDxGUIBringToFront(window)

end)

 

Link to comment
4 hours ago, thisdp said:

AlwayOnTop is not dgs property.


DGS = exports.dgs

window = DGS:dgsDxCreateWindow(...)

addEventHandler("onClientDgsDxBlur",root,function()

  if source == window then

    DGS:dgsDxGUIBringToFront(window)

  end

end)



addEventHandler("onClientDgsDxGUICreate",root,function()

    DGS:dgsDxGUIBringToFront(window)

end)

 

 

11 hours ago, maksam07 said:

dgsDxGUIBringToFront

Oh, thank you ))

Link to comment
  • Scripting Moderators
18 hours ago, anchor said:

how to destroy many elements that have no parent?

maybe there is a function like getResourceGUIElement ?

Added: 

dgsGetDxGUIFromResource

 

dgsGetDxGUINoParent

 

To know the detail. See update log: http://angel.mtaip.cn:233/dgsUpdate/

Edited by thisdp
  • Thanks 2
Link to comment
  • Scripting Moderators
2 minutes ago, anchor said:

woow nice thanks! it would be useful

:D np. Make Dx easier to use is my target.

Edited by thisdp
  • Thanks 1
Link to comment
  • Scripting Moderators
38 minutes ago, anchor said:

yes

That is why XD. In the bottom of dgs-dxedit, there is a gui-edit for typing (So that we can use Ctrl+V ,IME and other languages). But I rewrite the edit's function.

Edited by thisdp
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...