Git Product home page Git Product logo

Comments (5)

flamendless avatar flamendless commented on August 25, 2024 1

Please show minimal code that shows the behavior you raise has the issue

from slab.

ashifolfi avatar ashifolfi commented on August 25, 2024

Also I would like to add the same result occurs even if I don't have an if statement for begin window and just have it on it's own. Except for one thing. The menu bar now appears even when the window is closed.

from slab.

ashifolfi avatar ashifolfi commented on August 25, 2024

apologies for the wait!

lvledit.win = {}
lvledit.win.main = {Title = "Level Editor", IsOpen = true, AutoSizeWindow = false, AllowResize = true}

function lvledit:drawMain(dt)
    Slab.BeginWindow("lvl_main", lvledit.win.main)
    -- Menu Bar
    if Slab.BeginMenuBar() then
        if Slab.BeginMenu("File") then
            if Slab.MenuItem("New") then
                print("Not Implemented")
            end
            if Slab.MenuItem("Open") then
                print("Not Implemented")
            end
            Slab.Separator()
            if Slab.MenuItem("Exit") then
                print("Not Implemented")
            end
    	end
        Slab.EndMenuBar()
    end
    Slab.Text("TEST!")
    Slab.EndWindow()
end

here is a stripped down variant of the window that I found this issue with.
Just put lvledit:drawMain(dt) inside a standard slab setup alongside this code and it should trigger the issue.

from slab.

ashifolfi avatar ashifolfi commented on August 25, 2024

NOTE: Though this differs slightly from that that you can see in the recording it does indeed still trigger the issue for me.

from slab.

flamendless avatar flamendless commented on August 25, 2024

Sorry for the late response, you need Slab.EndMenu().

    Slab.BeginWindow("lvl_main", lvledit.win.main)
		if Slab.BeginMenuBar() then
			if Slab.BeginMenu("File") then
				if Slab.MenuItem("New") then
					print("Not Implemented")
				end
				if Slab.MenuItem("Open") then
					print("Not Implemented")
				end
				Slab.Separator()
				if Slab.MenuItem("Exit") then
					print("Not Implemented")
				end
				Slab.EndMenu() --THIS
			end
			Slab.EndMenuBar()
		end
		Slab.Text("TEST!")
    Slab.EndWindow()

from slab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.