diff --git a/.gitignore b/.gitignore index 35b6208..4ba6182 100644 --- a/.gitignore +++ b/.gitignore @@ -2,10 +2,10 @@ .godot/ addons/discord-sdk-gd/ scripts/autoloads/discordrpc.gd -test/bsod_by ether.png addons/script-ide/ shaders/test/ discord_game_sdk_binding.dll discord_game_sdk.dll exports/ -test/ \ No newline at end of file +test/ +scripts/unused \ No newline at end of file diff --git a/disabledaddons.cfg b/disabledaddons.cfg new file mode 100644 index 0000000..b8437b5 --- /dev/null +++ b/disabledaddons.cfg @@ -0,0 +1,8 @@ +[autoload] + +DiscordSDKLoader="*res://addons/discord-sdk-gd/nodes/discord_autoload.gd" +MyDiscordRPC="*res://scripts/autoloads/discordrpc.gd" + +[editor_plugins] + +enabled=PackedStringArray("res://addons/discord-sdk-gd/plugin.cfg", "res://addons/script-ide/plugin.cfg") diff --git a/export_presets.cfg b/export_presets.cfg index bb28942..ac843c8 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -6,9 +6,9 @@ runnable=true dedicated_server=false custom_features="" export_filter="exclude" -export_files=PackedStringArray("res://addons/discord-sdk-gd/bin/discord-rpc-gd.gdextension", "res://addons/discord-sdk-gd/nodes/assets/Checked.svg", "res://addons/discord-sdk-gd/nodes/assets/circle.svg", "res://addons/discord-sdk-gd/nodes/assets/Unchecked.svg", "res://addons/discord-sdk-gd/nodes/debug.gd", "res://addons/discord-sdk-gd/nodes/Debug.tscn", "res://addons/discord-sdk-gd/nodes/discord_autoload.gd", "res://addons/discord-sdk-gd/Debug.svg", "res://addons/discord-sdk-gd/example.gd", "res://addons/discord-sdk-gd/logo.png", "res://addons/discord-sdk-gd/Logo_V2_No_Bg.png", "res://addons/discord-sdk-gd/plugin.gd", "res://addons/discord-sdk-gd/restart_window.tscn", "res://addons/script-ide/icon/class.svg", "res://addons/script-ide/icon/constant.svg", "res://addons/script-ide/icon/export.svg", "res://addons/script-ide/icon/func.svg", "res://addons/script-ide/icon/func_get.svg", "res://addons/script-ide/icon/func_set.svg", "res://addons/script-ide/icon/keyword.svg", "res://addons/script-ide/icon/property.svg", "res://addons/script-ide/icon/signal.svg", "res://addons/script-ide/plugin.gd", "res://addons/script-ide/Popup.gd", "res://scripts/autoloads/discordrpc.gd", "res://scripts/unused/main_unused.gd", "res://shaders/test/Blur.gdshader", "res://shaders/test/blurtest.gdshader", "res://shaders/test/change2color_backup.gdshader", "res://shaders/test/change2color_greenexample.gdshader", "res://shaders/test/gaussianblur.gdshader", "res://shaders/test/simpleblur.gdshader", "res://test/bsod_by ether.png", "res://test/maintest2.gd", "res://test/maintest3.gd", "res://test/maintest3.tscn", "res://test/node2.gd", "res://test/node2.tscn", "res://test/node.tscn", "res://test/orbitingwindow.gd", "res://test/Sprite2D2.gd", "res://test/Sprite2D.gd", "res://test/testbackground.tscn", "res://test/test_2.tscn") +export_files=PackedStringArray("res://addons/discord-sdk-gd/bin/discord-rpc-gd.gdextension", "res://addons/discord-sdk-gd/nodes/assets/Checked.svg", "res://addons/discord-sdk-gd/nodes/assets/circle.svg", "res://addons/discord-sdk-gd/nodes/assets/Unchecked.svg", "res://addons/discord-sdk-gd/nodes/debug.gd", "res://addons/discord-sdk-gd/nodes/Debug.tscn", "res://addons/discord-sdk-gd/nodes/discord_autoload.gd", "res://addons/discord-sdk-gd/Debug.svg", "res://addons/discord-sdk-gd/example.gd", "res://addons/discord-sdk-gd/logo.png", "res://addons/discord-sdk-gd/Logo_V2_No_Bg.png", "res://addons/discord-sdk-gd/plugin.gd", "res://addons/discord-sdk-gd/restart_window.tscn", "res://addons/script-ide/icon/class.svg", "res://addons/script-ide/icon/constant.svg", "res://addons/script-ide/icon/export.svg", "res://addons/script-ide/icon/func.svg", "res://addons/script-ide/icon/func_get.svg", "res://addons/script-ide/icon/func_set.svg", "res://addons/script-ide/icon/keyword.svg", "res://addons/script-ide/icon/property.svg", "res://addons/script-ide/icon/signal.svg", "res://addons/script-ide/plugin.gd", "res://addons/script-ide/Popup.gd", "res://scripts/autoloads/discordrpc.gd", "res://shaders/test/Blur.gdshader", "res://shaders/test/blurtest.gdshader", "res://shaders/test/change2color_backup.gdshader", "res://shaders/test/change2color_greenexample.gdshader", "res://shaders/test/gaussianblur.gdshader", "res://shaders/test/simpleblur.gdshader", "res://test/bsod_by ether.png", "res://test/maintest2.gd", "res://test/maintest3.gd", "res://test/maintest3.tscn", "res://test/node2.gd", "res://test/node2.tscn", "res://test/node.tscn", "res://test/orbitingwindow.gd", "res://test/Sprite2D2.gd", "res://test/Sprite2D.gd", "res://test/testbackground.tscn", "res://test/test_2.tscn", "res://scripts/editorscript/toggleaddons.gd", "res://exports/unused/main_unused.gd", "res://exports/unused/toggleaddons_old.gd") include_filter="" -exclude_filter="*.dll" +exclude_filter="*.dll, *.exe, *.zip, *.rar, *.7z, *.pck" export_path="exports/limbo_keygen.exe" encryption_include_filters="shaders/*, scripts/*, scenes/*" encryption_exclude_filters="shaders/test/*, scripts/unused/*, addons/*" @@ -40,7 +40,7 @@ application/file_version="" application/product_version="" application/company_name="etherealxx" application/product_name="limbogodot" -application/file_description="" +application/file_description="FOCUS" application/copyright="" application/trademarks="" application/export_angle=0 diff --git a/project.godot b/project.godot index 5089a80..d01218f 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,8 @@ config_version=5 [application] config/name="Keygen" -config/version="1.0.0" +config/description="focus" +config/version="1.1.0" run/main_scene="res://scenes/main.tscn" config/use_custom_user_dir=true config/custom_user_dir_name="limbo-godot" @@ -24,11 +25,13 @@ config/icon="res://key.png" [autoload] KeyManager="*res://scripts/autoloads/keymanager.gd" -; DiscordSDKLoader="*res://addons/discord-sdk-gd/nodes/discord_autoload.gd" -; MyDiscordRPC="*res://scripts/autoloads/discordrpc.gd" LimboAudio="*res://scenes/audioplayer.tscn" VariableKeeper="*res://scripts/autoloads/variablekeeper.gd" +[debug] + +file_logging/log_path="user://logs/limbo.log" + [display] window/size/viewport_width=150 @@ -37,10 +40,6 @@ window/size/mode=1 window/subwindows/embed_subwindows=false window/per_pixel_transparency/allowed=true -[editor_plugins] - -; enabled=PackedStringArray("res://addons/discord-sdk-gd/plugin.cfg", "res://addons/script-ide/plugin.cfg") - [filesystem] import/blender/enabled=false diff --git a/scenes/audioplayer.tscn b/scenes/audioplayer.tscn index 03d210b..7f188be 100644 --- a/scenes/audioplayer.tscn +++ b/scenes/audioplayer.tscn @@ -3,4 +3,5 @@ [ext_resource type="Script" path="res://scripts/audioplayer.gd" id="1_iblth"] [node name="Audioplayer" type="AudioStreamPlayer"] +volume_db = -20.0 script = ExtResource("1_iblth") diff --git a/scenes/main.tscn b/scenes/main.tscn index a3315f2..c825339 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -24,6 +24,11 @@ unresizable = true always_on_top = true dialog_text = "You picked the WRONG key!" +[node name="ChangeSceneTimer" type="Timer" parent="."] +wait_time = 0.05 +one_shot = true + [connection signal="timeout" from="DebugTimer" to="." method="_on_debug_timer_timeout"] [connection signal="canceled" from="WinLoseDialog" to="." method="_on_win_lose_dialog_canceled"] [connection signal="confirmed" from="WinLoseDialog" to="." method="_on_win_lose_dialog_confirmed"] +[connection signal="timeout" from="ChangeSceneTimer" to="." method="_on_change_scene_timer_timeout"] diff --git a/scripts/audioplayer.gd b/scripts/audioplayer.gd index 8804a2b..af2922a 100644 --- a/scripts/audioplayer.gd +++ b/scripts/audioplayer.gd @@ -7,6 +7,9 @@ const limbomusic = preload("res://assets/musics/isolation_keypart_cut.mp3") const deathsfx = preload("res://assets/sfx/geometry-dash-death-sound-effect.mp3") const winsfx = preload("res://assets/sfx/level-complete-geometry-dash.mp3") +func set_volume(volume): # volume is between 0 and 20. default is 20 + set_volume_db(volume - 20) + func play_music(): if stream == limbomusic: return diff --git a/scripts/editorscript/toggleaddons.gd b/scripts/editorscript/toggleaddons.gd new file mode 100644 index 0000000..6df5d81 --- /dev/null +++ b/scripts/editorscript/toggleaddons.gd @@ -0,0 +1,59 @@ +@tool +extends EditorScript + +var mode_disableplugin = false +var projectsettingfile_path = "res://project.godot" +var disabledaddonsfile_path = "res://disabledaddons.cfg" +func config_check_and_remove(config : ConfigFile, disabledconfig : ConfigFile, section, key): + if config.has_section_key(section, key): + disabledconfig.set_value(section, key, config.get_value(section, key)) + config.set_value(section, key, null) + mode_disableplugin = true + +func get_array_of_comments(projectsettingtext : String) -> Array: + var settingtextarray = projectsettingtext.split("\n") + var projectsettingcomment : Array + for line in settingtextarray: + if line.begins_with(";"): + projectsettingcomment.append(line) + return projectsettingcomment + +func open_file_and_get_text(filepath : String) -> String: + var file = FileAccess.open(filepath, FileAccess.READ) + var textfromfile : String = file.get_as_text() + file.close() + return textfromfile + +# Called when the script is executed (using File -> Run in Script Editor). +func _run(): + var projectsettingtext = open_file_and_get_text(projectsettingfile_path) # res://project.godot # res://project.godot_test.cfg + var projectsettingcomment = get_array_of_comments(projectsettingtext) + + var projectconfig = ConfigFile.new() + var disabledconfig = ConfigFile.new() + projectconfig.parse(projectsettingtext) + config_check_and_remove(projectconfig, disabledconfig, "autoload", "DiscordSDKLoader") + config_check_and_remove(projectconfig, disabledconfig, "autoload", "MyDiscordRPC") + config_check_and_remove(projectconfig, disabledconfig, "editor_plugins", "enabled") + + var configtext + if mode_disableplugin: + disabledconfig.save(disabledaddonsfile_path) + print("Active addons now deactivated. Please reload the project on Project > Reload Current Project") + else: + projectconfig.load(projectsettingfile_path) + disabledconfig.load(disabledaddonsfile_path) + for section in disabledconfig.get_sections(): + for key in disabledconfig.get_section_keys(section): + projectconfig.set_value(section, key, disabledconfig.get_value(section, key)) + disabledconfig.set_value(section, key, null) + disabledconfig.save(disabledaddonsfile_path) + print("Inactive addons now reactivated. Please reload the project on Project > Reload Current Project") + + configtext = projectconfig.encode_to_text() + var projectsettingfile = FileAccess.open(projectsettingfile_path, FileAccess.WRITE) + for line in projectsettingcomment: + projectsettingfile.store_line(line) + projectsettingfile.store_line("") # extra empty line + projectsettingfile.store_string(configtext) + projectsettingfile.close() diff --git a/scripts/keywindow.gd b/scripts/keywindow.gd index 9c0ad08..f5a0241 100644 --- a/scripts/keywindow.gd +++ b/scripts/keywindow.gd @@ -82,12 +82,14 @@ func _input(event): # debug #elif event.is_action_pressed("debugrotate"): # R key #key.tween_rotate() if event.is_action_pressed("left_click"): - if clickable: - KeyManager.set_correctkey(correctkey) - mainscene.switch_scene_to_ending() + if clickable: + KeyManager.set_correctkey(correctkey) + #mainscene.switch_scene_to_ending() + mainscene.start_change_scene("ending") elif event is InputEventMouseButton: if event.is_double_click() and event.button_index == MOUSE_BUTTON_RIGHT: - mainscene.open_setting_window() + #mainscene.open_setting_window() + mainscene.start_change_scene("setting") func _on_move_ends(): initialposition = Vector2(-1,-1) diff --git a/scripts/main.gd b/scripts/main.gd index 99c39c9..049666e 100644 --- a/scripts/main.gd +++ b/scripts/main.gd @@ -18,6 +18,8 @@ extends Node @export var winning_wait_time := 3.0 ## Instantly goes straight to the orbiting key without shuffling @export var bluescreen_wait_time := 7.0 +## Control the volume of the music and sfx. 20 is 0 dB. Decreasing this value will decrease the volume by 1 dB. +@export var music_volume := 20.0 ## Instead of going to the ending screen, just bring a popup to determine if you won the game or not @export var no_ending_screen := false ## Loads settings. Turning this off on the exported build will load the game with default settings @@ -25,7 +27,7 @@ extends Node @export var load_save := true ## This makes the game, when being run on the editor, to loads the save file instead of following the exported variables. ## Turn this on if you want to test the save/load feature, and turn it off if you want to test features from the exported variables. -@export var tast_save_feature_on_editor := false +@export var test_save_feature_on_editor := false @onready var dialog = $WinLoseDialog @@ -33,7 +35,7 @@ var saved_values = [ "sixteen_by_nine_reso", "fullscreen_ending", "debugdontmove", "debug_key_mover_window", "instant_finish", "transparent_background", "winning_wait_time", "bluescreen_wait_time", "no_ending_screen", - "load_save" + "music_volume", "load_save" ] const windowsize := 150 @@ -47,6 +49,7 @@ var setting_window_opened := false var disable_opening_settings := false var limboendingscene +var nextscene : String var step_map_x = [ # from markhermy3100's Shuffler.ts -> https://github.com/MarkHermy3100/LimboKeys/blob/main/assets/scripts/Shuffler.ts [2, 4, 1, 3, 6, 8, 5, 7], # 0: on each 4 block (top and bottom) spin clockwise @@ -117,24 +120,29 @@ func config_set_value_from_variable_name(configfile, varname): configfile.set_value("settings", varname, self.get(varname)) func handle_load_and_save(): - var config = ConfigFile.new() - - var err = config.load("user://limbosave.cfg") - if err == ERR_FILE_NOT_FOUND: - # make new config file - for varname in saved_values: + var config = ConfigFile.new() + + var err = config.load("user://limbosave.cfg") + if err == ERR_FILE_NOT_FOUND: + # make new config file + for varname in saved_values: + config_set_value_from_variable_name(config, varname) + config.save("user://limbosave.cfg") + print("New config file is made.") + elif err == OK: + # still check if there any new values that hasn't been written yet + for varname in saved_values: + if not config.has_section_key("settings", varname): config_set_value_from_variable_name(config, varname) - config.save("user://limbosave.cfg") - print("New config file is made.") - elif err == OK: - # standalone: exported build. always load save except load_save is off - # OR : testing the save feature via the editor - if OS.has_feature("standalone") or tast_save_feature_on_editor: - if config.get_value("settings", "load_save"): - # load config file - for varname in saved_values: - self.set(varname, config.get_value("settings", varname)) - print("Config file loaded.") + config.save("user://limbosave.cfg") + # template: exported build. always load save except load_save is off. used to be "standalone" + # OR : testing the save feature via the editor + if OS.has_feature("template") or test_save_feature_on_editor: + if config.get_value("settings", "load_save"): + # load config file + for varname in saved_values: + self.set(varname, config.get_value("settings", varname)) + print("Config file loaded.") func _ready(): $LimboScenehelp.hide() @@ -145,10 +153,11 @@ func _ready(): mainwindow.set_flag(Window.FLAG_BORDERLESS, true) mainwindow.set_flag(Window.FLAG_TRANSPARENT, true) KeyManager.get_main() - LimboAudio.play_music() - + handle_load_and_save() + LimboAudio.set_volume(music_volume) + LimboAudio.play_music() if not no_ending_screen: limboendingscene = load("res://scenes/limbobackground.tscn") @@ -265,6 +274,7 @@ func switch_scene_to_ending(): if not no_ending_screen: get_tree().change_scene_to_packed(limboendingscene) else: + mainwindow.set_mode(Window.MODE_MINIMIZED) if KeyManager.correctkeychosen: dialog.set_text("You picked the CORRECT key!") LimboAudio.play_sfx(true) # winsfx @@ -293,8 +303,16 @@ func open_setting_window(): for varname in saved_values: config_set_value_from_variable_name(config, varname) config.save("user://limbosave.cfg") - get_tree().change_scene_to_file("res://scenes/settings_menu.tscn") - + if debugmessage: print("insidetree: " + str(is_inside_tree())) + var current_scenetree = get_tree() + if current_scenetree != null: + if debugmessage: + print("current scene: " + str(current_scenetree.get_current_scene().get_name())) + print("moving scene to settingsmenu now") + current_scenetree.change_scene_to_file("res://scenes/settings_menu.tscn") + else: + push_error("current scenetree is null") + func _on_debug_timer_timeout(): if debugmessage: print(KeyManager.movelist_checksize()) @@ -307,3 +325,12 @@ func _on_win_lose_dialog_confirmed(): func _on_win_lose_dialog_canceled(): get_tree().quit() + +func start_change_scene(nextscenestring): + nextscene = nextscenestring + $ChangeSceneTimer.start() + +func _on_change_scene_timer_timeout(): + match nextscene: + "setting": open_setting_window() + "ending": switch_scene_to_ending() diff --git a/scripts/unused/main_unused.gd b/scripts/unused/main_unused.gd deleted file mode 100644 index 186d450..0000000 --- a/scripts/unused/main_unused.gd +++ /dev/null @@ -1,173 +0,0 @@ -extends Node - -const windowsize := 150 -const margin := 50 -const window_shuffle_delay = 0.05 -const debugdontmove = false - -@onready var audioplayer = $AudioStreamPlayer - -var window_list : Array[Window] -var window_pos_list : Array[Vector2i] - -var step_map = { # from quasar098's server.py - 0: {0: 4, 1: 5, 2: 6, 3: 7, 4: 0, 5: 1, 6: 2, 7: 3}, # mirror across x axis - 1: {0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7, 7: 0}, # move right column to left and cross - 2: {0: 7, 1: 0, 2: 1, 3: 2, 4: 3, 5: 4, 6: 5, 7: 6}, # move left column to right and cross - 3: {0: 5, 1: 4, 4: 1, 5: 0, 2: 7, 3: 6, 6: 3, 7: 2}, # two x patterns - 4: {0: 3, 1: 2, 2: 1, 3: 0, 4: 7, 5: 6, 6: 5, 7: 4}, # mirror across y axis - 5: {0: 7, 1: 6, 2: 5, 3: 4, 4: 3, 5: 2, 6: 1, 7: 0}, # right+right stuff # is this the 10th swap? - 6: {0: 1, 1: 5, 5: 4, 4: 0, 2: 3, 3: 7, 7: 6, 6: 2}, # left+left stuff - 7: {1: 0, 5: 1, 4: 5, 0: 4, 3: 2, 7: 3, 6: 7, 2: 6}, # right+left stuff - 8: {1: 0, 5: 1, 4: 5, 0: 4, 2: 3, 3: 7, 7: 6, 6: 2}, # left+right stuff - 9: {0: 6, 1: 7, 2: 4, 3: 5, 4: 2, 5: 3, 6: 0, 7: 1}, # cross 2 wide blocks - 10: {0: 5, 1: 6, 2: 7, 3: 3, 4: 4, 5: 0, 6: 1, 7: 2}, # swap top left 3 and bottom right 3 - 11: {0: 0, 1: 4, 2: 5, 3: 6, 4: 1, 5: 2, 6: 3, 7: 7}, # swap top right 3 and bottom left 3 - 12: {0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7, 7: 0}, # ? - 13: {0: 6, 1: 7, 2: 5, 3: 4, 4: 3, 5: 2, 6: 1, 7: 0} # 10th swap -} - -func pickwindow(index) -> Window: - return window_list[index - 1] - -func queueshufflewindow(pattern, delay, speed): - var i = 0 - for window in window_list: - # 0: {0: 4, -> if pattern is 0, and windoworder is 0, then window 0 will be moved to 4 - var order = window.get_last_order() - var targetwindowindex = step_map[pattern][order] - window.queuemove(window_pos_list[targetwindowindex], delay, speed, targetwindowindex) - #window.nextposition = window_pos_list[targetwindowindex] - i += 1 - -func emptyqueuewindow(): - for window in window_list: - window.clearqueue() - -func startrandommove(movepattern := -1): - emptyqueuewindow() - var shufflepattern = randi_range(0, step_map.size() - 1) - if movepattern == -1: - queueshufflewindow(shufflepattern, 0.1, 0.3) - else: - queueshufflewindow(movepattern, 0.1, 0.3) - - KeyManager.allwindow_moving() - KeyManager.startpolling() - for window in window_list: - window.startmoving() - -func _ready(): - KeyManager.get_main() - audioplayer.play(176) - - var primaryscreenindex = DisplayServer.get_primary_screen() - var usable_screen_rect = DisplayServer.screen_get_usable_rect(primaryscreenindex) - var usable_screen_height = usable_screen_rect.size.y - var usable_screen_width = usable_screen_rect.size.x - var key_area = usable_screen_rect - - if usable_screen_width > usable_screen_height: # standard landscape screen - key_area.size.x = usable_screen_height # shorthen the width to screen's height - var key_area_xpos = (usable_screen_width / 2) - (usable_screen_height / 2) - key_area.position = Vector2i(key_area_xpos, key_area.position.y) - else: - pass # implement later - - print(key_area.position, key_area.size) - - var spawn_xpos = key_area.position.x + (key_area.size.x / 2) - windowsize - margin - var spawn_ypos = key_area.size.y / 8 - var loopstep = 0 - - for x in range(8): - var window_instance : Window = load("res://scenes/keywindow.tscn").instantiate() - window_instance.set_order(loopstep) - if loopstep == 0: - window_instance.debugmessage = true - add_child(window_instance) - - if loopstep > 0: - if loopstep % 2 == 0: - spawn_ypos += windowsize + int(margin * 1.5) - spawn_xpos = key_area.position.x + (key_area.size.x / 2) - windowsize - margin # reset - else: - spawn_xpos += windowsize + margin - - window_instance.position = Vector2i(spawn_xpos, spawn_ypos) - - window_list.append(window_instance) - loopstep += 1 - window_pos_list.append(window_instance.position) - await get_tree().create_timer(0.2).timeout - - if not debugdontmove: - ## 5 second delay, minus 0.2 * 8 - await get_tree().create_timer(3.4).timeout - - #pickwindow(1).nextposition = pickwindow(8).position - #print(Time.get_time_string_from_system()) - #print(pickwindow(8).position) - #pickwindow(1).startmoving() - - ## get random shuffle pattern - var i = 1 - for x in range(26): - var shufflepattern = randi_range(0, 12) # step_map.size() - 1) - #if i == 5: - #shufflewindow(0) - #await get_tree().create_timer(0.6).timeout - #else: - - if i == 6: # 6th swap, bottom 4 swap with top 4 - queueshufflewindow(0, 3 * window_shuffle_delay, 0.5) - elif i == 10: - # 10th swap, bottom 6 rotated then become top 6. previous top 2 rotated then become bottom 2. - # all key rotated in place becoming upside down - queueshufflewindow(13, 4 * window_shuffle_delay, 0.5) - elif i == 19: # 19th swap, the opposite of 6th swap - queueshufflewindow(shufflepattern, 3 * window_shuffle_delay, 0.5) - else: - queueshufflewindow(shufflepattern, window_shuffle_delay, 0.3) - i += 1 - - KeyManager.allwindow_moving() - KeyManager.startpolling() - for window in window_list: - window.startmoving() - #shufflewindow(0) - - -# -#var number : int = 0 -#var target = 0 -#var timeElapsed = 0 -# -#func fillinasecond(target_value, delta): - #if number < target_value: - #target = target_value - #timeElapsed += delta - # - ## Calculate increment per frame to reach target in one second - #var incrementPerSecond = float(target) / 1.0 # 1.0 represents one second - #var incrementPerFrame = incrementPerSecond * delta - # - ## Round the increment to the nearest integer - #var roundedIncrement = round(incrementPerFrame) - # - ## Increment number - #number += int(roundedIncrement) - # - ## Ensure number does not exceed the target value - #if number >= target: - #number = target - #print("Number reached target value: ", target) -# -#func _process(delta): - #fillinasecond(10000, delta) - #if number < 10000: - #print(number) - # - -func _on_debug_timer_timeout(): - print(KeyManager.movelist_checksize())