-
Notifications
You must be signed in to change notification settings - Fork 185
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
Change background color of child window #240
Comments
have you tried |
What would be the variable? |
Hello, Here, COLOR_TEXT
COLOR_TEXT_DISABLED
COLOR_WINDOW_BACKGROUND
COLOR_CHILD_BACKGROUND
COLOR_POPUP_BACKGROUND
COLOR_BORDER
COLOR_BORDER_SHADOW
COLOR_FRAME_BACKGROUND
COLOR_FRAME_BACKGROUND_HOVERED
COLOR_FRAME_BACKGROUND_ACTIVE
COLOR_TITLE_BACKGROUND
COLOR_TITLE_BACKGROUND_ACTIVE
COLOR_TITLE_BACKGROUND_COLLAPSED
COLOR_MENUBAR_BACKGROUND
COLOR_SCROLLBAR_BACKGROUND
COLOR_SCROLLBAR_GRAB
COLOR_SCROLLBAR_GRAB_HOVERED
COLOR_SCROLLBAR_GRAB_ACTIVE
COLOR_CHECK_MARK
COLOR_SLIDER_GRAB
COLOR_SLIDER_GRAB_ACTIVE
COLOR_BUTTON
COLOR_BUTTON_HOVERED
COLOR_BUTTON_ACTIVE
COLOR_HEADER
COLOR_HEADER_HOVERED
COLOR_HEADER_ACTIVE
COLOR_SEPARATOR
COLOR_SEPARATOR_HOVERED
COLOR_SEPARATOR_ACTIVE
COLOR_RESIZE_GRIP
COLOR_RESIZE_GRIP_HOVERED
COLOR_RESIZE_GRIP_ACTIVE
COLOR_PLOT_LINES
COLOR_PLOT_LINES_HOVERED
COLOR_PLOT_HISTOGRAM
COLOR_PLOT_HISTOGRAM_HOVERED
COLOR_TEXT_SELECTED_BACKGROUND
COLOR_DRAG_DROP_TARGET
COLOR_NAV_HIGHLIGHT
COLOR_NAV_WINDOWING_HIGHLIGHT
COLOR_NAV_WINDOWING_DIM_BACKGROUND
COLOR_MODAL_WINDOW_DIM_BACKGROUND Changing bg color would be imgui.set_next_window_bg_alpha(1.0)
imgui.core.set_next_window_position(200,200) # hardcoded
imgui.core.set_next_window_size((loop_window_width/2)-149,315)
imgui.push_style_color(imgui.COLOR_WINDOW_BACKGROUND, 200, 0, 0)
imgui.begin("side2", True, flags=imgui.WINDOW_NO_SCROLLBAR|imgui.WINDOW_NO_RESIZE|imgui.WINDOW_NO_TITLE_BAR)
imgui.end()
imgui.pop_style_color() Note that the current release of pyimgui is based on an old version of dear imgui and that recent functionalities may not be present or work as expected. We are working on an upgrade to catch up with dear imgui. EDIT: I said "one of", but it could be a combination of multiple flags using the pipe operator. |
Dear @KinoxKlark, thank you for the clarification. It works perfectly. |
This question should be fully answered. |
Hello all.
I would like to know how can I approach this problem using Python. This question - how to change the background color of a newly created window - has been commented in cpp ocornut/imgui#2700 ; ocornut/imgui#1289. Example:
Since this is a port I think it should be able to do. Although I cannot find anything related to this in the readthedocs.
Best
The text was updated successfully, but these errors were encountered: