mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Add static methods for creating Image and ImageTexture
This commit is contained in:
parent
ca18a02e00
commit
d2900429e8
42 changed files with 117 additions and 243 deletions
|
@ -49,9 +49,7 @@ void EditorRunNative::_notification(int p_what) {
|
|||
im->clear_mipmaps();
|
||||
if (!im->is_empty()) {
|
||||
im->resize(16 * EDSCALE, 16 * EDSCALE);
|
||||
Ref<ImageTexture> small_icon;
|
||||
small_icon.instantiate();
|
||||
small_icon->create_from_image(im);
|
||||
Ref<ImageTexture> small_icon = ImageTexture::create_from_image(im);
|
||||
MenuButton *mb = memnew(MenuButton);
|
||||
mb->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::run_native), varray(i));
|
||||
mb->connect("pressed", callable_mp(this, &EditorRunNative::run_native), varray(-1, i));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue