Godot Version
Godot 3.x, Godot 4.x
Question
I’m making a plugin for godot, using EditorPlugin and so on, where buttons with icons will be drawn in the inspector.
in Godot, if we change the theme, the icons can be either dark or light, can you please explain how to do this for the plugin?
There’s specific colours that will be replaced in dark theme, see here:
/**************************************************************************/
/* editor_color_map.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
This file has been truncated. show original
1 Like
Thanks, but how do I know what the current color theme is?
You don’t need to for this, but you can do that with EditorSettings
I think
1 Like
system
Closed
April 21, 2024, 7:44pm
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.