giu icon indicating copy to clipboard operation
giu copied to clipboard

How to drag a frameless window or get the monitor size?

Open daiwhea opened this issue 3 years ago • 3 comments

Sorry, this is not a bug. My issue is:

I need a narrow frameless window which just take a little part of screen, and I wish put it on the top center. or I can drag it to some place.

But I don't find a method to get the monitor size to make window center. Or how to drag a frameless window.

Thanks for your time. s^_^s

daiwhea avatar Nov 28 '22 03:11 daiwhea

For monitor size - neigher giu nor imgui-go share methods to do this. You can check in go-gl/glfw or google for module providing such a system info for dragging window - it is most likely feature from docing branch

gucio321 avatar May 09 '23 16:05 gucio321

Is there a plan or timeline for when the docking code might be merged?

damntourists avatar Aug 18 '23 21:08 damntourists

See #628

gucio321 avatar Aug 19 '23 05:08 gucio321

package main

import (
	"image/color"

	"github.com/AllenDang/giu"
)

func loop() {
	giu.Window("I'm a window").Layout(
		giu.Label("Hello World"),
	)
}

func main() {
	wnd := giu.NewMasterWindow("Frameless window", 640, 480, giu.MasterWindowFlagsFrameless|giu.MasterWindowFlagsTransparent|giu.MasterWindowFlagsMaximized)
	wnd.SetBgColor(color.RGBA{255, 0, 0, 0})
	wnd.Run(loop)
}

this (or some variant of this :smile:) should help

gucio321 avatar Feb 19 '24 17:02 gucio321

lmk if you still need help

gucio321 avatar Feb 19 '24 17:02 gucio321