Lua Syntax for Zoom, Editor Bounds and Screen Resolutions!

Home Forums General Programming Lua Syntax for Zoom, Editor Bounds and Screen Resolutions!

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #83850
    seq303
    Participant
      • Topics: 8
      • Replies: 13
      • Total: 21

      Hi how can I slice three parameters into three variables with Lua?

      The ZOOM is so!

      ZOOM = panel: getPanelEditor (): getProperty (“uiPanelZoom”)
      The result is then 1

      code (is working!)

      function GetZOOM ()

      ZOOM = panel: getPanelEditor (): getProperty (“uiPanelZoom”)

      end
      ————————————————–

      For the other two I miss the syntax! How do I write this correctly?

      Editor bounds
      Result should be (“0,0,800,600”) Current Editor Window Resolutions

      code (wrong syntax)

      function GetEDITOR_BOUNDS ()

      EDITOR_BOUNDS = panel: getPanelEditor (): getProperty (“Editor bounds”) Syntax ????

      end
      ————————————————–

      Screen Resolutions (Monitor Windows)

      Result should be (“0,0,1680,1050”) Current resolution of Windows and Monitor

      code (wrong syntax)

      function GetSCREEN_RESOLUTIONS ()

      SCREEN_RESULUTIONS = Syntax ????

      End
      ————————————————–

      How can I get the parameters EDITOR_BOUNDS and SCREEN_RESULUTIONS?

      Can someone give me an example in Lua?

      Greetings Michael

      #83858
      Possemo
      Participant
        • Topics: 14
        • Replies: 638
        • Total: 652
        • ★★★

        I can give you a working syntax for “EDITOR BOUNDS” but I would call it canvas size:

        panel:getPanelEditor():setProperty(“uiPanelCanvasRectangle”, “0 0 1530 1004”, false)

        There are no other size related properties which make sense to modify – e.g. PanelWidth and PanelHeight are not doing anything.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The forum ‘Programming’ is closed to new topics and replies.
      There is currently 0 users and 94 guests online
      No users are currently active
      Forum Statistics
      Threads: 2,495, Posts: 17,374, Members: 77,605
      Most users ever online was 12 on January 22, 2019 3:47 pm
      Ctrlr