began conversion to Godot 4.1

This commit is contained in:
Jaap Marsman 2023-08-06 04:38:19 +08:00
parent 7eaeb3b900
commit 637b274efd
99 changed files with 588 additions and 805 deletions

View File

@ -10,13 +10,29 @@ dock_hsplit_1=0
dock_hsplit_2=405
dock_hsplit_3=-405
dock_hsplit_4=0
dock_1_selected_tab_idx=0
dock_2_selected_tab_idx=0
dock_3_selected_tab_idx=0
dock_4_selected_tab_idx=0
dock_5_selected_tab_idx=0
dock_6_selected_tab_idx=0
dock_7_selected_tab_idx=0
dock_8_selected_tab_idx=0
dock_floating={}
dock_filesystem_selected_paths=PackedStringArray("res://")
dock_filesystem_uncollapsed_paths=PackedStringArray("res://")
dock_3="Scene,Import"
dock_4="FileSystem"
dock_5="Inspector,Node,History"
[EditorNode]
open_scenes=["res://main_screen.tscn"]
open_scenes=PackedStringArray("res://main_screen.tscn")
current_scene="res://main_screen.tscn"
center_split_offset=0
selected_default_debugger_tab_idx=0
selected_main_editor_idx=2
selected_bottom_panel_item=1
[ScriptEditor]
@ -24,3 +40,10 @@ open_scripts=["res://addons/HTML5FileExchange/HTML5FileExchange.gd", "res://main
open_help=[]
script_split_offset=105
list_split_offset=0
selected_script="res://addons/HTML5FileExchange/HTML5FileExchange.gd"
[ShaderEditor]
open_shaders=[]
split_offset=0
selected_shader=""

View File

@ -1,30 +1,30 @@
2a60927148abd1d33b818b535e306557
::res://::1677723357
default_env.tres::Environment::-1::1677723350::0::1::::<><>::
EditScreen.gd::GDScript::-1::1677723350::0::1::::<>CanvasLayer<>::
ea4bc82a6ad023ab7ee23ee620429895
::res://::1691267552
default_env.tres::Environment::-1::1691267544::0::1::::<><>::
EditScreen.gd::GDScript::-1::1691267544::0::1::::<>CanvasLayer<>::
export_presets.cfg::TextFile::-1::1668820651::0::1::::<><>::
global_ints.gd::GDScript::-1::1677723350::0::1::::<>Node<>::
icon.png::CompressedTexture2D::2568188290519500907::1661560370::1677723358::1::::<><>::
main_screen.gd::GDScript::-1::1677723350::0::1::::<>CanvasLayer<>::
main_screen.tscn::PackedScene::-1::1677723350::0::1::::<><>::res://wb_theme.tres<>res://main_screen.gd<>res://Assets/photos/classroom-824120_1920.jpg<>res://NameChangePanel.gd<>res://Assets/fonts/noto_sans_display.ttf<>res://Assets/fonts/noto_sans_display_bold.ttf<>res://ObservationWindow.gd<>res://EditScreen.gd<>res://Results.gd<>res://TimerBar.gd<>res://ProgressBar.gd<>res://Assets/icons/main_icon.png
NameChangePanel.gd::GDScript::-1::1677723350::0::1::::<>Panel<>::
ObservationWindow.gd::GDScript::-1::1677723350::0::1::::<>CanvasLayer<>::
ProgressBar.gd::GDScript::-1::1677723350::0::1::::<>ProgressBar<>::
Results.gd::GDScript::-1::1677723350::0::1::::<>CanvasLayer<>::
TimerBar.gd::GDScript::-1::1677723350::0::1::::<>ProgressBar<>::
wb_theme.tres::Theme::-1::1677723350::0::1::::<><>::res://Assets/fonts/noto_sans_display_bold.ttf<>res://Assets/fonts/noto_sans_display.ttf
global_ints.gd::GDScript::-1::1691267544::0::1::::<>Node<>::
icon.png::CompressedTexture2D::3028018602038015163::1661560370::1691267552::1::::<><>::
main_screen.gd::GDScript::-1::1691267544::0::1::::<>CanvasLayer<>::
main_screen.tscn::PackedScene::-1::1691267544::0::1::::<><>::res://wb_theme.tres<>res://main_screen.gd<>res://NameChangePanel.gd<>res://Assets/fonts/noto_sans_display.ttf<>res://Assets/fonts/noto_sans_display_bold.ttf<>res://ObservationWindow.gd<>res://EditScreen.gd<>res://Results.gd<>res://TimerBar.gd<>res://ProgressBar.gd<>res://Assets/icons/main_icon.png
NameChangePanel.gd::GDScript::-1::1691267544::0::1::::<>Panel<>::
ObservationWindow.gd::GDScript::-1::1691267544::0::1::::<>CanvasLayer<>::
ProgressBar.gd::GDScript::-1::1691267544::0::1::::<>ProgressBar<>::
Results.gd::GDScript::-1::1691267544::0::1::::<>CanvasLayer<>::
TimerBar.gd::GDScript::-1::1691267544::0::1::::<>ProgressBar<>::
wb_theme.tres::Theme::-1::1691267544::0::1::::<><>::res://Assets/fonts/noto_sans_display_bold.ttf<>res://Assets/fonts/noto_sans_display.ttf
::res://addons/::1667567677
::res://addons/HTML5FileExchange/::1667567677
HTML5FileExchange.gd::GDScript::-1::1677723350::0::1::::<>Node<>::
::res://addons/HTML5FileExchange/::1680051591
HTML5FileExchange.gd::GDScript::-1::1691267544::0::1::::<>Node<>::
plugin.cfg::TextFile::-1::1667567677::0::1::::<><>::
plugin.gd::GDScript::-1::1677723350::0::1::::<>EditorPlugin<>::
plugin.gd::GDScript::-1::1691267544::0::1::::<>EditorPlugin<>::
::res://Assets/::1667302001
sample_text.md::TextFile::-1::1667302001::0::1::::<><>::
::res://Assets/fonts/::1666960750
noto_sans_display.ttf::FontFile::6722654324432813366::1605715200::1677723358::1::::<><>::
noto_sans_display_bold.ttf::FontFile::1070089530347739784::1605715200::1677723358::1::::<><>::
::res://Assets/icons/::1668820466
main_icon.png::CompressedTexture2D::6312484497419078778::1666702712::1677723358::1::::<><>::
main_icon_square.png::CompressedTexture2D::5058677623335132469::1666702712::1677723358::1::::<><>::
::res://Assets/photos/::1666960246
classroom-824120_1920.jpg::CompressedTexture2D::7408463285349268964::1666097107::1677723358::1::::<><>::
::res://Assets/fonts/::1677723358
noto_sans_display.ttf::FontFile::6722654324432813366::1605715200::1691267544::1::::<><>::
noto_sans_display_bold.ttf::FontFile::1070089530347739784::1605715200::1691267544::1::::<><>::
::res://Assets/icons/::1680051620
main_icon.png::CompressedTexture2D::404384057662935549::1666702712::1691267553::1::::<><>::
main_icon_square.png::CompressedTexture2D::8269928595084799554::1666702712::1691267552::1::::<><>::
::res://Assets/photos/::1680051621
classroom-824120_1920.jpg::CompressedTexture2D::8306912242081311734::1666097107::1691267553::1::::<><>::

View File

@ -8,7 +8,7 @@ Anim={
"grid_snap_active": false,
"grid_step": Vector2(8, 8),
"grid_visibility": 1,
"ofs": Vector2(-356.871, -218.328),
"ofs": Vector2(-93.4412, -134.006),
"primary_grid_steps": 8,
"show_edit_locks": true,
"show_guides": true,
@ -32,7 +32,7 @@ Anim={
"snap_rotation_step": 0.261799,
"snap_scale": false,
"snap_scale_step": 0.1,
"zoom": 1.0
"zoom": 0.890899
}
3D={
"fov": 70.01,
@ -104,9 +104,10 @@ Anim={
"half_res": false,
"information": false,
"listener": true,
"lock_rotation": false,
"orthogonal": false,
"position": Vector3(0, 0, 0),
"use_environment": false,
"use_orthogonal": false,
"view_type": 0,
"x_rotation": 0.5,
"y_rotation": -0.5
@ -122,9 +123,10 @@ Anim={
"half_res": false,
"information": false,
"listener": false,
"lock_rotation": false,
"orthogonal": false,
"position": Vector3(0, 0, 0),
"use_environment": false,
"use_orthogonal": false,
"view_type": 0,
"x_rotation": 0.5,
"y_rotation": -0.5
@ -140,9 +142,10 @@ Anim={
"half_res": false,
"information": false,
"listener": false,
"lock_rotation": false,
"orthogonal": false,
"position": Vector3(0, 0, 0),
"use_environment": false,
"use_orthogonal": false,
"view_type": 0,
"x_rotation": 0.5,
"y_rotation": -0.5
@ -158,9 +161,10 @@ Anim={
"half_res": false,
"information": false,
"listener": false,
"lock_rotation": false,
"orthogonal": false,
"position": Vector3(0, 0, 0),
"use_environment": false,
"use_orthogonal": false,
"view_type": 0,
"x_rotation": 0.5,
"y_rotation": -0.5
@ -168,3 +172,4 @@ Anim={
"zfar": 4000.01,
"znear": 0.05
}
selected_nodes=Array[NodePath]([])

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
[editor_metadata]
executable_path="/usr/bin/godot4"
executable_path="/usr/bin/godot"
[debug_options]
@ -15,3 +15,7 @@ scripts=["res://addons/HTML5FileExchange/HTML5FileExchange.gd", "res://main_scre
[dialog_bounds]
project_settings=Rect2(1245, 592, 1350, 1050)
[linked_properties]
CanvasLayer:scale=true

View File

@ -17,10 +17,10 @@ state={
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 0,
"column": 29,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 5,
"row": 16,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"

Binary file not shown.

View File

@ -1,8 +1,8 @@
extends CanvasLayer
onready var gi = $"/root/GlobalInts"
onready var global_ints = gi
onready var main_window = $"../../AppWindow"
@onready var gi = $"/root/GlobalInts"
@onready var global_ints = gi
@onready var main_window = $"../../AppWindow"
func _ready():
pass # Replace with function body.

View File

@ -1,7 +1,7 @@
extends Panel
onready var global_ints = $"/root/GlobalInts"
@onready var global_ints = $"/root/GlobalInts"
func _on_OkButton_pressed():

View File

@ -1,7 +1,7 @@
extends CanvasLayer
onready var global_ints = $"/root/GlobalInts"
@onready var global_ints = $"/root/GlobalInts"
var time_lefts : int

View File

@ -1,7 +1,7 @@
extends ProgressBar
onready var global_ints = $"/root/GlobalInts"
@onready var global_ints = $"/root/GlobalInts"
func _ready():

View File

@ -1,7 +1,7 @@
extends CanvasLayer
onready var global_ints = $"/root/GlobalInts"
@onready var global_ints = $"/root/GlobalInts"
var js_callback = JavaScript.create_callback(self, "load_handler");
var js_interface;

View File

@ -1,7 +1,7 @@
extends ProgressBar
onready var global_ints = $"/root/GlobalInts"
@onready var global_ints = $"/root/GlobalInts"
var time_lefts : int

View File

@ -48,7 +48,7 @@ func load_image():
js_interface.upload(js_callback);
yield(self, "read_completed")
await self.read_completed
var imageType = js_interface.fileType;
var imageData = JavaScript.eval("_HTML5FileExchange.result", true) # interface doesn't work as expected for some reason

View File

@ -1,4 +1,4 @@
tool
@tool
extends EditorPlugin

View File

@ -1,7 +1,7 @@
[gd_resource type="Environment" load_steps=2 format=2]
[gd_resource type="Environment" load_steps=2 format=3 uid="uid://bde06umc8drr4"]
[sub_resource type="ProceduralSky" id=1]
[sub_resource type="Sky" id="1"]
[resource]
background_mode = 2
background_sky = SubResource( 1 )
sky = SubResource("1")

View File

@ -10,9 +10,9 @@ var update_text_url = "https://raw.githubusercontent.com/hobbesjaap/time-samplin
var update_text : String
onready var date_time_display = $"%CurrentTime"
onready var global_ints = $"/root/GlobalInts"
onready var minute_label = $"StartScreen/InstructionPanel/MinuteBox/MinuteLabel"
@onready var date_time_display = $"%CurrentTime"
@onready var global_ints = $"/root/GlobalInts"
@onready var minute_label = $"StartScreen/InstructionPanel/MinuteBox/MinuteLabel"
func check_for_updates():
@ -26,7 +26,9 @@ func check_for_updates():
func _on_HTTPRequest_request_completed(_result, _response_code, _headers, body):
var json = JSON.parse(body.get_string_from_utf8())
var test_json_conv = JSON.new()
test_json_conv.parse(body.get_string_from_utf8())
var json = test_json_conv.get_data()
global_ints.web_release_version = json.result
if global_ints.web_release_version > global_ints.release_version:
print("There's an update!")

File diff suppressed because it is too large Load Diff

View File

@ -6,15 +6,16 @@
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
config_version=5
[application]
config/name="Time Sampling Form"
run/main_scene="res://main_screen.tscn"
config/features=PackedStringArray("4.1")
run/low_processor_mode=true
boot_splash/bg_color=Color(0.952941, 0.933333, 0.847059, 1)
boot_splash/image="res://Assets/icons/main_icon.png"
boot_splash/bg_color=Color( 0.952941, 0.933333, 0.847059, 1 )
config/icon="res://Assets/icons/main_icon.png"
config/macos_native_icon="res://Assets/icons/main_icon.icns"
config/windows_native_icon="res://Assets/icons/icon.ico"
@ -26,14 +27,13 @@ HTML5File="*res://addons/HTML5FileExchange/HTML5FileExchange.gd"
[display]
window/size/width=1280
window/size/height=720
window/size/viewport_width=1280
window/size/viewport_height=720
window/stretch/mode="2d"
window/stretch/aspect="keep"
[editor_plugins]
enabled=PoolStringArray( "res://addons/HTML5FileExchange/plugin.cfg" )
enabled=PackedStringArray("res://addons/HTML5FileExchange/plugin.cfg")
[gui]
@ -45,7 +45,7 @@ common/enable_pause_aware_picking=true
[rendering]
environment/defaults/default_environment="res://default_env.tres"
quality/intended_usage/framebuffer_allocation=0
quality/intended_usage/framebuffer_allocation.mobile=0
2d/snapping/use_gpu_pixel_snap=true
environment/default_environment="res://default_env.tres"

View File

@ -1,104 +1,124 @@
[gd_resource type="Theme" load_steps=16 format=2]
[gd_resource type="Theme" load_steps=16 format=3 uid="uid://bki1nuccpiu3o"]
[ext_resource path="res://Assets/fonts/noto_sans_display_bold.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://Assets/fonts/noto_sans_display.ttf" type="DynamicFontData" id=2]
[ext_resource type="FontFile" uid="uid://pimhoja8acya" path="res://Assets/fonts/noto_sans_display_bold.ttf" id="1"]
[ext_resource type="FontFile" uid="uid://c21retrvbsple" path="res://Assets/fonts/noto_sans_display.ttf" id="2"]
[sub_resource type="DynamicFont" id=1]
size = 24
font_data = ExtResource( 1 )
[sub_resource type="FontFile" id="1"]
fallbacks = Array[Font]([ExtResource("1")])
cache/0/16/0/ascent = 0.0
cache/0/16/0/descent = 0.0
cache/0/16/0/underline_position = 0.0
cache/0/16/0/underline_thickness = 0.0
cache/0/16/0/scale = 1.0
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
[sub_resource type="StyleBoxFlat" id=4]
bg_color = Color( 0.207843, 0.219608, 0.317647, 1 )
[sub_resource type="StyleBoxFlat" id="4"]
bg_color = Color(0.207843, 0.219608, 0.317647, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxFlat" id=5]
bg_color = Color( 0.862745, 0.435294, 0.329412, 1 )
[sub_resource type="StyleBoxFlat" id="5"]
bg_color = Color(0.862745, 0.435294, 0.329412, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxFlat" id=6]
bg_color = Color( 0.941176, 0.772549, 0.517647, 1 )
[sub_resource type="StyleBoxFlat" id="6"]
bg_color = Color(0.941176, 0.772549, 0.517647, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxFlat" id=2]
bg_color = Color( 0.862745, 0.435294, 0.329412, 1 )
[sub_resource type="StyleBoxFlat" id="2"]
bg_color = Color(0.862745, 0.435294, 0.329412, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxFlat" id=7]
bg_color = Color( 0.941176, 0.772549, 0.517647, 1 )
[sub_resource type="StyleBoxFlat" id="7"]
bg_color = Color(0.941176, 0.772549, 0.517647, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="DynamicFont" id=3]
size = 24
font_data = ExtResource( 2 )
[sub_resource type="FontFile" id="3"]
fallbacks = Array[Font]([ExtResource("2")])
cache/0/16/0/ascent = 0.0
cache/0/16/0/descent = 0.0
cache/0/16/0/underline_position = 0.0
cache/0/16/0/underline_thickness = 0.0
cache/0/16/0/scale = 1.0
cache/0/16/0/glyphs/0/advance = Vector2(0, 0)
cache/0/16/0/glyphs/0/offset = Vector2(0, 0)
cache/0/16/0/glyphs/0/size = Vector2(0, 0)
cache/0/16/0/glyphs/0/uv_rect = Rect2(0, 0, 0, 0)
cache/0/16/0/glyphs/0/texture_idx = -1
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
[sub_resource type="DynamicFont" id=8]
size = 24
font_data = ExtResource( 2 )
[sub_resource type="FontFile" id="8"]
fallbacks = Array[Font]([ExtResource("2")])
cache/0/16/0/ascent = 0.0
cache/0/16/0/descent = 0.0
cache/0/16/0/underline_position = 0.0
cache/0/16/0/underline_thickness = 0.0
cache/0/16/0/scale = 1.0
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
[sub_resource type="StyleBoxFlat" id=9]
[sub_resource type="StyleBoxFlat" id="9"]
content_margin_left = 15.0
content_margin_right = 5.0
bg_color = Color( 0.207843, 0.219608, 0.317647, 1 )
bg_color = Color(0.207843, 0.219608, 0.317647, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxFlat" id=11]
bg_color = Color( 0.952941, 0.933333, 0.847059, 1 )
[sub_resource type="StyleBoxFlat" id="11"]
bg_color = Color(0.952941, 0.933333, 0.847059, 1)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color( 0.207843, 0.219608, 0.317647, 1 )
border_color = Color(0.207843, 0.219608, 0.317647, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxEmpty" id=12]
[sub_resource type="StyleBoxEmpty" id="12"]
[sub_resource type="StyleBoxFlat" id=13]
bg_color = Color( 0.862745, 0.435294, 0.329412, 1 )
[sub_resource type="StyleBoxFlat" id="13"]
bg_color = Color(0.862745, 0.435294, 0.329412, 1)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="StyleBoxFlat" id=14]
bg_color = Color( 0.941176, 0.772549, 0.517647, 1 )
[sub_resource type="StyleBoxFlat" id="14"]
bg_color = Color(0.941176, 0.772549, 0.517647, 1)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[resource]
Button/fonts/font = SubResource( 1 )
Button/styles/disabled = SubResource( 4 )
Button/styles/focus = SubResource( 5 )
Button/styles/hover = SubResource( 6 )
Button/styles/normal = SubResource( 2 )
Button/styles/pressed = SubResource( 7 )
Label/colors/font_color = Color( 0, 0, 0, 1 )
Label/fonts/font = SubResource( 3 )
LineEdit/fonts/font = SubResource( 8 )
LineEdit/styles/normal = SubResource( 9 )
Panel/styles/panel = SubResource( 11 )
PanelContainer/styles/panel = SubResource( 12 )
ProgressBar/styles/bg = SubResource( 13 )
ProgressBar/styles/fg = SubResource( 14 )
Button/fonts/font = SubResource("1")
Button/styles/disabled = SubResource("4")
Button/styles/focus = SubResource("5")
Button/styles/hover = SubResource("6")
Button/styles/normal = SubResource("2")
Button/styles/pressed = SubResource("7")
Label/colors/font_color = Color(0, 0, 0, 1)
Label/fonts/font = SubResource("3")
LineEdit/fonts/font = SubResource("8")
LineEdit/styles/normal = SubResource("9")
Panel/styles/panel = SubResource("11")
PanelContainer/styles/panel = SubResource("12")
ProgressBar/styles/bg = SubResource("13")
ProgressBar/styles/fg = SubResource("14")