| 3534 | } |
| 3535 | |
| 3536 | String EditorNode::adjust_script_name_casing(const String &p_file_name, ScriptLanguage::ScriptNameCasing p_auto_casing) { |
| 3537 | int editor_casing = GLOBAL_GET("editor/naming/script_name_casing"); |
| 3538 | if (editor_casing == ScriptLanguage::SCRIPT_NAME_CASING_AUTO) { |
| 3539 | // Use the script language's preferred casing. |
| 3540 | editor_casing = p_auto_casing; |
| 3541 | } |
| 3542 | |
| 3543 | switch (editor_casing) { |
| 3544 | case ScriptLanguage::SCRIPT_NAME_CASING_AUTO: |
| 3545 | // Script language has no preference, so do not adjust. |
| 3546 | break; |
| 3547 | case ScriptLanguage::SCRIPT_NAME_CASING_PASCAL_CASE: |
| 3548 | return p_file_name.to_pascal_case(); |
| 3549 | case ScriptLanguage::SCRIPT_NAME_CASING_SNAKE_CASE: |
| 3550 | return p_file_name.to_snake_case(); |
| 3551 | case ScriptLanguage::SCRIPT_NAME_CASING_KEBAB_CASE: |
| 3552 | return p_file_name.to_kebab_case(); |
| 3553 | case ScriptLanguage::SCRIPT_NAME_CASING_CAMEL_CASE: |
| 3554 | return p_file_name.to_camel_case(); |
| 3555 | } |
| 3556 | return p_file_name; |
| 3557 | } |
| 3558 | |
| 3559 | void EditorNode::_request_screenshot() { |
| 3560 | _screenshot(); |
nothing calls this directly
no test coverage detected