hiding/showing Menu Bar

Home Forums General Programming hiding/showing Menu Bar

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #65687
    proton
    Participant
      • Topics: 19
      • Replies: 94
      • Total: 113
      • ★★

      Hello Fellas,

      can please somebody help me with the small Lua call for hiding / showing the MenuBar?
      I figured out that I need a call setting these two properties uiPanelMenuBarVisible=”0″ or uiPanelMenuBarVisible=”1″ for what I want to achieve but that’s about it.
      Short snippet with the right syntax would be a blast! And I’m pretty sure this is very easy for all those Lua wizards here!
      Thank You in advance!
      Have a great day everyone!

      #65783
      proton
      Participant
        • Topics: 19
        • Replies: 94
        • Total: 113
        • ★★

        hmm, no one can help me out??? ;(

        #65993
        atom
        Keymaster
          • Topics: 159
          • Replies: 2945
          • Total: 3104
          • ★★★★★

          A code like this set as a button value change callback, will toggle the visibility of the menu bar:


          --
          -- Called when a modulator value changes
          -- @mod http://ctrlr.org/api/class_ctrlr_modulator.html
          -- @value new numeric value of the modulator
          --
          myMethod = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source)
          if value == 1 then
          panel:getPanelEditor():setProperty("uiPanelMenuBarVisible", 1, false)
          else
          panel:getPanelEditor():setProperty("uiPanelMenuBarVisible", 0, false)
          end
          end

          • This reply was modified 8 years, 3 months ago by atom.
          #65996
          proton
          Participant
            • Topics: 19
            • Replies: 94
            • Total: 113
            • ★★

            Thanks Atom!
            You are The Man!
            Cheers!

            #71833
            human fly
            Participant
              • Topics: 124
              • Replies: 1070
              • Total: 1194
              • ★★★★

              haha…’awesome’ – *works* 🙂

              very useful.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • The forum ‘Programming’ is closed to new topics and replies.
            There is currently 0 users and 51 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