giu
giu copied to clipboard
[Feature Request] Questions about the main window
Related problem
I set the main window to be borderless (actually I don't want the main window).
Then I want to press and hold the "good" imgui window to drag.
At present, I can't drag.
This is my code and effect:
English annotation text of effect picture "I want to press and hold here to drag the window anywhere on the screen"
Thanks your help!!
Your request
1.Hide main window(Maybe that can replace it with no border) 2.Full screen drag and drop for sub windows
Alternative solution
It may be possible to move the main window by getting the drag message of the child window and passing it to the main window.
Additional context
package imgui
import ( "fmt" g "github.com/AllenDang/giu" "image/color" )
var wnd *g.MasterWindow
func Load() { flag := g.MasterWindowFlagsTransparent | g.MasterWindowFlagsNotResizable | g.MasterWindowFlagsFloating | g.MasterWindowFlagsFrameless wnd = g.NewMasterWindow("Hello world", 400, 200, flag) wnd.SetBgColor(color.RGBA{}) wnd.SetPos(800, 200) wnd.Run(loop) }
func loop() { flag := g.WindowFlagsNoResize | g.WindowFlagsNoMove | g.WindowFlagsAlwaysUseWindowPadding | g.WindowFlagsAlwaysAutoResize g.Window("good").Flags(flag).Size(400, 200).Layout( g.Label("Hello world from giu"), g.Row( g.Button("Click Me").OnClick(onClickMe), g.Button("I'm so cute").OnClick(onImSoCute), ), )
}
func onClickMe() { fmt.Println("Hello world!") }
func onImSoCute() { fmt.Println("Im sooooooo cute!!") }
Take a look on examples/transparent. It probably does most things your looking for
I looked at examples/transparent. The effect is very similar, but the child window cannot move out of the range of the main window. What I want is that the child window will not be limited by the range of the parent window.
this is official C++ examples, githua branch is docking. The effect I want is this.
The effect is shown in the following figure:
Well i don't exactly know what docking branch is but as far as i remember implementing this stuff is one of the issues @AllenDang is going to face with at first. If the feature you want is available only on the docking branch of imgui it isn't probably implemented in giu yet
ok, thank u, i will wait for your integration.
As far as i can see it is a duplicate of #512
I just got an idea: How about making a master window full screened, transparent and decorationless, than just add a normal giu.Window?
I just got an idea: How about making a master window full screened, transparent and decorationless, than just add a normal giu.Window?
Then we need mouse passthrough I think. Otherwise otherwise you won't be able to interact with anything outside the app
ok, I'm going to close this as duplicate of our Docking issue #512 In case of " mouse passthrough" see #559 (I think it is the same feature)