ui icon indicating copy to clipboard operation
ui copied to clipboard

Put icon inside a button and have a textarea

Open 8lall0 opened this issue 7 years ago • 5 comments

Hi,

i have two questions:

  • is possible/is planned to have a textarea (or a multiline input field)?

  • How do i make an icon button, if is possible?

Thanks a lot.

8lall0 avatar Mar 29 '18 12:03 8lall0

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).

andlabs avatar Mar 29 '18 15:03 andlabs

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 avatar Mar 30 '18 13:03 GopherAtl

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.

GopherAtl avatar Mar 30 '18 20:03 GopherAtl

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.

andlabs avatar Mar 31 '18 00:03 andlabs

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

Nv7-GitHub avatar Apr 07 '21 16:04 Nv7-GitHub