Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageButton disable border #1254

Closed
raresica1234 opened this issue Jul 30, 2017 · 2 comments
Closed

ImageButton disable border #1254

raresica1234 opened this issue Jul 30, 2017 · 2 comments

Comments

@raresica1234
Copy link

Hello everybody, I have a strange issue, I don't know how to disable the border on an ImageButton:

Example
Thanks!

@colesnicov
Copy link

Hello, sorry for bad language.

If You can play with frame_padding argument of ImageButton function or with border color style eg. PushStyleColor(ImGuiCol_Border, ...) ?

@ocornut
Copy link
Owner

ocornut commented Jul 31, 2017

As a general tip, use your programmer IDE feature to jump to function declarations and definitions where you are likely to find comments about them.

// frame_padding < 0: uses FramePadding from style (default)
// frame_padding = 0: no framing
// frame_padding > 0: set framing size
// The color used are the button colors.
bool ImGui::ImageButton(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, int frame_padding, const ImVec4& bg_col, const ImVec4& tint_col)

PS: Consider merging in an icon font into the default font if you are going to use icons, this makes things much simpler and natural. Read extra_fonts/README.txt about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants