1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

show extension info on hover (#1037)

* show extension info on hover

* formatting
This commit is contained in:
Variable 2024-07-19 02:48:23 +05:00 committed by GitHub
parent 4bc4ed1299
commit 237eeef4d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,7 +26,16 @@ func _ready() -> void:
func _extension_loaded(extension: Extensions.Extension, extension_name: String) -> void:
extension_list.add_item(extension.display_name)
var item_count := extension_list.get_item_count() - 1
extension_list.set_item_tooltip(item_count, extension.description)
var tooltip = (
"""
Version: %s
Author: %s
Description: %s
License: %s
"""
% [str(extension.version), extension.author, extension.description, extension.license]
)
extension_list.set_item_tooltip(item_count, tooltip)
extension_list.set_item_metadata(item_count, extension_name)
@ -60,6 +69,7 @@ func _on_InstalledExtensions_item_selected(index: int) -> void:
func _on_InstalledExtensions_empty_clicked(_position: Vector2, _button_index: int) -> void:
extension_list.deselect_all() # Clicking empty wont deselect by default, so doing it manually.
enable_button.disabled = true
uninstall_button.disabled = true