x12 windowing system
This commit is contained in:
parent
e16b468e23
commit
e6ab1fb39a
60 changed files with 701 additions and 877 deletions
|
|
@ -32,6 +32,7 @@ func _enter_tree() -> void:
|
|||
%new_item_suggestions.visible = false
|
||||
ini = "res://02 - Configurations/" + category + ".ini"
|
||||
list_items()
|
||||
set_menu_items()
|
||||
|
||||
func list_items():
|
||||
config = ConfigFile.new()
|
||||
|
|
@ -169,3 +170,21 @@ func _on_delete_button_up() -> void:
|
|||
config.set_value(item,module,j)
|
||||
config.save(ini)
|
||||
list_items()
|
||||
|
||||
func set_menu_items():
|
||||
var ui_scale = 1
|
||||
var pixel_x = get_viewport_rect().size[0]
|
||||
var pixel_y = get_viewport_rect().size[1]
|
||||
if pixel_x + pixel_y < 2900:
|
||||
ui_scale = 0.7
|
||||
%background.size.y = pixel_y
|
||||
if pixel_x < pixel_y: #mobile
|
||||
self.position = Vector2(0,0)
|
||||
%background.size.x = pixel_x
|
||||
for i in [%list]:
|
||||
i.scale = Vector2(ui_scale,ui_scale)
|
||||
i.size.x = pixel_x/ui_scale - 128
|
||||
i.position.x = 64 * ui_scale
|
||||
else:
|
||||
self.position = Vector2(1020 * ui_scale,0)
|
||||
%background.size.x = 256*ui_scale
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue