-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,364 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
extends Control | ||
|
||
|
||
var current_path = 'no path set' | ||
|
||
|
||
func _process(delta): | ||
if $Settings/TabContainer/AutoSave/AutoSaving.pressed == true: | ||
autosave() | ||
shortcuts() | ||
window_settings() | ||
textedit_settings() | ||
time() | ||
|
||
|
||
func time(): | ||
var time = { | ||
hour = Time.get_time_dict_from_system().hour, | ||
minute = Time.get_time_dict_from_system().minute, | ||
second = Time.get_time_dict_from_system().second, | ||
} | ||
|
||
if time.minute < 10 and time.second >= 10: | ||
$ToolBar/Time.text = String(time.hour) + ':0' + String(time.minute) + ':' + String(time.second) | ||
if time.minute >= 10 and time.second < 10: | ||
$ToolBar/Time.text = String(time.hour) + ':' + String(time.minute) + ':0' + String(time.second) | ||
if time.minute < 10 and time.second < 10: | ||
$ToolBar/Time.text = String(time.hour) + ':0' + String(time.minute) + ':0' + String(time.second) | ||
if time.minute >= 10 and time.second >= 10: | ||
$ToolBar/Time.text = String(time.hour) + ':' + String(time.minute) + ':' + String(time.second) | ||
if time.hour < 10: | ||
$ToolBar/Time.text = '0' + $ToolBar/Time.text | ||
|
||
|
||
func shortcuts(): | ||
if Input.is_action_pressed('quicknote'): | ||
quicknote() | ||
if Input.is_action_pressed('new_file'): | ||
new_file_button() | ||
if Input.is_action_pressed('open_file'): | ||
open_file_button() | ||
if Input.is_action_pressed('save_file'): | ||
save_file_button() | ||
if Input.is_action_pressed('save_file_as'): | ||
save_file_as_button() | ||
if Input.is_action_pressed('settings'): | ||
settings_button() | ||
if Input.is_action_just_pressed('fullscreen') and $Settings/TabContainer/Window/Fullscreen.pressed == false: | ||
$Settings/TabContainer/Window/Fullscreen.pressed = true | ||
if Input.is_action_pressed('cancel') and $Settings/TabContainer/Window/Fullscreen.pressed == true: | ||
$Settings/TabContainer/Window/Fullscreen.pressed = false | ||
|
||
|
||
func window_settings(): | ||
if current_path == 'no path set': | ||
OS.set_window_title('Code172 - Unsaved File') | ||
else: | ||
OS.set_window_title('Code172' + ' - ' + current_path) | ||
|
||
OS.window_borderless = $Settings/TabContainer/Window/Borderless.pressed | ||
OS.keep_screen_on = $Settings/TabContainer/Window/KeepScreenOn.pressed | ||
OS.window_resizable = $Settings/TabContainer/Window/Resizable.pressed | ||
OS.window_fullscreen = $Settings/TabContainer/Window/Fullscreen.pressed | ||
|
||
|
||
func textedit_settings(): | ||
$TextEdit.highlight_current_line = $Settings/TabContainer/TextEdit/HighlightCurrentLine.pressed | ||
$TextEdit.highlight_all_occurrences = $Settings/TabContainer/TextEdit/HighligtAllOccurrences.pressed | ||
$TextEdit.syntax_highlighting = $Settings/TabContainer/TextEdit/SyntaxHighlighting.pressed | ||
$TextEdit.show_line_numbers = $Settings/TabContainer/TextEdit/LineNumbers.pressed | ||
$TextEdit.draw_tabs = $Settings/TabContainer/TextEdit/DrawTabs.pressed | ||
$TextEdit.draw_spaces = $Settings/TabContainer/TextEdit/DrawSpaces.pressed | ||
$TextEdit.breakpoint_gutter = $Settings/TabContainer/TextEdit/BreakpointGutter.pressed | ||
$TextEdit.fold_gutter = $Settings/TabContainer/TextEdit/FoldGutter.pressed | ||
$TextEdit.smooth_scrolling = $Settings/TabContainer/TextEdit/SmoothScrolling.pressed | ||
$TextEdit.minimap_draw = $Settings/TabContainer/TextEdit/Minimap.pressed | ||
|
||
|
||
func autosave(): | ||
if current_path != 'no path set': | ||
var file = File.new() | ||
file.open(current_path, 2) | ||
file.store_string($TextEdit.text) | ||
|
||
|
||
func settings_button(): | ||
$Settings.popup_centered() | ||
|
||
|
||
func quicknote(): | ||
$QuickNote.popup_centered() | ||
|
||
|
||
func new_file(): | ||
$TextEdit.text = '' | ||
current_path = 'no path set' | ||
|
||
|
||
func new_file_button(): | ||
$ConfirmNewFile.popup_centered() | ||
|
||
|
||
func open_file(path): | ||
var file = File.new() | ||
file.open(path, 1) | ||
current_path = path | ||
$TextEdit.text = file.get_as_text() | ||
|
||
|
||
func open_file_button(): | ||
$OpenFile.popup_centered() | ||
|
||
|
||
func save_file_button(): | ||
if current_path == 'no path set': | ||
save_file_as_button() | ||
else: | ||
var file = File.new() | ||
file.open(current_path, 2) | ||
file.store_string($TextEdit.text) | ||
$SavedDialog.popup_centered() | ||
|
||
|
||
func save_file_as(path): | ||
var file = File.new() | ||
file.open(path, 2) | ||
file.store_string($TextEdit.text) | ||
current_path = path | ||
$SavedDialog.popup_centered() | ||
|
||
|
||
func save_file_as_button(): | ||
$SaveFileAs.popup_centered() | ||
|
||
|
||
func about_button(): | ||
$About.popup_centered() | ||
|
||
|
||
func quit_button(): | ||
$ConfirmQuit.popup_centered() | ||
|
||
|
||
func confirm_quit(): | ||
get_tree().quit() | ||
|
||
|
||
func itch_io(): | ||
OS.shell_open('https://ihsan-172.itch.io/code172') | ||
|
||
|
||
func github(): | ||
OS.shell_open('https://github.com/Ihsan172/Code172') | ||
|
||
|
||
func report_bug(): | ||
OS.shell_open('https://github.com/Ihsan172/Code172/issues/new') |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
[preset.0] | ||
|
||
name="Windows64" | ||
platform="Windows Desktop" | ||
runnable=false | ||
custom_features="" | ||
export_filter="all_resources" | ||
include_filter="" | ||
exclude_filter="" | ||
export_path="../../../Desktop/Code172_64.exe" | ||
script_export_mode=1 | ||
script_encryption_key="" | ||
|
||
[preset.0.options] | ||
|
||
custom_template/debug="" | ||
custom_template/release="" | ||
binary_format/64_bits=true | ||
binary_format/embed_pck=false | ||
texture_format/bptc=false | ||
texture_format/s3tc=true | ||
texture_format/etc=false | ||
texture_format/etc2=false | ||
texture_format/no_bptc_fallbacks=true | ||
codesign/enable=false | ||
codesign/identity_type=0 | ||
codesign/identity="" | ||
codesign/password="" | ||
codesign/timestamp=true | ||
codesign/timestamp_server_url="" | ||
codesign/digest_algorithm=1 | ||
codesign/description="" | ||
codesign/custom_options=PoolStringArray( ) | ||
application/modify_resources=true | ||
application/icon="res://Logo/Logo.ico" | ||
application/file_version="2.0" | ||
application/product_version="2.0" | ||
application/company_name="Ihsan172" | ||
application/product_name="Code172" | ||
application/file_description="Code172" | ||
application/copyright="© 2021-2023 Ihsan172" | ||
application/trademarks="" | ||
|
||
[preset.1] | ||
|
||
name="Windows32" | ||
platform="Windows Desktop" | ||
runnable=false | ||
custom_features="" | ||
export_filter="all_resources" | ||
include_filter="" | ||
exclude_filter="" | ||
export_path="../../../Desktop/Code172_32.exe" | ||
script_export_mode=1 | ||
script_encryption_key="" | ||
|
||
[preset.1.options] | ||
|
||
custom_template/debug="" | ||
custom_template/release="" | ||
binary_format/64_bits=false | ||
binary_format/embed_pck=false | ||
texture_format/bptc=false | ||
texture_format/s3tc=true | ||
texture_format/etc=false | ||
texture_format/etc2=false | ||
texture_format/no_bptc_fallbacks=true | ||
codesign/enable=false | ||
codesign/identity_type=0 | ||
codesign/identity="" | ||
codesign/password="" | ||
codesign/timestamp=true | ||
codesign/timestamp_server_url="" | ||
codesign/digest_algorithm=1 | ||
codesign/description="" | ||
codesign/custom_options=PoolStringArray( ) | ||
application/modify_resources=true | ||
application/icon="res://Logo/Logo.ico" | ||
application/file_version="2.0" | ||
application/product_version="2.0" | ||
application/company_name="Ihsan172" | ||
application/product_name="Code172" | ||
application/file_description="Code172" | ||
application/copyright="© 2021-2023 Ihsan172" | ||
application/trademarks="" | ||
|
||
[preset.2] | ||
|
||
name="Linux64" | ||
platform="Linux/X11" | ||
runnable=false | ||
custom_features="" | ||
export_filter="all_resources" | ||
include_filter="" | ||
exclude_filter="" | ||
export_path="../../../Desktop/Code172.x86_64" | ||
script_export_mode=1 | ||
script_encryption_key="" | ||
|
||
[preset.2.options] | ||
|
||
custom_template/debug="" | ||
custom_template/release="" | ||
binary_format/64_bits=true | ||
binary_format/embed_pck=false | ||
texture_format/bptc=false | ||
texture_format/s3tc=true | ||
texture_format/etc=false | ||
texture_format/etc2=false | ||
texture_format/no_bptc_fallbacks=true | ||
|
||
[preset.3] | ||
|
||
name="Linux32" | ||
platform="Linux/X11" | ||
runnable=false | ||
custom_features="" | ||
export_filter="all_resources" | ||
include_filter="" | ||
exclude_filter="" | ||
export_path="../../../Desktop/Code172.x86" | ||
script_export_mode=1 | ||
script_encryption_key="" | ||
|
||
[preset.3.options] | ||
|
||
custom_template/debug="" | ||
custom_template/release="" | ||
binary_format/64_bits=false | ||
binary_format/embed_pck=false | ||
texture_format/bptc=false | ||
texture_format/s3tc=true | ||
texture_format/etc=false | ||
texture_format/etc2=false | ||
texture_format/no_bptc_fallbacks=true | ||
|
||
[preset.4] | ||
|
||
name="MacOS" | ||
platform="Mac OSX" | ||
runnable=false | ||
custom_features="" | ||
export_filter="all_resources" | ||
include_filter="" | ||
exclude_filter="" | ||
export_path="../../../Desktop/Code172.zip" | ||
script_export_mode=1 | ||
script_encryption_key="" | ||
|
||
[preset.4.options] | ||
|
||
custom_template/debug="" | ||
custom_template/release="" | ||
application/name="" | ||
application/info="A simple and lightweight code editor made with Godot." | ||
application/icon="res://Logo/Logo.icns" | ||
application/identifier="com.ihsan172.code172" | ||
application/signature="" | ||
application/app_category="Utilities" | ||
application/short_version="2.0" | ||
application/version="2.0" | ||
application/copyright="© 2021-2023 Ihsan172" | ||
display/high_res=false | ||
privacy/microphone_usage_description="" | ||
privacy/camera_usage_description="" | ||
privacy/location_usage_description="" | ||
privacy/address_book_usage_description="" | ||
privacy/calendar_usage_description="" | ||
privacy/photos_library_usage_description="" | ||
privacy/desktop_folder_usage_description="" | ||
privacy/documents_folder_usage_description="The application needs access to your documents folder to load and save files." | ||
privacy/downloads_folder_usage_description="" | ||
privacy/network_volumes_usage_description="" | ||
privacy/removable_volumes_usage_description="" | ||
codesign/enable=true | ||
codesign/identity="" | ||
codesign/timestamp=true | ||
codesign/hardened_runtime=true | ||
codesign/replace_existing_signature=true | ||
codesign/entitlements/custom_file="" | ||
codesign/entitlements/allow_jit_code_execution=false | ||
codesign/entitlements/allow_unsigned_executable_memory=false | ||
codesign/entitlements/allow_dyld_environment_variables=false | ||
codesign/entitlements/disable_library_validation=false | ||
codesign/entitlements/audio_input=false | ||
codesign/entitlements/camera=false | ||
codesign/entitlements/location=false | ||
codesign/entitlements/address_book=false | ||
codesign/entitlements/calendars=false | ||
codesign/entitlements/photos_library=false | ||
codesign/entitlements/apple_events=false | ||
codesign/entitlements/debugging=false | ||
codesign/entitlements/app_sandbox/enabled=false | ||
codesign/entitlements/app_sandbox/network_server=false | ||
codesign/entitlements/app_sandbox/network_client=false | ||
codesign/entitlements/app_sandbox/device_usb=false | ||
codesign/entitlements/app_sandbox/device_bluetooth=false | ||
codesign/entitlements/app_sandbox/files_downloads=0 | ||
codesign/entitlements/app_sandbox/files_pictures=0 | ||
codesign/entitlements/app_sandbox/files_music=0 | ||
codesign/entitlements/app_sandbox/files_movies=0 | ||
codesign/custom_options=PoolStringArray( ) | ||
notarization/enable=false | ||
notarization/apple_id_name="" | ||
notarization/apple_id_password="" | ||
notarization/apple_team_id="" | ||
texture_format/s3tc=true | ||
texture_format/etc=false | ||
texture_format/etc2=false |
Oops, something went wrong.