Jump to content

CreateMenu()


Alienhead
 Share

Recommended Posts

Not 100% sure this is a bug or not... but I cannot create a top shelf menu bar when Im running the interface in 3d window mode.

The command is ran and gives no error and by all means the menu exist since I can get a ssid off it... but no menu appears.

 

image.thumb.png.4096074ad22b0ba08dfab4ce75af7429.png

I'm only happy when I'm coding, I'm only coding when I'm happy.

Link to comment
Share on other sites

  • 2 weeks later...

Menus might not work correctly with a 3D interface because all their submenus are created as separate windows. For an interface like you are showing here, or like the level editor has, I recommend using the first setup example here:
https://www.ultraengine.com/learn/CreateInterface

The menu widget is meant more for applications than games.

You can then create a borderless child window for the viewport, parented to your main window, using WINDOW_CHILD for the window style. This is how any WIndows program that shows the WIn32 GUI with a 3D rendering viewport works.

The last step is you need to detect window size events, and resize the viewport window whenever the main window is resized using Window:SetShape(). This is best done in an event callback so the viewport window will resize as you are dragging the window edges.

This will give you menus that appear on top of the 3D window, a more responsive interface, faster window resizing, and better text rendering.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

What language are you developing this program in? I can probably put together an example quickly that shows the recommended setup.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...