andlabs / ui

Platform-native GUI library for Go.
Other
8.33k stars 651 forks source link

Put icon inside a button and have a textarea #284

Open 8lall0 opened 6 years ago

8lall0 commented 6 years ago

Hi,

i have two questions:

Thanks a lot.

andlabs commented 6 years ago

For the former, yes; that is covered by #277 as libui has a MultilineEntry control.

For the latter, that isn't possible yet. I will first need to add images, which is forthcoming to libui anyway. Once that's done, I'll be able to start thinking about what image-button facilities I should provide, and whether any of those facilities should use stock icons (and where to get those stock icons on Windows and OS X).

GopherAtl commented 6 years ago

Slightly tangent, but am I to take it from the lack of images that the example used over in screentext/zz_test.go is a non-thing? Working on a project where I ideally need to combine gui and some custom drawing (layered tile maps & tilesets) in a single window, and was hoping this would prove to be the package I needed. That example created an AreaHandler, which is clearly incompatible with the current version of AreaHandlers, but I was holding on to the hope that the method it used to blit an image.Image into a ui.Window was still viable.

GopherAtl commented 6 years ago

Had a chance to take another, closer look myself, and it seems like the screentext program was written against some early version of ui that was doing rastered instead of vectored elements? AreaHandler no longer has that Paint() method that provides a pointer to an image, instead having the Draw() method, which, based on it's arguments and what I can see in draw.go, appears purely for vector-based rendering. For the gui side of things, that change makes a lot of sense and was probably the best way to go, even if it's disappointing for my specific use case. Ah well. Will watch this project regardless.

andlabs commented 6 years ago

Yes. In fact, the screentext package is deprecated and should not be used (it was entirely misguided design-wise). libui will have its facilities anyway, and so does package ui as it stands now.

You will be able to draw bitmaps into areas soon.

Nv7-GitHub commented 3 years ago

Any timeline on drawing bitmaps into areas? The Image BrushType is still unimplemented :(