Compare commits

..

2 Commits

Author SHA1 Message Date
Just Dzhi 28b067cee1 Merge branch 'main' of http://meowo.cc:3000/meowo/ld54 2023-09-30 20:58:06 +04:00
Just Dzhi 61b630c6c0 fullscreen mode in window.gd 2023-09-30 20:58:05 +04:00
2 changed files with 19 additions and 11 deletions

View File

@ -8,16 +8,6 @@
config_version=4 config_version=4
_global_script_classes=[ {
"base": "EditorVCSInterface",
"class": "GitAPI",
"language": "NativeScript",
"path": "res://addons/godot-git-plugin/git_api.gdns"
} ]
_global_script_class_icons={
"GitAPI": ""
}
[application] [application]
config/name="LD54" config/name="LD54"
@ -29,11 +19,15 @@ config/icon="res://icon.png"
[autoload] [autoload]
Global="*res://src/global.gd" Global="*res://src/global.gd"
Window="*res://src/window.gd"
[display] [display]
window/size/width=320 window/size/width=320
window/size/height=180 window/size/height=180
window/size/test_width=1280
window/size/test_height=720
window/handheld/orientation="sensor_landscape"
window/stretch/mode="viewport" window/stretch/mode="viewport"
window/stretch/aspect="keep" window/stretch/aspect="keep"
@ -44,7 +38,7 @@ version_control_plugin_name="GitAPI"
[gdnative] [gdnative]
singletons=[ "res://addons/godot-git-plugin/git_api.gdnlib" ] singletons=[ ]
[global] [global]

View File

@ -1,8 +1,22 @@
extends Node extends Node
func _ready(): func _ready():
set_process_input(true)
_change_window_title("Hello World!") _change_window_title("Hello World!")
OS.min_window_size = Vector2(320, 180) OS.min_window_size = Vector2(320, 180)
func _change_window_title(_title): func _change_window_title(_title):
OS.set_window_title(ProjectSettings.get_setting("application/config/name") + " - " + _title) OS.set_window_title(ProjectSettings.get_setting("application/config/name") + " - " + _title)
func _input(event):
if event is InputEventKey and event.scancode == 16777254 and event.pressed: #scancode 16777254 == KEY_F11
if OS.window_fullscreen == true:
OS.window_fullscreen = false
else:
OS.window_fullscreen = true
#if event is InputEventMouseButton and event.button_index == 1:
# Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
#if event is InputEventKey and event.scancode == 16777240 and event.pressed: #scancode 16777240 == KEY_ALT
# Input.mouse_mode = Input.MOUSE_MODE_VISIBLE