thisdp / dgs

Thisdp's Dx Graphical User Interface System (MTA Dx Lib)
http://wiki.mtasa.com/wiki/dgs
63 stars 34 forks source link

OOP PostGUI always TRUE #74

Closed 538Michael closed 4 years ago

538Michael commented 4 years ago

When using OOP all elements are always postGUI TRUE, even using :setPostGUI(false). POP version (dgsSetPostGUI) works fine.

I'm using wiki OOP window example, adding :setPostGUI(false)

 loadstring(exports.dgs:dgsImportOOPClass(true))()-- load OOP class
 window = dgsWindow(0,0,0.5,0.1,"test",true):setPostGUI(false) --create a window with oop
 label = window:dgsLabel(0,0,1,1,"label",true) --create a label inside the window ( Correct )
 label.text = "DGS OOP Test" --set text
538Michael commented 4 years ago

Found why, in classlib.lua there's:

setPostGUI = dgsOOP.genOOPFnc("dgsGetPostGUI",true),

Should be:

setPostGUI = dgsOOP.genOOPFnc("dgsSetPostGUI",true),

But now another issue: It just applies the postGUI to the element and not to the whole children.

thisdp commented 4 years ago

fixed