Jump to content

Kilometrs

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Kilometrs

  1. I wanted to ask for help considering DGS grid lists. In the old version with GUI system, you could make a grid with rows, columns and items and if items contained some information, you could double-click on them to change the data in the cell (with another window that pops up, that is). Is there any way to do this in DGS?
  2. After some tinkering around, I found out that the issue was caused because the button, supposedly, clicked twice (once on the press and once on the release (?)). Placed in dgsSetEnable( button, false) and the problem vanished.
  3. I checked already and there is no trace to the function being called twice. This issue also arouse, when I "translated" the code from the original GUI to DGS. The output from the outputDebugString(debug.traceback(ConfirmDeleteWin) me one result when it is placed in the start of function and 2 results when in the end of it. DGSDebug also shows them both as different. What can I do with the ID's I get (how/where do I use them to track down where the window was called from)?
  4. Thank you for you answer, I think I understood the idea, but in my case, I need to get rid of the duplicate window, so there is only one.
  5. My issue is that for some reason after pressing the corresponding button to call the function, two windows pop up one on another. One of the is responsive (as in - you can press the buttons and they work), the other one can be moved around but the buttons don't lead anywhere. Any ideas why? The code is redesigned older code for the OwlGaming roleplay gamemode (from 2015. if I remember correctly). function showConfirmDelete(id, brand, model, createdby) local w, h = 400,150 ConfirmDeleteWin = dgsCreateWindow((screenwidth-w)/2,(screenheight-h)/2,w,h,"Transportlīdzekļa dzēšana",false, _, _, _, _, _, _, _, true) dgsSetAlpha(vehLib, 0.1) local bty, bth = 0.6, 0.2 labels[8] = dgsCreateLabel(0.0254,0.2072,0.9645,0.1982,"Tu čista gribi dzēst #"..id.."("..brand.." "..model.."), ko veidojis "..createdby.."?",true,ConfirmDeleteWin) dgsLabelSetHorizontalAlign(labels[8],"center",false) labels[9] = dgsCreateLabel(0.0254,0.4054,0.9492,0.2162,"Šī rīcība ir neatgriezeniska!",true,ConfirmDeleteWin) dgsLabelSetHorizontalAlign(labels[9],"center",false) buttons[10] = dgsCreateButton(0.0254,bty,0.4695,bth,"Atcelt",true,ConfirmDeleteWin, _, _, _, _, _, _, 0x99FF0000) dgsSetFont(buttons[10],"clear") addEventHandler("onDgsMouseClick", buttons[10], function() if source == buttons[10] then closeConfirmDelete() end end) buttons[11] = dgsCreateButton(0.5051,bty,0.4695,bth,"Apstiprināt",true,ConfirmDeleteWin, _, _, _, _, _, _, 0x9900FF00) dgsSetFont(buttons[11],"clear") addEventHandler("onDgsMouseClick", buttons[11], function() if source == buttons[11] then triggerServerEvent("vehlib:deleteVehicle", localPlayer, id) closeConfirmDelete() playSuccess() end end) end If required, can provide more parts that could be linked to this bit of code.
×
×
  • Create New...