Jump to content

thisdp

Scripting Moderators
  • Posts

    535
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by thisdp

  1. Here's a lot of trick to achieve that. besides what is mentioned by sFxMTA, we can also do one of the following methods. 1. dgsSetLayer(window,"top") 2. dgsSetProperty(theElementYouWantThemStayAsBackground,"changeOrder",false) 3. dgsSetParent(window,theElementYouWantThemStayAsBackground) 4. dgsSetLayer(theElementYouWantThemStayAsBackground,"bottom")
  2. The "relative" is calculated according to "parent". For example local labelA = guiCreateLabel(100,100,400,200,"",false) local labelB = guiCreateLabel(0.1,0.2,0.5,0.5,"",true,labelB) for labelB, it's x = 0.1 * 400 y = 0.2 * 200 width = 0.5 * 400 height = 0.5 * 200 In this way, we can know that: x = relativeX * parentWidth y = relativeY * parentHeight width = relativeWidth * parentWidth height = relativeHeight * parentHeight If there's no parent, parentWidth and parentHeight will be screenWidth and screenHeight.
  3. maybe try to change the randomseed by math.randomseed
  4. maybe try DGS' blurbox ? https://github.com/thisdp/dgs/blob/master/plugin/BlurBox.lua wiki: https://wiki.multitheftauto.com/wiki/DgsCreateBlurBox
  5. are you using wrong image ?
  6. Maybe this? https://github.com/thisdp/dgs/blob/master/plugin/mask/maskTexture.fx
  7. See the example on https://wiki.multitheftauto.com/wiki/WasEventCancelled wasEventCancelled is used after triggerEvent.
  8. Can confirm there may exist some issue in dxCreateTexture. I have also encountered the same situation.
  9. It is too secure to prevent user from inputing... The problem that @MatrixGene mentioned is we can't input Chinese Characters into CEF. What we need is an input method handler just like guiEdit.
  10. Well, CEF with CEGUI also doesn't handle input method.
  11. Because MTA doesn't handle Input Method for CEF.
  12. Happy new year! And thanks so many developers who bring interesting projects.
  13. This will be an important evolution to dx based gui. HTML to DX. To implement this idea, we will have a lot of thing to do. Parse HTML is not simple.
  14. CEF will cause more crashes. CEGUI, pure dx or DGS( baesd on DX) are recommended. pure dx and DGS can provide more effects than CEGUI. DGS is based on dx which provides CEGUI-like usage and more widgets/plugins with almost well documented. BTW, DGS has been alive (developing) for several years. https://wiki.multitheftauto.com/wiki/dgs
  15. If you want to disable DGS native close button on a specific window, just use dgsWindowSetCloseButtonEnabled For children positioning issue, maybe you can use dgsSetProperty(yourWIndow,"ignoreTitle",true)
  16. Do you want to make a dx gridlist or use existing one?
  17. No function creates menu, you need to design your menu and implement it with existing types of dgs elements. You can get start with dgs Image or dgs Button. And you'd better to learn how to use GUI before using DGS. COS and SIN are the functions in math, which is able to draw a circle easily.
  18. local obj=createObject(1947,191.14917, -107.59645, 1.54682-1) function d() setElementRotation(obj, 0, 0, (getTickCount()/10)%360) end addEventHandler("onClientRender", getRootElement(), d) For fps ineffective rotation
×
×
  • Create New...