├── objects └── OTest │ ├── Draw_77.gml │ ├── CleanUp_0.gml │ ├── Step_0.gml │ ├── Create_0.gml │ ├── Draw_0.gml │ ├── Mouse_55.gml │ └── OTest.yy ├── screenshot.png ├── fonts ├── FA_FntSolid12 │ └── FA_FntSolid12.png ├── FA_FntBrands12 │ └── FA_FntBrands12.png ├── FA_FntRegular12 │ └── FA_FntRegular12.png └── FORMS_FntNormal │ └── FORMS_FntNormal.png ├── hooks └── pre-commit ├── sprites ├── FORMS_SprColor │ ├── ff3904e7-5695-481b-b813-db7fabbac43b.png │ ├── layers │ │ └── ff3904e7-5695-481b-b813-db7fabbac43b │ │ │ └── c674cb94-0122-4f9c-a9a1-a716e5915b77.png │ └── FORMS_SprColor.yy ├── FORMS_SprTab │ ├── 85adeb82-1cd1-4552-a563-e4b3e3539be6.png │ ├── layers │ │ └── 85adeb82-1cd1-4552-a563-e4b3e3539be6 │ │ │ └── df440b5d-497d-435e-81d8-75a1ac9f8392.png │ └── FORMS_SprTab.yy ├── SprSponzaBBMOD │ ├── db256382-7c9b-4f46-917b-39a7eb2554b2.png │ ├── layers │ │ └── db256382-7c9b-4f46-917b-39a7eb2554b2 │ │ │ └── 7291bf3c-f87e-4166-afa4-c25addb50eed.png │ └── SprSponzaBBMOD.yy ├── FORMS_SprRound4 │ ├── 17678ef0-9744-4f65-a14f-ae355b8a0517.png │ ├── bc3a8f9b-8518-48ed-bd49-4530d4db3ccf.png │ ├── layers │ │ ├── 17678ef0-9744-4f65-a14f-ae355b8a0517 │ │ │ └── ea6e71fa-d25f-46cb-a7b1-b8418a0e0bf4.png │ │ └── bc3a8f9b-8518-48ed-bd49-4530d4db3ccf │ │ │ └── ea6e71fa-d25f-46cb-a7b1-b8418a0e0bf4.png │ └── FORMS_SprRound4.yy ├── FORMS_SprRound8 │ ├── 356adabb-7b80-4561-badf-e46303d17a0c.png │ ├── layers │ │ └── 356adabb-7b80-4561-badf-e46303d17a0c │ │ │ └── 2074bf05-1f8e-464a-9d3c-8c96ab0f5aa2.png │ └── FORMS_SprRound8.yy ├── FORMS_SprShadow │ ├── d382f438-c481-45f9-a47b-1a34c799b7c3.png │ ├── layers │ │ └── d382f438-c481-45f9-a47b-1a34c799b7c3 │ │ │ └── dbadb2d2-7344-44b1-a604-9e471ee73765.png │ └── FORMS_SprShadow.yy ├── FORMS_SprSlider │ ├── ef838973-25f6-4f63-9a20-c6e6c2e26a1d.png │ ├── layers │ │ └── ef838973-25f6-4f63-9a20-c6e6c2e26a1d │ │ │ └── ac539518-66f4-4721-89fb-a7c510a76419.png │ └── FORMS_SprSlider.yy ├── FORMS_SprEyeDropper │ ├── 3a01c315-aedf-44ea-8075-d0630bbd3db8.png │ ├── layers │ │ └── 3a01c315-aedf-44ea-8075-d0630bbd3db8 │ │ │ └── 4591ed55-1ca8-4b0e-814a-878e5bd78585.png │ └── FORMS_SprEyeDropper.yy ├── FORMS_SprRectangle │ ├── efdacc19-4415-4f73-9b42-868d18e88eb4.png │ ├── layers │ │ └── efdacc19-4415-4f73-9b42-868d18e88eb4 │ │ │ └── 0cf33634-7c65-4b1b-b97d-003007ad5246.png │ └── FORMS_SprRectangle.yy ├── FORMS_SprRadioButton │ ├── 762f7b1b-c949-4bdd-968e-dbf844344d72.png │ ├── c773e82c-b3c1-426f-9289-429fa0e443b7.png │ ├── d28694ca-370a-4d8b-9a4e-fe30261ca472.png │ ├── layers │ │ ├── 762f7b1b-c949-4bdd-968e-dbf844344d72 │ │ │ └── b0e3e361-7822-433c-8161-87536b6981e6.png │ │ ├── c773e82c-b3c1-426f-9289-429fa0e443b7 │ │ │ └── b0e3e361-7822-433c-8161-87536b6981e6.png │ │ └── d28694ca-370a-4d8b-9a4e-fe30261ca472 │ │ │ └── b0e3e361-7822-433c-8161-87536b6981e6.png │ └── FORMS_SprRadioButton.yy ├── FORMS_SprScrollableX │ ├── 118bf686-29d2-41eb-8f03-d7cde88a8338.png │ ├── 99b5a2a8-c6b3-44a0-959c-18725fcfbb6b.png │ ├── layers │ │ ├── 118bf686-29d2-41eb-8f03-d7cde88a8338 │ │ │ └── f71b168d-d115-4c83-ae31-266651410767.png │ │ └── 99b5a2a8-c6b3-44a0-959c-18725fcfbb6b │ │ │ └── f71b168d-d115-4c83-ae31-266651410767.png │ └── FORMS_SprScrollableX.yy ├── FORMS_SprScrollableY │ ├── 118bf686-29d2-41eb-8f03-d7cde88a8338.png │ ├── 99b5a2a8-c6b3-44a0-959c-18725fcfbb6b.png │ ├── layers │ │ ├── 118bf686-29d2-41eb-8f03-d7cde88a8338 │ │ │ └── f71b168d-d115-4c83-ae31-266651410767.png │ │ └── 99b5a2a8-c6b3-44a0-959c-18725fcfbb6b │ │ │ └── f71b168d-d115-4c83-ae31-266651410767.png │ └── FORMS_SprScrollableY.yy ├── FORMS_SprTabWorkspace │ ├── b3ee786d-f528-4a97-b601-09cce3145a3c.png │ ├── layers │ │ └── b3ee786d-f528-4a97-b601-09cce3145a3c │ │ │ └── a61ab70b-611c-45e2-a0bb-8a4ea94d2b0d.png │ └── FORMS_SprTabWorkspace.yy └── FORMS_SprColorPickerCircle │ ├── 5ffd9e5d-cc30-4d25-a95c-b60ae7d36348.png │ ├── 645f44f4-831f-4421-b556-b59ff4f25090.png │ ├── layers │ ├── 5ffd9e5d-cc30-4d25-a95c-b60ae7d36348 │ │ └── d8394bbb-8ac5-4dd4-985d-eefd6c8288fc.png │ └── 645f44f4-831f-4421-b556-b59ff4f25090 │ │ └── d8394bbb-8ac5-4dd4-985d-eefd6c8288fc.png │ └── FORMS_SprColorPickerCircle.yy ├── docs_src ├── ScriptingAPI.md └── index.md ├── .gitignore ├── requirements.txt ├── scripts ├── EditContextMenu │ ├── EditContextMenu.gml │ └── EditContextMenu.yy ├── TestUI │ ├── TestUI.yy │ └── TestUI.gml ├── __FA │ └── __FA.yy ├── __forms │ ├── __forms.yy │ └── __forms.gml ├── FORMS_Box │ └── FORMS_Box.yy ├── forms_pen │ └── forms_pen.yy ├── FORMS_Dock │ └── FORMS_Dock.yy ├── FORMS_Tree │ └── FORMS_Tree.yy ├── FORMS_Color │ └── FORMS_Color.yy ├── FORMS_Window │ └── FORMS_Window.yy ├── TestStatusBar │ ├── TestStatusBar.yy │ └── TestStatusBar.gml ├── TestWorkspace │ ├── TestWorkspace.yy │ └── TestWorkspace.gml ├── forms_widget │ └── forms_widget.yy ├── FORMS_Dropdown │ ├── FORMS_Dropdown.yy │ └── FORMS_Dropdown.gml ├── FORMS_MenuBar │ ├── FORMS_MenuBar.yy │ └── FORMS_MenuBar.gml ├── FORMS_Question │ ├── FORMS_Question.yy │ └── FORMS_Question.gml ├── FORMS_Toolbar │ ├── FORMS_Toolbar.yy │ └── FORMS_Toolbar.gml ├── FORMS_NodeGraph │ └── FORMS_NodeGraph.yy ├── FORMS_Scrollbar │ └── FORMS_Scrollbar.yy ├── FORMS_Workspace │ ├── FORMS_Workspace.yy │ └── FORMS_Workspace.gml ├── forms_container │ ├── forms_container.yy │ └── forms_container.gml ├── FORMS_RootWidget │ └── FORMS_RootWidget.yy ├── FORMS_ScrollPane │ ├── FORMS_ScrollPane.yy │ └── FORMS_ScrollPane.gml ├── FORMS_ColorPicker │ └── FORMS_ColorPicker.yy ├── FORMS_ContextMenu │ └── FORMS_ContextMenu.yy ├── FileContextMenu │ ├── FileContextMenu.yy │ └── FileContextMenu.gml ├── FORMS_CompoundWidget │ ├── FORMS_CompoundWidget.yy │ └── FORMS_CompoundWidget.gml ├── TestWelcomeScrollPane │ ├── TestWelcomeScrollPane.yy │ └── TestWelcomeScrollPane.gml ├── FORMS_KeyboardShortcut │ └── FORMS_KeyboardShortcut.yy ├── TestControlsScrollPane │ ├── TestControlsScrollPane.yy │ └── TestControlsScrollPane.gml └── FORMS_ApplicationSurface │ ├── FORMS_ApplicationSurface.yy │ └── FORMS_ApplicationSurface.gml ├── shaders └── FORMS_ShColorWheel │ ├── FORMS_ShColorWheel.yy │ ├── FORMS_ShColorWheel.vsh │ └── FORMS_ShColorWheel.fsh ├── gmdoc.json ├── options ├── switch │ └── options_switch.yy ├── main │ └── options_main.yy ├── linux │ └── options_linux.yy ├── operagx │ └── options_operagx.yy ├── ps5 │ └── options_ps5.yy ├── html5 │ └── options_html5.yy ├── mac │ └── options_mac.yy ├── tvos │ └── options_tvos.yy ├── windows │ └── options_windows.yy ├── ps4 │ └── options_ps4.yy ├── xboxseriesxs │ └── options_xboxseriesxs.yy ├── ios │ └── options_ios.yy └── android │ └── options_android.yy ├── .jsbeautifyrc ├── .github └── FUNDING.yml ├── LICENSE ├── README.md ├── rooms └── RmTest │ └── RmTest.yy ├── format-gml.py ├── Forms.resource_order ├── Forms.yyp └── datafiles └── LICENSE-FontAwesome.txt /objects/OTest/Draw_77.gml: -------------------------------------------------------------------------------- 1 | gui.draw(); 2 | -------------------------------------------------------------------------------- /objects/OTest/CleanUp_0.gml: -------------------------------------------------------------------------------- 1 | gui = gui.destroy(); 2 | -------------------------------------------------------------------------------- /objects/OTest/Step_0.gml: -------------------------------------------------------------------------------- 1 | gui.update(delta_time); 2 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/screenshot.png -------------------------------------------------------------------------------- /fonts/FA_FntSolid12/FA_FntSolid12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/fonts/FA_FntSolid12/FA_FntSolid12.png -------------------------------------------------------------------------------- /fonts/FA_FntBrands12/FA_FntBrands12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/fonts/FA_FntBrands12/FA_FntBrands12.png -------------------------------------------------------------------------------- /fonts/FA_FntRegular12/FA_FntRegular12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/fonts/FA_FntRegular12/FA_FntRegular12.png -------------------------------------------------------------------------------- /fonts/FORMS_FntNormal/FORMS_FntNormal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/fonts/FORMS_FntNormal/FORMS_FntNormal.png -------------------------------------------------------------------------------- /hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if hash python3 2>/dev/null; 3 | then 4 | python3 format-gml.py --validate 5 | else 6 | python format-gml.py --validate 7 | fi 8 | -------------------------------------------------------------------------------- /objects/OTest/Create_0.gml: -------------------------------------------------------------------------------- 1 | application_surface_enable(true); 2 | application_surface_draw_enable(false); 3 | draw_set_font(FORMS_FntNormal); 4 | 5 | gui = new TestUI(); 6 | -------------------------------------------------------------------------------- /sprites/FORMS_SprColor/ff3904e7-5695-481b-b813-db7fabbac43b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprColor/ff3904e7-5695-481b-b813-db7fabbac43b.png -------------------------------------------------------------------------------- /sprites/FORMS_SprTab/85adeb82-1cd1-4552-a563-e4b3e3539be6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprTab/85adeb82-1cd1-4552-a563-e4b3e3539be6.png -------------------------------------------------------------------------------- /sprites/SprSponzaBBMOD/db256382-7c9b-4f46-917b-39a7eb2554b2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/SprSponzaBBMOD/db256382-7c9b-4f46-917b-39a7eb2554b2.png -------------------------------------------------------------------------------- /docs_src/ScriptingAPI.md: -------------------------------------------------------------------------------- 1 | # Scripting API 2 | 3 | In this section you can find documentation for all functions, structs, enums, macros and global variables contained in Forms. 4 | -------------------------------------------------------------------------------- /sprites/FORMS_SprRound4/17678ef0-9744-4f65-a14f-ae355b8a0517.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRound4/17678ef0-9744-4f65-a14f-ae355b8a0517.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRound4/bc3a8f9b-8518-48ed-bd49-4530d4db3ccf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRound4/bc3a8f9b-8518-48ed-bd49-4530d4db3ccf.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRound8/356adabb-7b80-4561-badf-e46303d17a0c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRound8/356adabb-7b80-4561-badf-e46303d17a0c.png -------------------------------------------------------------------------------- /sprites/FORMS_SprShadow/d382f438-c481-45f9-a47b-1a34c799b7c3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprShadow/d382f438-c481-45f9-a47b-1a34c799b7c3.png -------------------------------------------------------------------------------- /sprites/FORMS_SprSlider/ef838973-25f6-4f63-9a20-c6e6c2e26a1d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprSlider/ef838973-25f6-4f63-9a20-c6e6c2e26a1d.png -------------------------------------------------------------------------------- /sprites/FORMS_SprEyeDropper/3a01c315-aedf-44ea-8075-d0630bbd3db8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprEyeDropper/3a01c315-aedf-44ea-8075-d0630bbd3db8.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRectangle/efdacc19-4415-4f73-9b42-868d18e88eb4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRectangle/efdacc19-4415-4f73-9b42-868d18e88eb4.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRadioButton/762f7b1b-c949-4bdd-968e-dbf844344d72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRadioButton/762f7b1b-c949-4bdd-968e-dbf844344d72.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRadioButton/c773e82c-b3c1-426f-9289-429fa0e443b7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRadioButton/c773e82c-b3c1-426f-9289-429fa0e443b7.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRadioButton/d28694ca-370a-4d8b-9a4e-fe30261ca472.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRadioButton/d28694ca-370a-4d8b-9a4e-fe30261ca472.png -------------------------------------------------------------------------------- /sprites/FORMS_SprScrollableX/118bf686-29d2-41eb-8f03-d7cde88a8338.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprScrollableX/118bf686-29d2-41eb-8f03-d7cde88a8338.png -------------------------------------------------------------------------------- /sprites/FORMS_SprScrollableX/99b5a2a8-c6b3-44a0-959c-18725fcfbb6b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprScrollableX/99b5a2a8-c6b3-44a0-959c-18725fcfbb6b.png -------------------------------------------------------------------------------- /sprites/FORMS_SprScrollableY/118bf686-29d2-41eb-8f03-d7cde88a8338.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprScrollableY/118bf686-29d2-41eb-8f03-d7cde88a8338.png -------------------------------------------------------------------------------- /sprites/FORMS_SprScrollableY/99b5a2a8-c6b3-44a0-959c-18725fcfbb6b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprScrollableY/99b5a2a8-c6b3-44a0-959c-18725fcfbb6b.png -------------------------------------------------------------------------------- /sprites/FORMS_SprTabWorkspace/b3ee786d-f528-4a97-b601-09cce3145a3c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprTabWorkspace/b3ee786d-f528-4a97-b601-09cce3145a3c.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Local 2 | .vscode 3 | /docs_build/ 4 | /docs_src/ScriptingAPI/ 5 | /env/ 6 | 7 | # Old font files 8 | *.old.yy 9 | *.old.png 10 | 11 | # Mac stuff 12 | .DS_Store 13 | ._* 14 | -------------------------------------------------------------------------------- /sprites/FORMS_SprColorPickerCircle/5ffd9e5d-cc30-4d25-a95c-b60ae7d36348.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprColorPickerCircle/5ffd9e5d-cc30-4d25-a95c-b60ae7d36348.png -------------------------------------------------------------------------------- /sprites/FORMS_SprColorPickerCircle/645f44f4-831f-4421-b556-b59ff4f25090.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprColorPickerCircle/645f44f4-831f-4421-b556-b59ff4f25090.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | cachetools==5.0.0 2 | EditorConfig==0.12.4 3 | future==0.18.2 4 | Jinja2==3.1.1 5 | jsbeautifier==1.15.1 6 | MarkupSafe==2.1.1 7 | mistune==2.0.2 8 | pefile==2021.9.3 9 | six==1.16.0 10 | -------------------------------------------------------------------------------- /docs_src/index.md: -------------------------------------------------------------------------------- 1 | # Forms 2 | 3 | Welcome to the official documentation of Forms 0.1.0! 4 | 5 | Forms is a UI library for creating applications in GameMaker. 6 | 7 | ## Contents 8 | 9 | * [Scripting API](./ScriptingAPI.html) 10 | -------------------------------------------------------------------------------- /sprites/FORMS_SprTab/layers/85adeb82-1cd1-4552-a563-e4b3e3539be6/df440b5d-497d-435e-81d8-75a1ac9f8392.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprTab/layers/85adeb82-1cd1-4552-a563-e4b3e3539be6/df440b5d-497d-435e-81d8-75a1ac9f8392.png -------------------------------------------------------------------------------- /sprites/FORMS_SprColor/layers/ff3904e7-5695-481b-b813-db7fabbac43b/c674cb94-0122-4f9c-a9a1-a716e5915b77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprColor/layers/ff3904e7-5695-481b-b813-db7fabbac43b/c674cb94-0122-4f9c-a9a1-a716e5915b77.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRound4/layers/17678ef0-9744-4f65-a14f-ae355b8a0517/ea6e71fa-d25f-46cb-a7b1-b8418a0e0bf4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRound4/layers/17678ef0-9744-4f65-a14f-ae355b8a0517/ea6e71fa-d25f-46cb-a7b1-b8418a0e0bf4.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRound4/layers/bc3a8f9b-8518-48ed-bd49-4530d4db3ccf/ea6e71fa-d25f-46cb-a7b1-b8418a0e0bf4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRound4/layers/bc3a8f9b-8518-48ed-bd49-4530d4db3ccf/ea6e71fa-d25f-46cb-a7b1-b8418a0e0bf4.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRound8/layers/356adabb-7b80-4561-badf-e46303d17a0c/2074bf05-1f8e-464a-9d3c-8c96ab0f5aa2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRound8/layers/356adabb-7b80-4561-badf-e46303d17a0c/2074bf05-1f8e-464a-9d3c-8c96ab0f5aa2.png -------------------------------------------------------------------------------- /sprites/FORMS_SprShadow/layers/d382f438-c481-45f9-a47b-1a34c799b7c3/dbadb2d2-7344-44b1-a604-9e471ee73765.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprShadow/layers/d382f438-c481-45f9-a47b-1a34c799b7c3/dbadb2d2-7344-44b1-a604-9e471ee73765.png -------------------------------------------------------------------------------- /sprites/FORMS_SprSlider/layers/ef838973-25f6-4f63-9a20-c6e6c2e26a1d/ac539518-66f4-4721-89fb-a7c510a76419.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprSlider/layers/ef838973-25f6-4f63-9a20-c6e6c2e26a1d/ac539518-66f4-4721-89fb-a7c510a76419.png -------------------------------------------------------------------------------- /sprites/SprSponzaBBMOD/layers/db256382-7c9b-4f46-917b-39a7eb2554b2/7291bf3c-f87e-4166-afa4-c25addb50eed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/SprSponzaBBMOD/layers/db256382-7c9b-4f46-917b-39a7eb2554b2/7291bf3c-f87e-4166-afa4-c25addb50eed.png -------------------------------------------------------------------------------- /sprites/FORMS_SprEyeDropper/layers/3a01c315-aedf-44ea-8075-d0630bbd3db8/4591ed55-1ca8-4b0e-814a-878e5bd78585.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprEyeDropper/layers/3a01c315-aedf-44ea-8075-d0630bbd3db8/4591ed55-1ca8-4b0e-814a-878e5bd78585.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRadioButton/layers/762f7b1b-c949-4bdd-968e-dbf844344d72/b0e3e361-7822-433c-8161-87536b6981e6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRadioButton/layers/762f7b1b-c949-4bdd-968e-dbf844344d72/b0e3e361-7822-433c-8161-87536b6981e6.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRadioButton/layers/c773e82c-b3c1-426f-9289-429fa0e443b7/b0e3e361-7822-433c-8161-87536b6981e6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRadioButton/layers/c773e82c-b3c1-426f-9289-429fa0e443b7/b0e3e361-7822-433c-8161-87536b6981e6.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRadioButton/layers/d28694ca-370a-4d8b-9a4e-fe30261ca472/b0e3e361-7822-433c-8161-87536b6981e6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRadioButton/layers/d28694ca-370a-4d8b-9a4e-fe30261ca472/b0e3e361-7822-433c-8161-87536b6981e6.png -------------------------------------------------------------------------------- /sprites/FORMS_SprRectangle/layers/efdacc19-4415-4f73-9b42-868d18e88eb4/0cf33634-7c65-4b1b-b97d-003007ad5246.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprRectangle/layers/efdacc19-4415-4f73-9b42-868d18e88eb4/0cf33634-7c65-4b1b-b97d-003007ad5246.png -------------------------------------------------------------------------------- /sprites/FORMS_SprScrollableX/layers/118bf686-29d2-41eb-8f03-d7cde88a8338/f71b168d-d115-4c83-ae31-266651410767.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprScrollableX/layers/118bf686-29d2-41eb-8f03-d7cde88a8338/f71b168d-d115-4c83-ae31-266651410767.png -------------------------------------------------------------------------------- /sprites/FORMS_SprScrollableX/layers/99b5a2a8-c6b3-44a0-959c-18725fcfbb6b/f71b168d-d115-4c83-ae31-266651410767.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprScrollableX/layers/99b5a2a8-c6b3-44a0-959c-18725fcfbb6b/f71b168d-d115-4c83-ae31-266651410767.png -------------------------------------------------------------------------------- /sprites/FORMS_SprScrollableY/layers/118bf686-29d2-41eb-8f03-d7cde88a8338/f71b168d-d115-4c83-ae31-266651410767.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprScrollableY/layers/118bf686-29d2-41eb-8f03-d7cde88a8338/f71b168d-d115-4c83-ae31-266651410767.png -------------------------------------------------------------------------------- /sprites/FORMS_SprScrollableY/layers/99b5a2a8-c6b3-44a0-959c-18725fcfbb6b/f71b168d-d115-4c83-ae31-266651410767.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprScrollableY/layers/99b5a2a8-c6b3-44a0-959c-18725fcfbb6b/f71b168d-d115-4c83-ae31-266651410767.png -------------------------------------------------------------------------------- /sprites/FORMS_SprTabWorkspace/layers/b3ee786d-f528-4a97-b601-09cce3145a3c/a61ab70b-611c-45e2-a0bb-8a4ea94d2b0d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprTabWorkspace/layers/b3ee786d-f528-4a97-b601-09cce3145a3c/a61ab70b-611c-45e2-a0bb-8a4ea94d2b0d.png -------------------------------------------------------------------------------- /sprites/FORMS_SprColorPickerCircle/layers/5ffd9e5d-cc30-4d25-a95c-b60ae7d36348/d8394bbb-8ac5-4dd4-985d-eefd6c8288fc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprColorPickerCircle/layers/5ffd9e5d-cc30-4d25-a95c-b60ae7d36348/d8394bbb-8ac5-4dd4-985d-eefd6c8288fc.png -------------------------------------------------------------------------------- /sprites/FORMS_SprColorPickerCircle/layers/645f44f4-831f-4421-b556-b59ff4f25090/d8394bbb-8ac5-4dd4-985d-eefd6c8288fc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueburncz/Forms/HEAD/sprites/FORMS_SprColorPickerCircle/layers/645f44f4-831f-4421-b556-b59ff4f25090/d8394bbb-8ac5-4dd4-985d-eefd6c8288fc.png -------------------------------------------------------------------------------- /scripts/EditContextMenu/EditContextMenu.gml: -------------------------------------------------------------------------------- 1 | function EditContextMenu(): FORMS_ContextMenu() constructor 2 | { 3 | array_push( 4 | Options, 5 | new FORMS_ContextMenuOption("Some"), 6 | new FORMS_ContextMenuOption("Stuff"), 7 | new FORMS_ContextMenuOption("Here") 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /scripts/TestUI/TestUI.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"TestUI", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"TestUI", 7 | "parent":{ 8 | "name":"Widgets", 9 | "path":"folders/Test/Widgets.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/__FA/__FA.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"__FA", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"__FA", 7 | "parent":{ 8 | "name":"FontAwesome6.5.1", 9 | "path":"folders/FontAwesome6.5.1.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/__forms/__forms.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"__forms", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"__forms", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_Box/FORMS_Box.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Box", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Box", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/forms_pen/forms_pen.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Pen", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Pen", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /shaders/FORMS_ShColorWheel/FORMS_ShColorWheel.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMShader":"", 3 | "%Name":"FORMS_ShColorWheel", 4 | "name":"FORMS_ShColorWheel", 5 | "parent":{ 6 | "name":"Shaders", 7 | "path":"folders/Forms/Shaders.yy", 8 | }, 9 | "resourceType":"GMShader", 10 | "resourceVersion":"2.0", 11 | "type":1, 12 | } -------------------------------------------------------------------------------- /scripts/FORMS_Dock/FORMS_Dock.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Dock", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Dock", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_Tree/FORMS_Tree.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Tree", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Tree", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_Color/FORMS_Color.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Color", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Color", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_Window/FORMS_Window.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Window", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Window", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/TestStatusBar/TestStatusBar.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"TestStatusBar", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"TestStatusBar", 7 | "parent":{ 8 | "name":"Widgets", 9 | "path":"folders/Test/Widgets.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/TestWorkspace/TestWorkspace.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"TestWorkspace", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"TestWorkspace", 7 | "parent":{ 8 | "name":"Widgets", 9 | "path":"folders/Test/Widgets.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/forms_widget/forms_widget.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Widget", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Widget", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_Dropdown/FORMS_Dropdown.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Dropdown", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Dropdown", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_MenuBar/FORMS_MenuBar.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_MenuBar", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_MenuBar", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_Question/FORMS_Question.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Question", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Question", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_Toolbar/FORMS_Toolbar.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Toolbar", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Toolbar", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_NodeGraph/FORMS_NodeGraph.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_NodeGraph", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_NodeGraph", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_Scrollbar/FORMS_Scrollbar.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Scrollbar", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Scrollbar", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_Workspace/FORMS_Workspace.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Workspace", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Workspace", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/forms_container/forms_container.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_Container", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_Container", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_RootWidget/FORMS_RootWidget.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_RootWidget", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_RootWidget", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_ScrollPane/FORMS_ScrollPane.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_ScrollPane", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_ScrollPane", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/EditContextMenu/EditContextMenu.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"EditContextMenu", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"EditContextMenu", 7 | "parent":{ 8 | "name":"ContextMenus", 9 | "path":"folders/Test/ContextMenus.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_ColorPicker/FORMS_ColorPicker.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_ColorPicker", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_ColorPicker", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_ContextMenu/FORMS_ContextMenu.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_ContextMenu", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_ContextMenu", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FileContextMenu/FileContextMenu.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FileContextMenu", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FileContextMenu", 7 | "parent":{ 8 | "name":"ContextMenus", 9 | "path":"folders/Test/ContextMenus.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_CompoundWidget/FORMS_CompoundWidget.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_CompoundWidget", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_CompoundWidget", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/TestWelcomeScrollPane/TestWelcomeScrollPane.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"TestWelcomeScrollPane", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"TestWelcomeScrollPane", 7 | "parent":{ 8 | "name":"Widgets", 9 | "path":"folders/Test/Widgets.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /gmdoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": 2, 3 | "project": "Forms", 4 | "project_name": "Forms", 5 | "version": "0.1.0", 6 | "title": "Forms Docs", 7 | "author": "BlueBurn and contributors", 8 | "prefix": ["FORMS_", "forms_", "__forms", "__FA"], 9 | "analytics": "", 10 | "api": { 11 | "rating": "" 12 | }, 13 | "toc": { 14 | "Forms Docs": "index.md" 15 | } 16 | } -------------------------------------------------------------------------------- /scripts/FORMS_KeyboardShortcut/FORMS_KeyboardShortcut.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_KeyboardShortcut", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_KeyboardShortcut", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/TestControlsScrollPane/TestControlsScrollPane.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"TestControlsScrollPane", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"TestControlsScrollPane", 7 | "parent":{ 8 | "name":"Widgets", 9 | "path":"folders/Test/Widgets.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /scripts/FORMS_ApplicationSurface/FORMS_ApplicationSurface.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMScript":"v1", 3 | "%Name":"FORMS_ApplicationSurface", 4 | "isCompatibility":false, 5 | "isDnD":false, 6 | "name":"FORMS_ApplicationSurface", 7 | "parent":{ 8 | "name":"Scripts", 9 | "path":"folders/Forms/Scripts.yy", 10 | }, 11 | "resourceType":"GMScript", 12 | "resourceVersion":"2.0", 13 | } -------------------------------------------------------------------------------- /objects/OTest/Draw_0.gml: -------------------------------------------------------------------------------- 1 | // In case application surface is resized, adapt the currently active camera to match to avoid squash and pull 2 | 3 | var _width = surface_get_width(application_surface); 4 | var _height = surface_get_height(application_surface); 5 | 6 | camera_set_view_size(camera_get_active(), _width, _height); 7 | 8 | // Apply the changes to the viewport 9 | camera_apply(camera_get_active()); 10 | 11 | // Draw anything here 12 | draw_sprite(SprSponzaBBMOD, 0, 0, 0); 13 | -------------------------------------------------------------------------------- /scripts/TestStatusBar/TestStatusBar.gml: -------------------------------------------------------------------------------- 1 | function TestStatusBar(): FORMS_Container() constructor 2 | { 3 | Width.from_string("100%"); 4 | Height.Value = 32; 5 | 6 | static draw_content = function () 7 | { 8 | Pen.start() 9 | Pen.text("Mouse X: ").input("input-mouse-x", window_mouse_get_x(), { Disabled: true, Width: 100 }); 10 | Pen.text(" Y: ").input("input-mouse-y", window_mouse_get_y(), { Disabled: true, Width: 100 }); 11 | Pen.finish(); 12 | FORMS_CONTENT_UPDATE_SIZE; 13 | return self; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /shaders/FORMS_ShColorWheel/FORMS_ShColorWheel.vsh: -------------------------------------------------------------------------------- 1 | attribute vec3 in_Position; // (x,y,z) 2 | attribute vec4 in_Colour; // (r,g,b,a) 3 | attribute vec2 in_TextureCoord; // (u,v) 4 | 5 | varying vec2 v_vTexcoord; 6 | varying vec4 v_vColour; 7 | 8 | void main() 9 | { 10 | vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); 11 | gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; 12 | v_vColour = in_Colour; 13 | v_vTexcoord = in_TextureCoord; 14 | } 15 | -------------------------------------------------------------------------------- /scripts/TestWelcomeScrollPane/TestWelcomeScrollPane.gml: -------------------------------------------------------------------------------- 1 | function TestWelcomeScrollPane(): FORMS_ScrollPane() constructor 2 | { 3 | Name = "Welcome"; 4 | Icon = FA_ESolid.CircleInfo; 5 | BackgroundColor = 0x272727; 6 | Width.from_string("100%"); 7 | Height.from_string("100%"); 8 | ContentFit = true; 9 | 10 | static draw_content = function () 11 | { 12 | Pen.start() 13 | .text($"Welcome to Forms {FORMS_VERSION_STRING}!").nl(2) 14 | .text("Forms is a UI library for creating desktop applications in GameMaker!").nl() 15 | .finish(); 16 | FORMS_CONTENT_UPDATE_SIZE; 17 | return self; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /shaders/FORMS_ShColorWheel/FORMS_ShColorWheel.fsh: -------------------------------------------------------------------------------- 1 | varying vec2 v_vTexcoord; 2 | varying vec4 v_vColour; 3 | 4 | #define PI 3.14159265359 5 | #define PI_2 6.2831 6 | 7 | vec3 colorPalatte(float angle, float value) 8 | { 9 | float theta = mod(3.0 + ((3.0 * angle) / PI) + 1.5, 6.0); 10 | vec3 result = vec3(0.0); 11 | result = clamp(abs(mod(theta + vec3(0.0, 4.0, 2.0), 6.0) - 3.0) - 1.0, 0.0, 1.0); 12 | result = mix(vec3(1.0), result, value); 13 | return result; 14 | } 15 | 16 | void main() 17 | { 18 | vec2 p = (v_vTexcoord - 0.5) * 2.0; 19 | float dis = length(p); 20 | float angle = atan(p.x, p.y); 21 | vec4 col = vec4(colorPalatte(angle, dis), 1.0); 22 | col.a = 1.0 - smoothstep(0.98, 1.0, abs(dis)); 23 | 24 | gl_FragColor = vec4(col); 25 | } 26 | -------------------------------------------------------------------------------- /options/switch/options_switch.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSwitchOptions":"", 3 | "%Name":"Switch", 4 | "name":"Switch", 5 | "option_switch_allow_debug_output":false, 6 | "option_switch_check_nsp_publish_errors":true, 7 | "option_switch_enable_fileaccess_checking":true, 8 | "option_switch_enable_nex_libraries":false, 9 | "option_switch_enable_npln_libraries":false, 10 | "option_switch_gfx_mem_mb":256, 11 | "option_switch_interpolate_pixels":true, 12 | "option_switch_project_nmeta":"${options_dir}/switch/application.nmeta", 13 | "option_switch_scale":0, 14 | "option_switch_splash_screen":"${base_options_dir}/switch/splash.png", 15 | "option_switch_texture_page":"2048x2048", 16 | "option_switch_use_splash":false, 17 | "resourceType":"GMSwitchOptions", 18 | "resourceVersion":"2.0", 19 | } -------------------------------------------------------------------------------- /scripts/TestUI/TestUI.gml: -------------------------------------------------------------------------------- 1 | function TestUI(): FORMS_RootWidget() constructor 2 | { 3 | var _vbox = new FORMS_FlexBox( 4 | { 5 | Width: "100%", 6 | Height: "100%", 7 | Spacing: 1, 8 | IsHorizontal: false, 9 | }); 10 | add_child(_vbox); 11 | 12 | var _workspace = new FORMS_Workspace( 13 | { 14 | Width: "100%", 15 | Flex: 1, 16 | }); 17 | _vbox.add_child(_workspace); 18 | 19 | var _testWorkspace1 = new TestWorkspace(); 20 | _workspace.add_tab(_testWorkspace1); 21 | 22 | var _testWorkspace2 = new TestWorkspace(); 23 | _workspace.add_tab(_testWorkspace2); 24 | 25 | var _statusBar = new TestStatusBar(); 26 | _vbox.add_child(_statusBar); 27 | 28 | var _welcomeWindow = new FORMS_Window(new TestWelcomeScrollPane(), { Center: true, AutoSize: true }); 29 | add_child(_welcomeWindow); 30 | } 31 | -------------------------------------------------------------------------------- /objects/OTest/Mouse_55.gml: -------------------------------------------------------------------------------- 1 | var _options = []; 2 | var _option; 3 | 4 | array_push(_options, new FORMS_ContextMenuOption("Menu Item 1")); 5 | array_push(_options, new FORMS_ContextMenuOption("Menu Item 2")); 6 | array_push(_options, new FORMS_ContextMenuOption("Menu Item 3")); 7 | var _submenu = new FORMS_ContextMenuOption("Menu Item 4"); 8 | array_push(_options, _submenu); 9 | 10 | for (var m = 0; m < 3; ++m) 11 | { 12 | var _op = -1; 13 | _submenu.Options = []; 14 | for (var o = 0; o < 4; ++o) 15 | { 16 | _op = new FORMS_ContextMenuOption(string(m) + ": Option " + string(o)); 17 | array_push(_submenu.Options, _op); 18 | } 19 | _submenu = _op; 20 | } 21 | 22 | var _contextMenu = new FORMS_ContextMenu(_options, 23 | { 24 | X: window_mouse_get_x(), 25 | Y: window_mouse_get_y(), 26 | }); 27 | gui.add_child(_contextMenu); 28 | -------------------------------------------------------------------------------- /scripts/FORMS_Toolbar/FORMS_Toolbar.gml: -------------------------------------------------------------------------------- 1 | /// @func FORMS_ToolbarProps() 2 | /// 3 | /// @extends FORMS_ContainerProps 4 | /// 5 | /// @desc TODO 6 | function FORMS_ToolbarProps(): FORMS_ContainerProps() constructor {} 7 | 8 | /// @func FORMS_Toolbar([_props]) 9 | /// 10 | /// @extends FORMS_Container 11 | /// 12 | /// @desc TODO 13 | /// 14 | /// @param {Struct.FORMS_ToolbarProps, Undefined} [_props] 15 | function FORMS_Toolbar(_props = undefined): FORMS_Container(_props) constructor 16 | { 17 | /// @var {Struct.FORMS_UnitValue} The width of the toolbar. Defaults to 100%. 18 | Width = Width.from_props(_props, "Width", 100, FORMS_EUnit.Percent); 19 | 20 | /// @var {Struct.FORMS_UnitValue} The height of the window. Defaults to 28px. 21 | Height = Height.from_props(_props, "Height", 28); 22 | 23 | Pen.PaddingY = 4; 24 | Pen.SpacingX = 2; 25 | } 26 | -------------------------------------------------------------------------------- /.jsbeautifyrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent_size": 4, 3 | "indent_char": " ", 4 | "indent_with_tabs": true, 5 | "editorconfig": false, 6 | "eol": "\n", 7 | "end_with_newline": true, 8 | "indent_level": 0, 9 | "preserve_newlines": true, 10 | "max_preserve_newlines": 2, 11 | "space_in_paren": false, 12 | "space_in_empty_paren": false, 13 | "jslint_happy": false, 14 | "space_after_anon_function": true, 15 | "space_after_named_function": false, 16 | "brace_style": "expand,preserve-inline", 17 | "unindent_chained_methods": false, 18 | "break_chained_methods": false, 19 | "keep_array_indentation": false, 20 | "unescape_strings": false, 21 | "wrap_line_length": 120, 22 | "e4x": true, 23 | "comma_first": false, 24 | "operator_position": "after-newline", 25 | "indent_empty_lines": false, 26 | "templating": [ 27 | "auto" 28 | ] 29 | } -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: blueburn 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /options/main/options_main.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMMainOptions":"v3", 3 | "%Name":"Main", 4 | "name":"Main", 5 | "option_audio_error_behaviour":true, 6 | "option_author":"", 7 | "option_collision_compatibility":false, 8 | "option_copy_on_write_enabled":false, 9 | "option_draw_colour":4294967295, 10 | "option_gameguid":"ddab67a0-7dea-4e1b-a2a7-3fd8ef35c953", 11 | "option_gameid":"0", 12 | "option_game_speed":60, 13 | "option_legacy_json_parsing":true, 14 | "option_legacy_number_conversion":true, 15 | "option_legacy_other_behaviour":true, 16 | "option_mips_for_3d_textures":false, 17 | "option_remove_unused_assets":false, 18 | "option_sci_usesci":false, 19 | "option_spine_licence":false, 20 | "option_steam_app_id":"0", 21 | "option_template_description":null, 22 | "option_template_icon":"${base_options_dir}/main/template_icon.png", 23 | "option_template_image":"${base_options_dir}/main/template_image.png", 24 | "option_window_colour":255, 25 | "resourceType":"GMMainOptions", 26 | "resourceVersion":"2.0", 27 | } -------------------------------------------------------------------------------- /options/linux/options_linux.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMLinuxOptions":"", 3 | "%Name":"Linux", 4 | "name":"Linux", 5 | "option_linux_allow_fullscreen":false, 6 | "option_linux_disable_sandbox":false, 7 | "option_linux_display_cursor":true, 8 | "option_linux_display_name":"Created with GameMaker", 9 | "option_linux_display_splash":false, 10 | "option_linux_enable_steam":false, 11 | "option_linux_homepage":"http://www.yoyogames.com", 12 | "option_linux_icon":"${base_options_dir}/linux/icons/64.png", 13 | "option_linux_interpolate_pixels":true, 14 | "option_linux_long_desc":"", 15 | "option_linux_maintainer_email":"", 16 | "option_linux_resize_window":false, 17 | "option_linux_scale":0, 18 | "option_linux_short_desc":"", 19 | "option_linux_splash_screen":"${base_options_dir}/linux/splash/splash.png", 20 | "option_linux_start_fullscreen":false, 21 | "option_linux_sync":false, 22 | "option_linux_texture_page":"2048x2048", 23 | "option_linux_version":"0.1.0.0", 24 | "resourceType":"GMLinuxOptions", 25 | "resourceVersion":"2.0", 26 | } -------------------------------------------------------------------------------- /options/operagx/options_operagx.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMOperaGXOptions":"", 3 | "%Name":"operagx", 4 | "name":"operagx", 5 | "option_operagx_display_cursor":true, 6 | "option_operagx_editUrl":"", 7 | "option_operagx_game_name":"${project_name}", 8 | "option_operagx_guid":"", 9 | "option_operagx_internalShareUrl":"", 10 | "option_operagx_interpolate_pixels":true, 11 | "option_operagx_mod_editUrl":"", 12 | "option_operagx_mod_game_name":"${project_name}", 13 | "option_operagx_mod_guid":"", 14 | "option_operagx_mod_internalShareUrl":"", 15 | "option_operagx_mod_next_version":"0.1.0.0", 16 | "option_operagx_mod_publicShareUrl":"", 17 | "option_operagx_mod_team_id":"", 18 | "option_operagx_mod_team_name":"", 19 | "option_operagx_mod_version":"0.1.0.0", 20 | "option_operagx_next_version":"0.1.0.0", 21 | "option_operagx_publicShareUrl":"", 22 | "option_operagx_scale":0, 23 | "option_operagx_team_id":"", 24 | "option_operagx_team_name":"", 25 | "option_operagx_texture_page":"2048x2048", 26 | "option_operagx_version":"0.1.0.0", 27 | "resourceType":"GMOperaGXOptions", 28 | "resourceVersion":"2.0", 29 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 BlueBurn and contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /options/ps5/options_ps5.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMPS5Options":"", 3 | "%Name":"PlayStation 5", 4 | "name":"PlayStation 5", 5 | "option_ps5_display_cursor":false, 6 | "option_ps5_foreground_screen":"${base_options_dir}/ps5/sce_sys/pic2.png", 7 | "option_ps5_icon":"${base_options_dir}/ps5/sce_sys/icon0.png", 8 | "option_ps5_interpolate_pixels":true, 9 | "option_ps5_max_display_height":-1, 10 | "option_ps5_max_display_width":-1, 11 | "option_ps5_nptitledat":"", 12 | "option_ps5_nptitledat_file":"${options_dir}\\ps5\\sce_sys\\nptitle.dat", 13 | "option_ps5_paramsfo":"", 14 | "option_ps5_paramsfo_file":"${options_dir}\\ps5\\sce_sys\\param.sfo", 15 | "option_ps5_passcode":"GvE6xCpZxd96scOUGuLPbuLp8O800B0s", 16 | "option_ps5_save_data_icon":"${base_options_dir}/ps5/sce_sys/save_data.png", 17 | "option_ps5_scale":0, 18 | "option_ps5_sharedbinarysubconfigs":"", 19 | "option_ps5_shareoverlay_image":"${base_options_dir}/ps5/sce_sys/shareoverlayimage.png", 20 | "option_ps5_splash_screen":"${base_options_dir}/ps5/sce_sys/pic1.png", 21 | "option_ps5_texture_page":"2048x2048", 22 | "option_ps5_trophy00trp_file":"${options_dir}\\ps5\\sce_sys\\trophy\\trophy00.trp", 23 | "option_ps5_trophyedit":"", 24 | "option_ps5_trophy_screen":"${base_options_dir}/ps5/sce_sys/pic0.png", 25 | "resourceType":"GMPS5Options", 26 | "resourceVersion":"2.0", 27 | } -------------------------------------------------------------------------------- /options/html5/options_html5.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMHtml5Options":"", 3 | "%Name":"HTML5", 4 | "name":"HTML5", 5 | "option_html5_allow_fullscreen":true, 6 | "option_html5_browser_title":"Created with GameMaker", 7 | "option_html5_centregame":false, 8 | "option_html5_display_cursor":true, 9 | "option_html5_facebook_app_display_name":"", 10 | "option_html5_facebook_id":"", 11 | "option_html5_flurry_enable":false, 12 | "option_html5_flurry_id":"", 13 | "option_html5_foldername":"html5game", 14 | "option_html5_google_analytics_enable":false, 15 | "option_html5_google_tracking_id":"", 16 | "option_html5_icon":"${base_options_dir}/html5/fav.ico", 17 | "option_html5_index":"", 18 | "option_html5_interpolate_pixels":true, 19 | "option_html5_jsprepend":"", 20 | "option_html5_loadingbar":"", 21 | "option_html5_localrunalert":true, 22 | "option_html5_outputdebugtoconsole":true, 23 | "option_html5_outputname":"index.html", 24 | "option_html5_scale":0, 25 | "option_html5_splash_png":"${base_options_dir}/html5/splash.png", 26 | "option_html5_texture_page":"2048x2048", 27 | "option_html5_usebuiltinfont":true, 28 | "option_html5_usebuiltinparticles":true, 29 | "option_html5_usesplash":false, 30 | "option_html5_use_facebook":false, 31 | "option_html5_version":"0.1.0.0", 32 | "option_html5_webgl":2, 33 | "resourceType":"GMHtml5Options", 34 | "resourceVersion":"2.0", 35 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Forms 2 | 3 | > UI library for creating desktop applications in GameMaker 4 | 5 | [![License](https://img.shields.io/github/license/blueburncz/Forms)](LICENSE) 6 | [![Discord](https://img.shields.io/discord/298884075585011713?label=Discord)](https://discord.gg/ep2BGPm) 7 | 8 | > **WARNING:** Forms is currently in development and usage in real-world apps is not advised before 1.0.0 is released! 9 | 10 | ## Table of Contents 11 | 12 | * [About](#about) 13 | * [Screenshots](#screenshots) 14 | * [Contributing](#contributing) 15 | 16 | ## About 17 | 18 | Forms is a UI library for creating applications in GameMaker. Its origins trace back to [PushEd for GameMaker: Studio 1.4](https://github.com/GameMakerDiscord/PushEd), and after several years, it evolved into the system used in [BBMOD GUI](https://blueburn.cz/index.php?menu=bbmod_gui), with significant modifications. The version of Forms you see here is a complete rewrite, built on the foundations of its predecessors, but now leveraging modern GML features. 19 | 20 | ## Screenshots 21 | 22 | ![Screenshot](screenshot.png) 23 | 24 | ## Contributing 25 | 26 | Forms is open for pull requests! You're welcome to choose any of the open issues or open a new one yourself and start a discussion. **It is mandatory that your coding style matches with the rest of the repo!** We're using [format-gml](https://github.com/blueburncz/format-gml) to ensure this. Please have a look here to learn how to use it: . 27 | -------------------------------------------------------------------------------- /options/mac/options_mac.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMMacOptions":"", 3 | "%Name":"macOS", 4 | "name":"macOS", 5 | "option_mac_allow_fullscreen":true, 6 | "option_mac_allow_incoming_network":false, 7 | "option_mac_allow_outgoing_network":false, 8 | "option_mac_apple_sign_in":false, 9 | "option_mac_app_category":"Games", 10 | "option_mac_app_id":"com.company.game", 11 | "option_mac_arm64":true, 12 | "option_mac_build_app_store":false, 13 | "option_mac_build_number":0, 14 | "option_mac_copyright":"", 15 | "option_mac_disable_sandbox":false, 16 | "option_mac_display_cursor":true, 17 | "option_mac_display_name":"Created with GameMaker", 18 | "option_mac_enable_retina":false, 19 | "option_mac_enable_steam":false, 20 | "option_mac_icon_png":"${base_options_dir}/mac/icons/1024.png", 21 | "option_mac_installer_background_png":"${base_options_dir}/mac/splash/installer_background.png", 22 | "option_mac_interpolate_pixels":false, 23 | "option_mac_menu_dock":false, 24 | "option_mac_min_version":"10.10", 25 | "option_mac_output_dir":"~/gamemakerstudio2", 26 | "option_mac_resize_window":true, 27 | "option_mac_scale":1, 28 | "option_mac_signing_identity":"Developer ID Application:", 29 | "option_mac_splash_png":"${base_options_dir}/mac/splash/splash.png", 30 | "option_mac_start_fullscreen":false, 31 | "option_mac_team_id":"", 32 | "option_mac_texture_page":"2048x2048", 33 | "option_mac_version":"0.1.0.0", 34 | "option_mac_vsync":false, 35 | "option_mac_x86_64":true, 36 | "resourceType":"GMMacOptions", 37 | "resourceVersion":"2.0", 38 | } -------------------------------------------------------------------------------- /options/tvos/options_tvos.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMtvOSOptions":"v1", 3 | "%Name":"tvOS", 4 | "name":"tvOS", 5 | "option_tvos_build_number":0, 6 | "option_tvos_bundle_name":"com.company.game", 7 | "option_tvos_display_cursor":false, 8 | "option_tvos_display_name":"Made in GameMaker", 9 | "option_tvos_enable_broadcast":false, 10 | "option_tvos_icon_1280":"${base_options_dir}/tvos/icons/1280.png", 11 | "option_tvos_icon_400":"${base_options_dir}/tvos/icons/400.png", 12 | "option_tvos_icon_400_2x":"${base_options_dir}/tvos/icons/400_2x.png", 13 | "option_tvos_interpolate_pixels":true, 14 | "option_tvos_min_version":"10.0", 15 | "option_tvos_output_dir":"~/GameMakerStudio2/tvOS", 16 | "option_tvos_podfile_lock_path":"${options_dir}\\tvos\\Podfile.lock", 17 | "option_tvos_podfile_path":"${options_dir}\\tvos\\Podfile", 18 | "option_tvos_scale":0, 19 | "option_tvos_splashscreen":"${base_options_dir}/tvos/splash/splash.png", 20 | "option_tvos_splashscreen_2x":"${base_options_dir}/tvos/splash/splash_2x.png", 21 | "option_tvos_splash_time":0, 22 | "option_tvos_team_id":"", 23 | "option_tvos_texture_page":"2048x2048", 24 | "option_tvos_topshelf":"${base_options_dir}/tvos/topshelf/topshelf.png", 25 | "option_tvos_topshelf_2x":"${base_options_dir}/tvos/topshelf/topshelf_2x.png", 26 | "option_tvos_topshelf_wide":"${base_options_dir}/tvos/topshelf/topshelf_wide.png", 27 | "option_tvos_topshelf_wide_2x":"${base_options_dir}/tvos/topshelf/topshelf_wide_2x.png", 28 | "option_tvos_version":"0.1.0.0", 29 | "resourceType":"GMtvOSOptions", 30 | "resourceVersion":"2.0", 31 | } -------------------------------------------------------------------------------- /options/windows/options_windows.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMWindowsOptions":"", 3 | "%Name":"Windows", 4 | "name":"Windows", 5 | "option_windows_allow_fullscreen_switching":true, 6 | "option_windows_borderless":false, 7 | "option_windows_company_info":"YoYo Games Ltd", 8 | "option_windows_copyright_info":"", 9 | "option_windows_copy_exe_to_dest":false, 10 | "option_windows_description_info":"A GameMaker Game", 11 | "option_windows_disable_sandbox":false, 12 | "option_windows_display_cursor":true, 13 | "option_windows_display_name":"Created with GameMaker", 14 | "option_windows_enable_steam":false, 15 | "option_windows_executable_name":"${project_name}.exe", 16 | "option_windows_icon":"${base_options_dir}/windows/icons/icon.ico", 17 | "option_windows_installer_finished":"${base_options_dir}/windows/installer/finished.bmp", 18 | "option_windows_installer_header":"${base_options_dir}/windows/installer/header.bmp", 19 | "option_windows_interpolate_pixels":false, 20 | "option_windows_license":"${base_options_dir}/windows/installer/license.txt", 21 | "option_windows_nsis_file":"${base_options_dir}/windows/installer/nsis_script.nsi", 22 | "option_windows_product_info":"Created with GameMaker", 23 | "option_windows_resize_window":true, 24 | "option_windows_save_location":0, 25 | "option_windows_scale":1, 26 | "option_windows_sleep_margin":10, 27 | "option_windows_splash_screen":"${base_options_dir}/windows/splash/splash.png", 28 | "option_windows_start_fullscreen":false, 29 | "option_windows_steam_use_alternative_launcher":false, 30 | "option_windows_texture_page":"2048x2048", 31 | "option_windows_use_splash":false, 32 | "option_windows_version":"0.1.0.0", 33 | "option_windows_vsync":false, 34 | "resourceType":"GMWindowsOptions", 35 | "resourceVersion":"2.0", 36 | } -------------------------------------------------------------------------------- /options/ps4/options_ps4.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMPS4Options":"", 3 | "%Name":"PlayStation 4", 4 | "name":"PlayStation 4", 5 | "option_ps4_display_cursor":false, 6 | "option_ps4_garlic":1024, 7 | "option_ps4_icon":"${base_options_dir}/ps4/sce_sys/icon0.png", 8 | "option_ps4_interpolate_pixels":true, 9 | "option_ps4_max_display_height":-1, 10 | "option_ps4_max_display_width":-1, 11 | "option_ps4_neo_garlic":1536, 12 | "option_ps4_neo_onion":2048, 13 | "option_ps4_nptitledat":"", 14 | "option_ps4_nptitledat_file":"${options_dir}\\ps4\\sce_sys\\nptitle.dat", 15 | "option_ps4_nptitleid":"", 16 | "option_ps4_nptitlesecret":"", 17 | "option_ps4_onion":2048, 18 | "option_ps4_package_id":"IV0002-NPXS29129_00-APP0990000000022", 19 | "option_ps4_paramsfo":"", 20 | "option_ps4_paramsfo_file":"${options_dir}\\ps4\\sce_sys\\param.sfo", 21 | "option_ps4_passcode":"GvE6xCpZxd96scOUGuLPbuLp8O800B0s", 22 | "option_ps4_pronunciation":"", 23 | "option_ps4_pronunciation_file":"${options_dir}\\ps4\\sce_sys\\pronunciation.xml", 24 | "option_ps4_pronunciation_sig":"${options_dir}\\ps4\\sce_sys\\pronunciation.sig", 25 | "option_ps4_save_data_icon":"${base_options_dir}/ps4/sce_sys/save_data.png", 26 | "option_ps4_scale":0, 27 | "option_ps4_shareoverlay_image":"${base_options_dir}/ps4/sce_sys/shareoverlayimage.png", 28 | "option_ps4_shareparam":"", 29 | "option_ps4_shareparam_file":"${options_dir}\\ps4\\sce_sys\\shareparam.json", 30 | "option_ps4_splash_screen":"${base_options_dir}/ps4/sce_sys/pic1.png", 31 | "option_ps4_texture_page":"2048x2048", 32 | "option_ps4_trophy00trp_file":"${options_dir}\\ps4\\sce_sys\\trophy\\trophy00.trp", 33 | "option_ps4_trophyedit":"", 34 | "option_ps4_trophy_screen":"${base_options_dir}/ps4/sce_sys/pic0.png", 35 | "resourceType":"GMPS4Options", 36 | "resourceVersion":"2.0", 37 | } -------------------------------------------------------------------------------- /objects/OTest/OTest.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMObject":"", 3 | "%Name":"OTest", 4 | "eventList":[ 5 | {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, 6 | {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":77,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, 7 | {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":12,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, 8 | {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, 9 | {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":55,"eventType":6,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, 10 | {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, 11 | ], 12 | "managed":true, 13 | "name":"OTest", 14 | "overriddenProperties":[], 15 | "parent":{ 16 | "name":"Test", 17 | "path":"folders/Test.yy", 18 | }, 19 | "parentObjectId":null, 20 | "persistent":false, 21 | "physicsAngularDamping":0.1, 22 | "physicsDensity":0.5, 23 | "physicsFriction":0.2, 24 | "physicsGroup":1, 25 | "physicsKinematic":false, 26 | "physicsLinearDamping":0.1, 27 | "physicsObject":false, 28 | "physicsRestitution":0.1, 29 | "physicsSensor":false, 30 | "physicsShape":1, 31 | "physicsShapePoints":[], 32 | "physicsStartAwake":true, 33 | "properties":[], 34 | "resourceType":"GMObject", 35 | "resourceVersion":"2.0", 36 | "solid":false, 37 | "spriteId":null, 38 | "spriteMaskId":null, 39 | "visible":true, 40 | } -------------------------------------------------------------------------------- /scripts/FORMS_Question/FORMS_Question.gml: -------------------------------------------------------------------------------- 1 | /// @func FORMS_QuestionProps() 2 | /// 3 | /// @extends FORMS_WindowProps 4 | /// 5 | /// @desc TODO 6 | function FORMS_QuestionProps(): FORMS_WindowProps() constructor 7 | { 8 | /// @var {String, Undefined} 9 | Title = undefined; 10 | 11 | /// @var {Array, Undefined} 12 | Buttons = undefined; 13 | } 14 | 15 | /// @func FORMS_Question(_text, _callback[, _props]) 16 | /// 17 | /// @extends FORMS_Window 18 | /// 19 | /// @desc TODO 20 | /// 21 | /// @param {String} _text TODO 22 | /// @param {Function} _callback TODO 23 | /// @param {Struct.FORMS_QuestionProps, Undefined} _props TODO 24 | function FORMS_Question(_text, _callback, _props = undefined): FORMS_Window(undefined, _props) constructor 25 | { 26 | static Window_layout = layout; 27 | static Window_draw = draw; 28 | 29 | /// @var {String} 30 | /// @readonly 31 | Title = forms_get_prop(_props, "Title") ?? "Confirm"; 32 | 33 | /// @var {String} 34 | /// @readonly 35 | Text = _text; 36 | 37 | /// @var {Array} TODO 38 | /// @readonly 39 | Buttons = forms_get_prop(_props, "Buttons") ?? ["OK", "Cancel"]; 40 | 41 | /// @var {Function} TODO 42 | /// @readonly 43 | Callback = _callback; 44 | 45 | Center = true; 46 | 47 | Closable = false; 48 | 49 | AutoSize = true; 50 | 51 | Resizable = false; 52 | 53 | set_widget(new(function (_title): FORMS_Container() constructor 54 | { 55 | Name = _title; 56 | Icon = FA_ESolid.CircleQuestion; 57 | ContentFit = true; 58 | 59 | static draw_content = function () 60 | { 61 | Pen.start(); 62 | Pen.text(Parent.Text).nl(); 63 | var _index = 0; 64 | repeat(array_length(Parent.Buttons)) 65 | { 66 | var _buttonText = Parent.Buttons[_index++]; 67 | if (Pen.button(_buttonText)) 68 | { 69 | Parent.Callback(_buttonText); 70 | Parent.destroy_later(); 71 | } 72 | Pen.move(4); 73 | } 74 | Pen.nl(); 75 | Pen.finish(); 76 | FORMS_CONTENT_UPDATE_SIZE; 77 | return self; 78 | } 79 | })(Title)); 80 | 81 | static layout = function () 82 | { 83 | forms_get_root().WidgetHovered = undefined; 84 | Window_layout(); 85 | return self; 86 | } 87 | 88 | static draw = function () 89 | { 90 | with(forms_get_root()) 91 | { 92 | forms_draw_rectangle(__realX, __realY, __realWidth, __realHeight, c_black, 0.25); 93 | } 94 | Window_draw(); 95 | return self; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /scripts/FileContextMenu/FileContextMenu.gml: -------------------------------------------------------------------------------- 1 | function FileContextMenu(): FORMS_ContextMenu() constructor 2 | { 3 | var _options = Options; 4 | 5 | var _option = new FORMS_ContextMenuOption("New Project"); 6 | _option.KeyboardShortcut = new FORMS_KeyboardShortcut([vk_control, ord("N")]); 7 | array_push(_options, _option); 8 | 9 | _option = new FORMS_ContextMenuOption("Open Project"); 10 | _option.KeyboardShortcut = new FORMS_KeyboardShortcut([vk_control, ord("O")]); 11 | array_push(_options, _option); 12 | 13 | _option = new FORMS_ContextMenuOption("Import Project"); 14 | array_push(_options, _option); 15 | 16 | _option = new FORMS_ContextMenuOption("Recent Projects"); 17 | _option.Options = [ 18 | new FORMS_ContextMenuOption("Project 1"), 19 | new FORMS_ContextMenuOption("Project 2"), 20 | new FORMS_ContextMenuOption("Project 3"), 21 | ]; 22 | array_push(_options, _option); 23 | 24 | array_push(_options, new FORMS_ContextMenuSeparator()); 25 | 26 | _option = new FORMS_ContextMenuOption("Save Project"); 27 | _option.KeyboardShortcut = new FORMS_KeyboardShortcut([vk_control, ord("S")]); 28 | array_push(_options, _option); 29 | 30 | _option = new FORMS_ContextMenuOption("Save Project As"); 31 | _option.KeyboardShortcut = new FORMS_KeyboardShortcut([vk_control, vk_shift, ord("S")]); 32 | array_push(_options, _option); 33 | 34 | _option = new FORMS_ContextMenuOption("Export Project"); 35 | array_push(_options, _option); 36 | 37 | array_push(_options, new FORMS_ContextMenuSeparator()); 38 | 39 | _option = new FORMS_ContextMenuOption("New IDE"); 40 | array_push(_options, _option); 41 | 42 | array_push(_options, new FORMS_ContextMenuSeparator()); 43 | 44 | _option = new FORMS_ContextMenuOption("Preferences"); 45 | _option.KeyboardShortcut = new FORMS_KeyboardShortcut([vk_control, vk_shift, ord("P")]); 46 | array_push(_options, _option); 47 | 48 | array_push(_options, new FORMS_ContextMenuSeparator()); 49 | 50 | _option = new FORMS_ContextMenuOption("Exit"); 51 | _option.Action = function () 52 | { 53 | var _question = new FORMS_Question("Are you sure you want to exit?", function (_answer) 54 | { 55 | if (_answer == "OK") 56 | { 57 | game_end(); 58 | } 59 | }); 60 | forms_get_root().add_child(_question); 61 | }; 62 | _option.KeyboardShortcut = new FORMS_KeyboardShortcut([vk_alt, vk_f4]); 63 | array_push(_options, _option); 64 | } 65 | -------------------------------------------------------------------------------- /scripts/TestWorkspace/TestWorkspace.gml: -------------------------------------------------------------------------------- 1 | function TestWorkspace(): FORMS_FlexBox() constructor 2 | { 3 | Name = "Test Workspace"; 4 | Icon = FA_ESolid.WindowMaximize; 5 | Width.from_string("100%"); 6 | Height.from_string("100%"); 7 | Flex = 1; 8 | Spacing.Value = 1; 9 | IsHorizontal = false; 10 | 11 | var _menu = new FORMS_MenuBar([ 12 | new FORMS_MenuBarItem("File", FileContextMenu), 13 | new FORMS_MenuBarItem("Edit", EditContextMenu), 14 | new FORMS_MenuBarItem("Window"), 15 | new FORMS_MenuBarItem("Help"), 16 | ]); 17 | add_child(_menu); 18 | 19 | var _toolbar = new(function (): FORMS_Toolbar() constructor 20 | { 21 | static draw_content = function () 22 | { 23 | Pen.start(); 24 | Pen.icon_solid(FA_ESolid.House, { Tooltip: "Close Project" }); 25 | Pen.vsep(); 26 | Pen.icon_solid(FA_ESolid.File, { Tooltip: "New Project" }); 27 | Pen.icon_solid(FA_ESolid.FolderOpen, { Tooltip: "Open Project" }); 28 | Pen.icon_solid(FA_ESolid.FloppyDisk, { Tooltip: "Save Project" }); 29 | Pen.vsep(); 30 | Pen.icon_solid(FA_ESolid.Download, { Tooltip: "Create Executable" }); 31 | Pen.vsep(); 32 | Pen.icon_solid(FA_ESolid.Bug, { Tooltip: "Debug" }); 33 | Pen.icon_solid(FA_ESolid.Play, { Tooltip: "Run" }); 34 | Pen.icon_solid(FA_ESolid.Stop, { Tooltip: "Stop" }); 35 | Pen.icon_solid(FA_ESolid.Brush, { Tooltip: "Clean" }); 36 | Pen.vsep(); 37 | Pen.icon_solid(FA_ESolid.Gear, { Tooltip: "Game Options" }); 38 | Pen.icon_solid(FA_ESolid.CircleQuestion, { Tooltip: "Help" }); 39 | Pen.vsep(); 40 | Pen.icon_solid(FA_ESolid.MagnifyingGlassMinus, { Tooltip: "Zoom Out" }); 41 | Pen.icon_solid(FA_ESolid.MagnifyingGlass, { Tooltip: "Zoom Reset" }); 42 | Pen.icon_solid(FA_ESolid.MagnifyingGlassPlus, { Tooltip: "Zoom In" }); 43 | Pen.icon_solid(FA_ESolid.Expand, { Tooltip: "Collapse/Expand" }); 44 | Pen.vsep(); 45 | Pen.icon_solid(FA_ESolid.Computer, { Tooltip: "Laptop Mode" }); 46 | Pen.icon_solid(FA_ESolid.Robot, { Tooltip: "AI Assistant" }); 47 | Pen.finish(); 48 | FORMS_CONTENT_UPDATE_SIZE; 49 | return self; 50 | } 51 | })(); 52 | add_child(_toolbar); 53 | 54 | var _dock = new FORMS_Dock( 55 | { 56 | Width: "100%", 57 | Height: "100%", 58 | Flex: 1, 59 | }); 60 | add_child(_dock); 61 | 62 | _dock.set_tabs([ 63 | new TestControlsScrollPane(), 64 | new TestControlsScrollPane(), 65 | ]); 66 | 67 | _dock.split_left(); 68 | _dock.SplitSize = 0.25; 69 | 70 | _dock.get_second().set_tabs([ 71 | new FORMS_ApplicationSurface( 72 | { 73 | Name: "Viewport", 74 | Icon: FA_ESolid.Camera, 75 | Width: "100%", 76 | Height: "100%", 77 | Resize: true 78 | }) 79 | ]); 80 | //_dock.get_second().ShowTabs = false; 81 | } 82 | -------------------------------------------------------------------------------- /options/xboxseriesxs/options_xboxseriesxs.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMXboxSeriesXSOptions":"v1", 3 | "%Name":"Xbox Series XS", 4 | "name":"Xbox Series XS", 5 | "option_xboxseriesxs_advancedmemorymodel_one_x":false, 6 | "option_xboxseriesxs_advancedmemorymodel_ss":false, 7 | "option_xboxseriesxs_advancedmemorymodel_sx":false, 8 | "option_xboxseriesxs_content_id":"", 9 | "option_xboxseriesxs_description":"Your Description", 10 | "option_xboxseriesxs_display_name":"Created with GameMaker", 11 | "option_xboxseriesxs_ekbid":"", 12 | "option_xboxseriesxs_foreground_text":0, 13 | "option_xboxseriesxs_game_chat_slots":4, 14 | "option_xboxseriesxs_interpolate_pixels":false, 15 | "option_xboxseriesxs_languages":"\n \n \n \n ", 16 | "option_xboxseriesxs_logo_background_colour":4282795590, 17 | "option_xboxseriesxs_logo_large":"${base_options_dir}/xboxseriesxs/logos/LargeLogo.png", 18 | "option_xboxseriesxs_logo_medium":"${base_options_dir}/xboxseriesxs/logos/Logo.png", 19 | "option_xboxseriesxs_logo_small":"${base_options_dir}/xboxseriesxs/logos/SmallLogo.png", 20 | "option_xboxseriesxs_logo_store":"${base_options_dir}/xboxseriesxs/logos/StoreLogo.png", 21 | "option_xboxseriesxs_msaappid":"", 22 | "option_xboxseriesxs_network_config_manifest":"", 23 | "option_xboxseriesxs_playfab_party_id":"00000", 24 | "option_xboxseriesxs_pls_mode":0, 25 | "option_xboxseriesxs_pls_size":0, 26 | "option_xboxseriesxs_product_id":"", 27 | "option_xboxseriesxs_program_id":"ExactName.InPartnerCenter", 28 | "option_xboxseriesxs_publisher":"Company Name", 29 | "option_xboxseriesxs_publisher_display_name":"Company Display Name", 30 | "option_xboxseriesxs_require_audio_recording":false, 31 | "option_xboxseriesxs_require_game_chat":false, 32 | "option_xboxseriesxs_require_xbox_live":false, 33 | "option_xboxseriesxs_scale":0, 34 | "option_xboxseriesxs_service_config_id":"00000000-0000-0000-0000-000000000000", 35 | "option_xboxseriesxs_service_config_manifest":"", 36 | "option_xboxseriesxs_simplified_user_model":false, 37 | "option_xboxseriesxs_splash_screen":"${base_options_dir}/xboxseriesxs/SplashScreen.png", 38 | "option_xboxseriesxs_stats_system":0, 39 | "option_xboxseriesxs_store_id":"", 40 | "option_xboxseriesxs_support_4k_one_s":false, 41 | "option_xboxseriesxs_support_4k_one_x":false, 42 | "option_xboxseriesxs_support_4k_ss":false, 43 | "option_xboxseriesxs_support_4k_sx":false, 44 | "option_xboxseriesxs_texture_page":"2048x2048", 45 | "option_xboxseriesxs_title_id":"01234567", 46 | "option_xboxseriesxs_version":"0.1.0.0", 47 | "resourceType":"GMXboxSeriesXSOptions", 48 | "resourceVersion":"2.0", 49 | } -------------------------------------------------------------------------------- /options/ios/options_ios.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMiOSOptions":"v1", 3 | "%Name":"iOS", 4 | "name":"iOS", 5 | "option_ios_build_number":0, 6 | "option_ios_bundle_name":"com.company.game", 7 | "option_ios_defer_home_indicator":false, 8 | "option_ios_devices":2, 9 | "option_ios_display_name":"Created with GameMaker", 10 | "option_ios_enable_broadcast":false, 11 | "option_ios_half_ipad1_textures":false, 12 | "option_ios_icon_ipad_app_152":"${base_options_dir}/ios/icons/app/ipad_152.png", 13 | "option_ios_icon_ipad_app_76":"${base_options_dir}/ios/icons/app/ipad_76.png", 14 | "option_ios_icon_ipad_notification_20":"${base_options_dir}/ios/icons/notification/ipad_20.png", 15 | "option_ios_icon_ipad_notification_40":"${base_options_dir}/ios/icons/notification/ipad_40.png", 16 | "option_ios_icon_ipad_pro_app_167":"${base_options_dir}/ios/icons/app/ipad_pro_167.png", 17 | "option_ios_icon_ipad_settings_29":"${base_options_dir}/ios/icons/settings/ipad_29.png", 18 | "option_ios_icon_ipad_settings_58":"${base_options_dir}/ios/icons/settings/ipad_58.png", 19 | "option_ios_icon_ipad_spotlight_40":"${base_options_dir}/ios/icons/spotlight/ipad_40.png", 20 | "option_ios_icon_ipad_spotlight_80":"${base_options_dir}/ios/icons/spotlight/ipad_80.png", 21 | "option_ios_icon_iphone_app_120":"${base_options_dir}/ios/icons/app/iphone_120.png", 22 | "option_ios_icon_iphone_app_180":"${base_options_dir}/ios/icons/app/iphone_180.png", 23 | "option_ios_icon_iphone_notification_40":"${base_options_dir}/ios/icons/notification/iphone_40.png", 24 | "option_ios_icon_iphone_notification_60":"${base_options_dir}/ios/icons/notification/iphone_60.png", 25 | "option_ios_icon_iphone_settings_58":"${base_options_dir}/ios/icons/settings/iphone_58.png", 26 | "option_ios_icon_iphone_settings_87":"${base_options_dir}/ios/icons/settings/iphone_87.png", 27 | "option_ios_icon_iphone_spotlight_120":"${base_options_dir}/ios/icons/spotlight/iphone_120.png", 28 | "option_ios_icon_iphone_spotlight_80":"${base_options_dir}/ios/icons/spotlight/iphone_80.png", 29 | "option_ios_icon_itunes_artwork_1024":"${base_options_dir}/ios/icons/itunes/itunes_1024.png", 30 | "option_ios_interpolate_pixels":false, 31 | "option_ios_launchscreen_fill":0, 32 | "option_ios_launchscreen_image":"${base_options_dir}/ios/splash/launchscreen.png", 33 | "option_ios_launchscreen_image_landscape":"${base_options_dir}/ios/splash/launchscreen-landscape.png", 34 | "option_ios_min_version":"10.0", 35 | "option_ios_orientation_landscape":true, 36 | "option_ios_orientation_landscape_flipped":true, 37 | "option_ios_orientation_portrait":true, 38 | "option_ios_orientation_portrait_flipped":true, 39 | "option_ios_output_dir":"~/gamemakerstudio2", 40 | "option_ios_podfile_lock_path":"${options_dir}/ios/Podfile.lock", 41 | "option_ios_podfile_path":"${options_dir}/ios/Podfile", 42 | "option_ios_scale":0, 43 | "option_ios_splashscreen_background_colour":255, 44 | "option_ios_team_id":"", 45 | "option_ios_texture_page":"2048x2048", 46 | "option_ios_version":"0.1.0.0", 47 | "resourceType":"GMiOSOptions", 48 | "resourceVersion":"2.0", 49 | } -------------------------------------------------------------------------------- /sprites/SprSponzaBBMOD/SprSponzaBBMOD.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"SprSponzaBBMOD", 4 | "bboxMode":0, 5 | "bbox_bottom":767, 6 | "bbox_left":0, 7 | "bbox_right":1365, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"db256382-7c9b-4f46-917b-39a7eb2554b2","name":"db256382-7c9b-4f46-917b-39a7eb2554b2","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | ], 17 | "gridX":0, 18 | "gridY":0, 19 | "height":768, 20 | "HTile":false, 21 | "layers":[ 22 | {"$GMImageLayer":"","%Name":"7291bf3c-f87e-4166-afa4-c25addb50eed","blendMode":0,"displayName":"default","isLocked":false,"name":"7291bf3c-f87e-4166-afa4-c25addb50eed","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 23 | ], 24 | "name":"SprSponzaBBMOD", 25 | "nineSlice":null, 26 | "origin":0, 27 | "parent":{ 28 | "name":"Test", 29 | "path":"folders/Test.yy", 30 | }, 31 | "preMultiplyAlpha":false, 32 | "resourceType":"GMSprite", 33 | "resourceVersion":"2.0", 34 | "sequence":{ 35 | "$GMSequence":"", 36 | "%Name":"SprSponzaBBMOD", 37 | "autoRecord":true, 38 | "backdropHeight":768, 39 | "backdropImageOpacity":0.5, 40 | "backdropImagePath":"", 41 | "backdropWidth":1366, 42 | "backdropXOffset":0.0, 43 | "backdropYOffset":0.0, 44 | "events":{ 45 | "$KeyframeStore":"", 46 | "Keyframes":[], 47 | "resourceType":"KeyframeStore", 48 | "resourceVersion":"2.0", 49 | }, 50 | "eventStubScript":null, 51 | "eventToFunction":{}, 52 | "length":1.0, 53 | "lockOrigin":false, 54 | "moments":{ 55 | "$KeyframeStore":"", 56 | "Keyframes":[], 57 | "resourceType":"KeyframeStore", 58 | "resourceVersion":"2.0", 59 | }, 60 | "name":"SprSponzaBBMOD", 61 | "playback":1, 62 | "playbackSpeed":30.0, 63 | "playbackSpeedType":0, 64 | "resourceType":"GMSequence", 65 | "resourceVersion":"2.0", 66 | "showBackdrop":true, 67 | "showBackdropImage":false, 68 | "timeUnits":1, 69 | "tracks":[ 70 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 71 | {"$Keyframe":"","Channels":{ 72 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"db256382-7c9b-4f46-917b-39a7eb2554b2","path":"sprites/SprSponzaBBMOD/SprSponzaBBMOD.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 73 | },"Disabled":false,"id":"c4cf6b0a-ff05-4b21-bf7e-818cc2a4e902","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 74 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 75 | ], 76 | "visibleRange":null, 77 | "volume":1.0, 78 | "xorigin":0, 79 | "yorigin":0, 80 | }, 81 | "swatchColours":null, 82 | "swfPrecision":0.5, 83 | "textureGroupId":{ 84 | "name":"Default", 85 | "path":"texturegroups/Default", 86 | }, 87 | "type":0, 88 | "VTile":false, 89 | "width":1366, 90 | } -------------------------------------------------------------------------------- /sprites/FORMS_SprEyeDropper/FORMS_SprEyeDropper.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprEyeDropper", 4 | "bboxMode":0, 5 | "bbox_bottom":8, 6 | "bbox_left":0, 7 | "bbox_right":8, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"3a01c315-aedf-44ea-8075-d0630bbd3db8","name":"3a01c315-aedf-44ea-8075-d0630bbd3db8","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | ], 17 | "gridX":0, 18 | "gridY":0, 19 | "height":10, 20 | "HTile":false, 21 | "layers":[ 22 | {"$GMImageLayer":"","%Name":"4591ed55-1ca8-4b0e-814a-878e5bd78585","blendMode":0,"displayName":"default","isLocked":false,"name":"4591ed55-1ca8-4b0e-814a-878e5bd78585","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 23 | ], 24 | "name":"FORMS_SprEyeDropper", 25 | "nineSlice":null, 26 | "origin":9, 27 | "parent":{ 28 | "name":"Sprites", 29 | "path":"folders/Forms/Sprites.yy", 30 | }, 31 | "preMultiplyAlpha":false, 32 | "resourceType":"GMSprite", 33 | "resourceVersion":"2.0", 34 | "sequence":{ 35 | "$GMSequence":"", 36 | "%Name":"FORMS_SprEyeDropper", 37 | "autoRecord":true, 38 | "backdropHeight":768, 39 | "backdropImageOpacity":0.5, 40 | "backdropImagePath":"", 41 | "backdropWidth":1366, 42 | "backdropXOffset":0.0, 43 | "backdropYOffset":0.0, 44 | "events":{ 45 | "$KeyframeStore":"", 46 | "Keyframes":[], 47 | "resourceType":"KeyframeStore", 48 | "resourceVersion":"2.0", 49 | }, 50 | "eventStubScript":null, 51 | "eventToFunction":{}, 52 | "length":1.0, 53 | "lockOrigin":false, 54 | "moments":{ 55 | "$KeyframeStore":"", 56 | "Keyframes":[], 57 | "resourceType":"KeyframeStore", 58 | "resourceVersion":"2.0", 59 | }, 60 | "name":"FORMS_SprEyeDropper", 61 | "playback":1, 62 | "playbackSpeed":30.0, 63 | "playbackSpeedType":0, 64 | "resourceType":"GMSequence", 65 | "resourceVersion":"2.0", 66 | "showBackdrop":true, 67 | "showBackdropImage":false, 68 | "timeUnits":1, 69 | "tracks":[ 70 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 71 | {"$Keyframe":"","Channels":{ 72 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"3a01c315-aedf-44ea-8075-d0630bbd3db8","path":"sprites/FORMS_SprEyeDropper/FORMS_SprEyeDropper.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 73 | },"Disabled":false,"id":"ed6236b0-eaa4-43e2-8a7d-c2535637ca98","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 74 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 75 | ], 76 | "visibleRange":null, 77 | "volume":1.0, 78 | "xorigin":4, 79 | "yorigin":4, 80 | }, 81 | "swatchColours":null, 82 | "swfPrecision":0.5, 83 | "textureGroupId":{ 84 | "name":"Default", 85 | "path":"texturegroups/Default", 86 | }, 87 | "type":0, 88 | "VTile":false, 89 | "width":10, 90 | } -------------------------------------------------------------------------------- /scripts/FORMS_ScrollPane/FORMS_ScrollPane.gml: -------------------------------------------------------------------------------- 1 | /// @func FORMS_ScrollPaneProps() 2 | /// 3 | /// @extends FORMS_ContainerProps 4 | /// 5 | /// @desc Properties accepted by the constructor of {@link FORMS_ScrollPane}. 6 | function FORMS_ScrollPaneProps(): FORMS_ContainerProps() constructor 7 | { 8 | /// @var {Struct.FORMS_HScrollbarProps, Undefined} Properties to create the scroll pane's horizontal scrollbar with. 9 | HScrollbarProps = undefined; 10 | 11 | /// @var {Struct.FORMS_VScrollbarProps, Undefined} Properties to create the scroll pane's vertical scrollbar with. 12 | VScrollbarProps = undefined; 13 | } 14 | 15 | /// @func FORMS_ScrollPane([_props]) 16 | /// 17 | /// @extends FORMS_Container 18 | /// 19 | /// @desc A widget that consists of a container and two scrollbars. 20 | /// 21 | /// @param {Struct.FORMS_ScrollPaneProps, Undefined} [_props] Properties to create the scroll pane with or `undefined` 22 | /// (default). 23 | function FORMS_ScrollPane(_props = undefined): FORMS_Container(_props) constructor 24 | { 25 | static Container_layout = layout; 26 | static Container_update = update; 27 | static Container_draw = draw; 28 | static Container_destroy = destroy; 29 | 30 | /// @var {Struct.FORMS_HScrollbar} The scroll pane's horizontal scrollbar. 31 | /// @readonly 32 | HScrollbar = new FORMS_HScrollbar(self, forms_get_prop(_props, "HScrollbarProps")); 33 | HScrollbar.Parent = self; 34 | 35 | /// @var {Struct.FORMS_VScrollbar} The scroll pane's vertical scrollbar. 36 | /// @readonly 37 | VScrollbar = new FORMS_VScrollbar(self, forms_get_prop(_props, "VScrollbarProps")); 38 | VScrollbar.Parent = self; 39 | 40 | static find_widget = function (_id) 41 | { 42 | if (Id == _id) 43 | { 44 | return self; 45 | } 46 | if (HScrollbar.Id = _id) 47 | { 48 | return HScrollbar; 49 | } 50 | if (VScrollbar.Id = _id) 51 | { 52 | return VScrollbar; 53 | } 54 | return undefined; 55 | } 56 | 57 | static layout = function () 58 | { 59 | Container_layout(); 60 | 61 | var _parentX = __realX; 62 | var _parentY = __realY; 63 | var _parentWidth = __realWidth; 64 | var _parentHeight = __realHeight; 65 | var _container = self; 66 | var _scrollbarH = HScrollbar; 67 | var _scrollbarV = VScrollbar; 68 | 69 | _scrollbarV.__realWidth = (_container.ContentHeight > __realHeight) 70 | ? _scrollbarV.Width.get_absolute(_parentWidth, _scrollbarV.get_auto_width()) : 0; 71 | _scrollbarV.__realX = __realX + __realWidth - _scrollbarV.__realWidth; 72 | _scrollbarV.__realY = __realY; 73 | 74 | _scrollbarH.__realHeight = (_container.ContentWidth > __realWidth) 75 | ? _scrollbarH.Height.get_absolute(_parentHeight, _scrollbarH.get_auto_height()) : 0; 76 | _scrollbarH.__realX = __realX; 77 | _scrollbarH.__realY = __realY + __realHeight - _scrollbarH.__realHeight; 78 | 79 | _container.__realX = __realX; 80 | _container.__realY = __realY; 81 | _container.__realWidth = __realWidth - _scrollbarV.__realWidth; 82 | _container.__realHeight = __realHeight - _scrollbarH.__realHeight; 83 | 84 | _scrollbarV.__realHeight = _container.__realHeight; 85 | _scrollbarH.__realWidth = _container.__realWidth; 86 | 87 | _scrollbarH.layout(); 88 | _scrollbarV.layout(); 89 | 90 | return self; 91 | } 92 | 93 | static update = function (_deltaTime) 94 | { 95 | Container_update(_deltaTime); 96 | HScrollbar.update(_deltaTime); 97 | VScrollbar.update(_deltaTime); 98 | } 99 | 100 | static draw = function () 101 | { 102 | Container_draw(); 103 | HScrollbar.draw(); 104 | VScrollbar.draw(); 105 | } 106 | 107 | static destroy = function () 108 | { 109 | Container_destroy(); 110 | HScrollbar = HScrollbar.destroy(); 111 | VScrollbar = VScrollbar.destroy(); 112 | return undefined; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /sprites/FORMS_SprTab/FORMS_SprTab.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprTab", 4 | "bboxMode":0, 5 | "bbox_bottom":23, 6 | "bbox_left":0, 7 | "bbox_right":23, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"85adeb82-1cd1-4552-a563-e4b3e3539be6","name":"85adeb82-1cd1-4552-a563-e4b3e3539be6","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | ], 17 | "gridX":0, 18 | "gridY":0, 19 | "height":24, 20 | "HTile":false, 21 | "layers":[ 22 | {"$GMImageLayer":"","%Name":"df440b5d-497d-435e-81d8-75a1ac9f8392","blendMode":0,"displayName":"default","isLocked":false,"name":"df440b5d-497d-435e-81d8-75a1ac9f8392","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 23 | ], 24 | "name":"FORMS_SprTab", 25 | "nineSlice":{ 26 | "$GMNineSliceData":"", 27 | "bottom":0, 28 | "enabled":true, 29 | "guideColour":[4294902015,4294902015,4294902015,4294902015,], 30 | "highlightColour":1728023040, 31 | "highlightStyle":0, 32 | "left":4, 33 | "resourceType":"GMNineSliceData", 34 | "resourceVersion":"2.0", 35 | "right":4, 36 | "tileMode":[ 37 | 0, 38 | 0, 39 | 0, 40 | 0, 41 | 0, 42 | ], 43 | "top":0, 44 | }, 45 | "origin":0, 46 | "parent":{ 47 | "name":"Sprites", 48 | "path":"folders/Forms/Sprites.yy", 49 | }, 50 | "preMultiplyAlpha":false, 51 | "resourceType":"GMSprite", 52 | "resourceVersion":"2.0", 53 | "sequence":{ 54 | "$GMSequence":"", 55 | "%Name":"FORMS_SprTab", 56 | "autoRecord":true, 57 | "backdropHeight":768, 58 | "backdropImageOpacity":0.5, 59 | "backdropImagePath":"", 60 | "backdropWidth":1366, 61 | "backdropXOffset":0.0, 62 | "backdropYOffset":0.0, 63 | "events":{ 64 | "$KeyframeStore":"", 65 | "Keyframes":[], 66 | "resourceType":"KeyframeStore", 67 | "resourceVersion":"2.0", 68 | }, 69 | "eventStubScript":null, 70 | "eventToFunction":{}, 71 | "length":1.0, 72 | "lockOrigin":false, 73 | "moments":{ 74 | "$KeyframeStore":"", 75 | "Keyframes":[], 76 | "resourceType":"KeyframeStore", 77 | "resourceVersion":"2.0", 78 | }, 79 | "name":"FORMS_SprTab", 80 | "playback":1, 81 | "playbackSpeed":30.0, 82 | "playbackSpeedType":0, 83 | "resourceType":"GMSequence", 84 | "resourceVersion":"2.0", 85 | "showBackdrop":true, 86 | "showBackdropImage":false, 87 | "timeUnits":1, 88 | "tracks":[ 89 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 90 | {"$Keyframe":"","Channels":{ 91 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"85adeb82-1cd1-4552-a563-e4b3e3539be6","path":"sprites/FORMS_SprTab/FORMS_SprTab.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 92 | },"Disabled":false,"id":"b9b64883-2f62-4e8c-8c02-6ac05751d2ba","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 93 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 94 | ], 95 | "visibleRange":null, 96 | "volume":1.0, 97 | "xorigin":0, 98 | "yorigin":0, 99 | }, 100 | "swatchColours":null, 101 | "swfPrecision":0.5, 102 | "textureGroupId":{ 103 | "name":"Default", 104 | "path":"texturegroups/Default", 105 | }, 106 | "type":0, 107 | "VTile":false, 108 | "width":24, 109 | } -------------------------------------------------------------------------------- /sprites/FORMS_SprColor/FORMS_SprColor.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprColor", 4 | "bboxMode":0, 5 | "bbox_bottom":23, 6 | "bbox_left":0, 7 | "bbox_right":23, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"ff3904e7-5695-481b-b813-db7fabbac43b","name":"ff3904e7-5695-481b-b813-db7fabbac43b","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | ], 17 | "gridX":0, 18 | "gridY":0, 19 | "height":24, 20 | "HTile":false, 21 | "layers":[ 22 | {"$GMImageLayer":"","%Name":"c674cb94-0122-4f9c-a9a1-a716e5915b77","blendMode":0,"displayName":"default","isLocked":false,"name":"c674cb94-0122-4f9c-a9a1-a716e5915b77","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 23 | ], 24 | "name":"FORMS_SprColor", 25 | "nineSlice":{ 26 | "$GMNineSliceData":"", 27 | "bottom":4, 28 | "enabled":true, 29 | "guideColour":[4294902015,4294902015,4294902015,4294902015,], 30 | "highlightColour":1728023040, 31 | "highlightStyle":0, 32 | "left":4, 33 | "resourceType":"GMNineSliceData", 34 | "resourceVersion":"2.0", 35 | "right":4, 36 | "tileMode":[ 37 | 1, 38 | 1, 39 | 1, 40 | 1, 41 | 1, 42 | ], 43 | "top":4, 44 | }, 45 | "origin":0, 46 | "parent":{ 47 | "name":"Sprites", 48 | "path":"folders/Forms/Sprites.yy", 49 | }, 50 | "preMultiplyAlpha":false, 51 | "resourceType":"GMSprite", 52 | "resourceVersion":"2.0", 53 | "sequence":{ 54 | "$GMSequence":"", 55 | "%Name":"FORMS_SprColor", 56 | "autoRecord":true, 57 | "backdropHeight":768, 58 | "backdropImageOpacity":0.5, 59 | "backdropImagePath":"", 60 | "backdropWidth":1366, 61 | "backdropXOffset":0.0, 62 | "backdropYOffset":0.0, 63 | "events":{ 64 | "$KeyframeStore":"", 65 | "Keyframes":[], 66 | "resourceType":"KeyframeStore", 67 | "resourceVersion":"2.0", 68 | }, 69 | "eventStubScript":null, 70 | "eventToFunction":{}, 71 | "length":1.0, 72 | "lockOrigin":false, 73 | "moments":{ 74 | "$KeyframeStore":"", 75 | "Keyframes":[], 76 | "resourceType":"KeyframeStore", 77 | "resourceVersion":"2.0", 78 | }, 79 | "name":"FORMS_SprColor", 80 | "playback":1, 81 | "playbackSpeed":30.0, 82 | "playbackSpeedType":0, 83 | "resourceType":"GMSequence", 84 | "resourceVersion":"2.0", 85 | "showBackdrop":true, 86 | "showBackdropImage":false, 87 | "timeUnits":1, 88 | "tracks":[ 89 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 90 | {"$Keyframe":"","Channels":{ 91 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"ff3904e7-5695-481b-b813-db7fabbac43b","path":"sprites/FORMS_SprColor/FORMS_SprColor.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 92 | },"Disabled":false,"id":"95827931-857c-46ec-999c-16f2cb01a9aa","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 93 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 94 | ], 95 | "visibleRange":null, 96 | "volume":1.0, 97 | "xorigin":0, 98 | "yorigin":0, 99 | }, 100 | "swatchColours":null, 101 | "swfPrecision":0.5, 102 | "textureGroupId":{ 103 | "name":"Default", 104 | "path":"texturegroups/Default", 105 | }, 106 | "type":0, 107 | "VTile":false, 108 | "width":24, 109 | } -------------------------------------------------------------------------------- /sprites/FORMS_SprRound8/FORMS_SprRound8.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprRound8", 4 | "bboxMode":0, 5 | "bbox_bottom":23, 6 | "bbox_left":0, 7 | "bbox_right":23, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"356adabb-7b80-4561-badf-e46303d17a0c","name":"356adabb-7b80-4561-badf-e46303d17a0c","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | ], 17 | "gridX":0, 18 | "gridY":0, 19 | "height":24, 20 | "HTile":false, 21 | "layers":[ 22 | {"$GMImageLayer":"","%Name":"2074bf05-1f8e-464a-9d3c-8c96ab0f5aa2","blendMode":0,"displayName":"default","isLocked":false,"name":"2074bf05-1f8e-464a-9d3c-8c96ab0f5aa2","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 23 | ], 24 | "name":"FORMS_SprRound8", 25 | "nineSlice":{ 26 | "$GMNineSliceData":"", 27 | "bottom":8, 28 | "enabled":true, 29 | "guideColour":[4294902015,4294902015,4294902015,4294902015,], 30 | "highlightColour":1728023040, 31 | "highlightStyle":0, 32 | "left":8, 33 | "resourceType":"GMNineSliceData", 34 | "resourceVersion":"2.0", 35 | "right":8, 36 | "tileMode":[ 37 | 0, 38 | 0, 39 | 0, 40 | 0, 41 | 0, 42 | ], 43 | "top":8, 44 | }, 45 | "origin":0, 46 | "parent":{ 47 | "name":"Sprites", 48 | "path":"folders/Forms/Sprites.yy", 49 | }, 50 | "preMultiplyAlpha":false, 51 | "resourceType":"GMSprite", 52 | "resourceVersion":"2.0", 53 | "sequence":{ 54 | "$GMSequence":"", 55 | "%Name":"FORMS_SprRound8", 56 | "autoRecord":true, 57 | "backdropHeight":768, 58 | "backdropImageOpacity":0.5, 59 | "backdropImagePath":"", 60 | "backdropWidth":1366, 61 | "backdropXOffset":0.0, 62 | "backdropYOffset":0.0, 63 | "events":{ 64 | "$KeyframeStore":"", 65 | "Keyframes":[], 66 | "resourceType":"KeyframeStore", 67 | "resourceVersion":"2.0", 68 | }, 69 | "eventStubScript":null, 70 | "eventToFunction":{}, 71 | "length":1.0, 72 | "lockOrigin":false, 73 | "moments":{ 74 | "$KeyframeStore":"", 75 | "Keyframes":[], 76 | "resourceType":"KeyframeStore", 77 | "resourceVersion":"2.0", 78 | }, 79 | "name":"FORMS_SprRound8", 80 | "playback":1, 81 | "playbackSpeed":30.0, 82 | "playbackSpeedType":0, 83 | "resourceType":"GMSequence", 84 | "resourceVersion":"2.0", 85 | "showBackdrop":true, 86 | "showBackdropImage":false, 87 | "timeUnits":1, 88 | "tracks":[ 89 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 90 | {"$Keyframe":"","Channels":{ 91 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"356adabb-7b80-4561-badf-e46303d17a0c","path":"sprites/FORMS_SprRound8/FORMS_SprRound8.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 92 | },"Disabled":false,"id":"ea1e6ef5-73bf-4fca-8afb-9024158b8021","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 93 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 94 | ], 95 | "visibleRange":null, 96 | "volume":1.0, 97 | "xorigin":0, 98 | "yorigin":0, 99 | }, 100 | "swatchColours":null, 101 | "swfPrecision":2.525, 102 | "textureGroupId":{ 103 | "name":"Default", 104 | "path":"texturegroups/Default", 105 | }, 106 | "type":0, 107 | "VTile":false, 108 | "width":24, 109 | } -------------------------------------------------------------------------------- /sprites/FORMS_SprSlider/FORMS_SprSlider.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprSlider", 4 | "bboxMode":0, 5 | "bbox_bottom":23, 6 | "bbox_left":0, 7 | "bbox_right":2, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"ef838973-25f6-4f63-9a20-c6e6c2e26a1d","name":"ef838973-25f6-4f63-9a20-c6e6c2e26a1d","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | ], 17 | "gridX":0, 18 | "gridY":0, 19 | "height":24, 20 | "HTile":false, 21 | "layers":[ 22 | {"$GMImageLayer":"","%Name":"ac539518-66f4-4721-89fb-a7c510a76419","blendMode":0,"displayName":"default","isLocked":false,"name":"ac539518-66f4-4721-89fb-a7c510a76419","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 23 | ], 24 | "name":"FORMS_SprSlider", 25 | "nineSlice":{ 26 | "$GMNineSliceData":"", 27 | "bottom":2, 28 | "enabled":true, 29 | "guideColour":[4294902015,4294902015,4294902015,4294902015,], 30 | "highlightColour":1728023040, 31 | "highlightStyle":0, 32 | "left":0, 33 | "resourceType":"GMNineSliceData", 34 | "resourceVersion":"2.0", 35 | "right":0, 36 | "tileMode":[ 37 | 0, 38 | 0, 39 | 0, 40 | 0, 41 | 0, 42 | ], 43 | "top":2, 44 | }, 45 | "origin":0, 46 | "parent":{ 47 | "name":"Sprites", 48 | "path":"folders/Forms/Sprites.yy", 49 | }, 50 | "preMultiplyAlpha":false, 51 | "resourceType":"GMSprite", 52 | "resourceVersion":"2.0", 53 | "sequence":{ 54 | "$GMSequence":"", 55 | "%Name":"FORMS_SprSlider", 56 | "autoRecord":true, 57 | "backdropHeight":768, 58 | "backdropImageOpacity":0.5, 59 | "backdropImagePath":"", 60 | "backdropWidth":1366, 61 | "backdropXOffset":0.0, 62 | "backdropYOffset":0.0, 63 | "events":{ 64 | "$KeyframeStore":"", 65 | "Keyframes":[], 66 | "resourceType":"KeyframeStore", 67 | "resourceVersion":"2.0", 68 | }, 69 | "eventStubScript":null, 70 | "eventToFunction":{}, 71 | "length":1.0, 72 | "lockOrigin":false, 73 | "moments":{ 74 | "$KeyframeStore":"", 75 | "Keyframes":[], 76 | "resourceType":"KeyframeStore", 77 | "resourceVersion":"2.0", 78 | }, 79 | "name":"FORMS_SprSlider", 80 | "playback":1, 81 | "playbackSpeed":30.0, 82 | "playbackSpeedType":0, 83 | "resourceType":"GMSequence", 84 | "resourceVersion":"2.0", 85 | "showBackdrop":true, 86 | "showBackdropImage":false, 87 | "timeUnits":1, 88 | "tracks":[ 89 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 90 | {"$Keyframe":"","Channels":{ 91 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"ef838973-25f6-4f63-9a20-c6e6c2e26a1d","path":"sprites/FORMS_SprSlider/FORMS_SprSlider.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 92 | },"Disabled":false,"id":"14df2698-d5a4-4c78-8eba-7b78bcccd7e7","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 93 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 94 | ], 95 | "visibleRange":null, 96 | "volume":1.0, 97 | "xorigin":0, 98 | "yorigin":0, 99 | }, 100 | "swatchColours":null, 101 | "swfPrecision":0.5, 102 | "textureGroupId":{ 103 | "name":"Default", 104 | "path":"texturegroups/Default", 105 | }, 106 | "type":0, 107 | "VTile":false, 108 | "width":3, 109 | } -------------------------------------------------------------------------------- /sprites/FORMS_SprShadow/FORMS_SprShadow.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprShadow", 4 | "bboxMode":0, 5 | "bbox_bottom":95, 6 | "bbox_left":0, 7 | "bbox_right":95, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"d382f438-c481-45f9-a47b-1a34c799b7c3","name":"d382f438-c481-45f9-a47b-1a34c799b7c3","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | ], 17 | "gridX":0, 18 | "gridY":0, 19 | "height":96, 20 | "HTile":false, 21 | "layers":[ 22 | {"$GMImageLayer":"","%Name":"dbadb2d2-7344-44b1-a604-9e471ee73765","blendMode":0,"displayName":"default","isLocked":false,"name":"dbadb2d2-7344-44b1-a604-9e471ee73765","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 23 | ], 24 | "name":"FORMS_SprShadow", 25 | "nineSlice":{ 26 | "$GMNineSliceData":"", 27 | "bottom":32, 28 | "enabled":true, 29 | "guideColour":[4294902015,4294902015,4294902015,4294902015,], 30 | "highlightColour":1728023040, 31 | "highlightStyle":0, 32 | "left":32, 33 | "resourceType":"GMNineSliceData", 34 | "resourceVersion":"2.0", 35 | "right":32, 36 | "tileMode":[ 37 | 0, 38 | 0, 39 | 0, 40 | 0, 41 | 0, 42 | ], 43 | "top":32, 44 | }, 45 | "origin":0, 46 | "parent":{ 47 | "name":"Sprites", 48 | "path":"folders/Forms/Sprites.yy", 49 | }, 50 | "preMultiplyAlpha":false, 51 | "resourceType":"GMSprite", 52 | "resourceVersion":"2.0", 53 | "sequence":{ 54 | "$GMSequence":"", 55 | "%Name":"FORMS_SprShadow", 56 | "autoRecord":true, 57 | "backdropHeight":768, 58 | "backdropImageOpacity":0.5, 59 | "backdropImagePath":"", 60 | "backdropWidth":1366, 61 | "backdropXOffset":0.0, 62 | "backdropYOffset":0.0, 63 | "events":{ 64 | "$KeyframeStore":"", 65 | "Keyframes":[], 66 | "resourceType":"KeyframeStore", 67 | "resourceVersion":"2.0", 68 | }, 69 | "eventStubScript":null, 70 | "eventToFunction":{}, 71 | "length":1.0, 72 | "lockOrigin":false, 73 | "moments":{ 74 | "$KeyframeStore":"", 75 | "Keyframes":[], 76 | "resourceType":"KeyframeStore", 77 | "resourceVersion":"2.0", 78 | }, 79 | "name":"FORMS_SprShadow", 80 | "playback":1, 81 | "playbackSpeed":30.0, 82 | "playbackSpeedType":0, 83 | "resourceType":"GMSequence", 84 | "resourceVersion":"2.0", 85 | "showBackdrop":true, 86 | "showBackdropImage":false, 87 | "timeUnits":1, 88 | "tracks":[ 89 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 90 | {"$Keyframe":"","Channels":{ 91 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"d382f438-c481-45f9-a47b-1a34c799b7c3","path":"sprites/FORMS_SprShadow/FORMS_SprShadow.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 92 | },"Disabled":false,"id":"c041cf1c-ca96-467d-9b16-6e216f327b82","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 93 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 94 | ], 95 | "visibleRange":null, 96 | "volume":1.0, 97 | "xorigin":0, 98 | "yorigin":0, 99 | }, 100 | "swatchColours":null, 101 | "swfPrecision":2.525, 102 | "textureGroupId":{ 103 | "name":"Default", 104 | "path":"texturegroups/Default", 105 | }, 106 | "type":0, 107 | "VTile":false, 108 | "width":96, 109 | } -------------------------------------------------------------------------------- /sprites/FORMS_SprRectangle/FORMS_SprRectangle.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprRectangle", 4 | "bboxMode":0, 5 | "bbox_bottom":63, 6 | "bbox_left":0, 7 | "bbox_right":63, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"efdacc19-4415-4f73-9b42-868d18e88eb4","name":"efdacc19-4415-4f73-9b42-868d18e88eb4","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | ], 17 | "gridX":0, 18 | "gridY":0, 19 | "height":64, 20 | "HTile":false, 21 | "layers":[ 22 | {"$GMImageLayer":"","%Name":"0cf33634-7c65-4b1b-b97d-003007ad5246","blendMode":0,"displayName":"default","isLocked":false,"name":"0cf33634-7c65-4b1b-b97d-003007ad5246","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 23 | ], 24 | "name":"FORMS_SprRectangle", 25 | "nineSlice":{ 26 | "$GMNineSliceData":"", 27 | "bottom":0, 28 | "enabled":false, 29 | "guideColour":[4294902015,4294902015,4294902015,4294902015,], 30 | "highlightColour":1728023040, 31 | "highlightStyle":0, 32 | "left":0, 33 | "resourceType":"GMNineSliceData", 34 | "resourceVersion":"2.0", 35 | "right":0, 36 | "tileMode":[ 37 | 0, 38 | 0, 39 | 0, 40 | 0, 41 | 0, 42 | ], 43 | "top":0, 44 | }, 45 | "origin":0, 46 | "parent":{ 47 | "name":"Sprites", 48 | "path":"folders/Forms/Sprites.yy", 49 | }, 50 | "preMultiplyAlpha":false, 51 | "resourceType":"GMSprite", 52 | "resourceVersion":"2.0", 53 | "sequence":{ 54 | "$GMSequence":"", 55 | "%Name":"FORMS_SprRectangle", 56 | "autoRecord":true, 57 | "backdropHeight":768, 58 | "backdropImageOpacity":0.5, 59 | "backdropImagePath":"", 60 | "backdropWidth":1366, 61 | "backdropXOffset":0.0, 62 | "backdropYOffset":0.0, 63 | "events":{ 64 | "$KeyframeStore":"", 65 | "Keyframes":[], 66 | "resourceType":"KeyframeStore", 67 | "resourceVersion":"2.0", 68 | }, 69 | "eventStubScript":null, 70 | "eventToFunction":{}, 71 | "length":1.0, 72 | "lockOrigin":false, 73 | "moments":{ 74 | "$KeyframeStore":"", 75 | "Keyframes":[], 76 | "resourceType":"KeyframeStore", 77 | "resourceVersion":"2.0", 78 | }, 79 | "name":"FORMS_SprRectangle", 80 | "playback":1, 81 | "playbackSpeed":30.0, 82 | "playbackSpeedType":0, 83 | "resourceType":"GMSequence", 84 | "resourceVersion":"2.0", 85 | "showBackdrop":true, 86 | "showBackdropImage":false, 87 | "timeUnits":1, 88 | "tracks":[ 89 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 90 | {"$Keyframe":"","Channels":{ 91 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"efdacc19-4415-4f73-9b42-868d18e88eb4","path":"sprites/FORMS_SprRectangle/FORMS_SprRectangle.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 92 | },"Disabled":false,"id":"5b215162-235b-4b95-b105-f4e2bdf7154b","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 93 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 94 | ], 95 | "visibleRange":null, 96 | "volume":1.0, 97 | "xorigin":0, 98 | "yorigin":0, 99 | }, 100 | "swatchColours":null, 101 | "swfPrecision":2.525, 102 | "textureGroupId":{ 103 | "name":"Default", 104 | "path":"texturegroups/Default", 105 | }, 106 | "type":0, 107 | "VTile":false, 108 | "width":64, 109 | } -------------------------------------------------------------------------------- /rooms/RmTest/RmTest.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMRoom":"v1", 3 | "%Name":"RmTest", 4 | "creationCodeFile":"", 5 | "inheritCode":false, 6 | "inheritCreationOrder":false, 7 | "inheritLayers":false, 8 | "instanceCreationOrder":[ 9 | {"name":"inst_6D724867","path":"rooms/RmTest/RmTest.yy",}, 10 | ], 11 | "isDnd":false, 12 | "layers":[ 13 | {"$GMRInstanceLayer":"","%Name":"Instances","depth":0,"effectEnabled":true,"effectType":null,"gridX":32,"gridY":32,"hierarchyFrozen":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"inheritSubLayers":true,"inheritVisibility":true,"instances":[ 14 | {"$GMRInstance":"v1","%Name":"inst_6D724867","colour":4294967295,"frozen":false,"hasCreationCode":false,"ignore":false,"imageIndex":0,"imageSpeed":1.0,"inheritCode":false,"inheritedItemId":null,"inheritItemSettings":false,"isDnd":false,"name":"inst_6D724867","objectId":{"name":"OTest","path":"objects/OTest/OTest.yy",},"properties":[],"resourceType":"GMRInstance","resourceVersion":"2.0","rotation":0.0,"scaleX":1.0,"scaleY":1.0,"x":0.0,"y":0.0,}, 15 | ],"layers":[],"name":"Instances","properties":[],"resourceType":"GMRInstanceLayer","resourceVersion":"2.0","userdefinedDepth":false,"visible":true,}, 16 | {"$GMRBackgroundLayer":"","%Name":"Background","animationFPS":15.0,"animationSpeedType":0,"colour":4278190080,"depth":100,"effectEnabled":true,"effectType":null,"gridX":32,"gridY":32,"hierarchyFrozen":false,"hspeed":0.0,"htiled":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"inheritSubLayers":true,"inheritVisibility":true,"layers":[],"name":"Background","properties":[],"resourceType":"GMRBackgroundLayer","resourceVersion":"2.0","spriteId":null,"stretch":false,"userdefinedAnimFPS":false,"userdefinedDepth":false,"visible":true,"vspeed":0.0,"vtiled":false,"x":0,"y":0,}, 17 | ], 18 | "name":"RmTest", 19 | "parent":{ 20 | "name":"Test", 21 | "path":"folders/Test.yy", 22 | }, 23 | "parentRoom":null, 24 | "physicsSettings":{ 25 | "inheritPhysicsSettings":false, 26 | "PhysicsWorld":false, 27 | "PhysicsWorldGravityX":0.0, 28 | "PhysicsWorldGravityY":10.0, 29 | "PhysicsWorldPixToMetres":0.1, 30 | }, 31 | "resourceType":"GMRoom", 32 | "resourceVersion":"2.0", 33 | "roomSettings":{ 34 | "Height":768, 35 | "inheritRoomSettings":false, 36 | "persistent":false, 37 | "Width":1366, 38 | }, 39 | "sequenceId":null, 40 | "views":[ 41 | {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, 42 | {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, 43 | {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, 44 | {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, 45 | {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, 46 | {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, 47 | {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, 48 | {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, 49 | ], 50 | "viewSettings":{ 51 | "clearDisplayBuffer":true, 52 | "clearViewBackground":false, 53 | "enableViews":false, 54 | "inheritViewSettings":false, 55 | }, 56 | "volume":1.0, 57 | } -------------------------------------------------------------------------------- /sprites/FORMS_SprTabWorkspace/FORMS_SprTabWorkspace.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprTabWorkspace", 4 | "bboxMode":0, 5 | "bbox_bottom":31, 6 | "bbox_left":0, 7 | "bbox_right":31, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"b3ee786d-f528-4a97-b601-09cce3145a3c","name":"b3ee786d-f528-4a97-b601-09cce3145a3c","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | ], 17 | "gridX":0, 18 | "gridY":0, 19 | "height":32, 20 | "HTile":false, 21 | "layers":[ 22 | {"$GMImageLayer":"","%Name":"a61ab70b-611c-45e2-a0bb-8a4ea94d2b0d","blendMode":0,"displayName":"default","isLocked":false,"name":"a61ab70b-611c-45e2-a0bb-8a4ea94d2b0d","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 23 | ], 24 | "name":"FORMS_SprTabWorkspace", 25 | "nineSlice":{ 26 | "$GMNineSliceData":"", 27 | "bottom":0, 28 | "enabled":true, 29 | "guideColour":[4294902015,4294902015,4294902015,4294902015,], 30 | "highlightColour":1728023040, 31 | "highlightStyle":0, 32 | "left":9, 33 | "resourceType":"GMNineSliceData", 34 | "resourceVersion":"2.0", 35 | "right":9, 36 | "tileMode":[ 37 | 0, 38 | 0, 39 | 0, 40 | 0, 41 | 0, 42 | ], 43 | "top":0, 44 | }, 45 | "origin":0, 46 | "parent":{ 47 | "name":"Sprites", 48 | "path":"folders/Forms/Sprites.yy", 49 | }, 50 | "preMultiplyAlpha":false, 51 | "resourceType":"GMSprite", 52 | "resourceVersion":"2.0", 53 | "sequence":{ 54 | "$GMSequence":"", 55 | "%Name":"FORMS_SprTabWorkspace", 56 | "autoRecord":true, 57 | "backdropHeight":768, 58 | "backdropImageOpacity":0.5, 59 | "backdropImagePath":"", 60 | "backdropWidth":1366, 61 | "backdropXOffset":0.0, 62 | "backdropYOffset":0.0, 63 | "events":{ 64 | "$KeyframeStore":"", 65 | "Keyframes":[], 66 | "resourceType":"KeyframeStore", 67 | "resourceVersion":"2.0", 68 | }, 69 | "eventStubScript":null, 70 | "eventToFunction":{}, 71 | "length":1.0, 72 | "lockOrigin":false, 73 | "moments":{ 74 | "$KeyframeStore":"", 75 | "Keyframes":[], 76 | "resourceType":"KeyframeStore", 77 | "resourceVersion":"2.0", 78 | }, 79 | "name":"FORMS_SprTabWorkspace", 80 | "playback":1, 81 | "playbackSpeed":30.0, 82 | "playbackSpeedType":0, 83 | "resourceType":"GMSequence", 84 | "resourceVersion":"2.0", 85 | "showBackdrop":true, 86 | "showBackdropImage":false, 87 | "timeUnits":1, 88 | "tracks":[ 89 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 90 | {"$Keyframe":"","Channels":{ 91 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"b3ee786d-f528-4a97-b601-09cce3145a3c","path":"sprites/FORMS_SprTabWorkspace/FORMS_SprTabWorkspace.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 92 | },"Disabled":false,"id":"7598a6e6-2572-4917-9b2a-9fca6c9eb859","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 93 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 94 | ], 95 | "visibleRange":null, 96 | "volume":1.0, 97 | "xorigin":0, 98 | "yorigin":0, 99 | }, 100 | "swatchColours":null, 101 | "swfPrecision":0.5, 102 | "textureGroupId":{ 103 | "name":"Default", 104 | "path":"texturegroups/Default", 105 | }, 106 | "type":0, 107 | "VTile":false, 108 | "width":32, 109 | } -------------------------------------------------------------------------------- /scripts/FORMS_MenuBar/FORMS_MenuBar.gml: -------------------------------------------------------------------------------- 1 | /// @func FORMS_MenuBarProps() 2 | /// 3 | /// @extends FORMS_ContainerProps 4 | /// 5 | /// @desc Properties accepted by the constructor of {@link FORMS_MenuBar}. 6 | function FORMS_MenuBarProps(): FORMS_ContainerProps() constructor {} 7 | 8 | /// @func FORMS_MenuBar([_items[, _props]]) 9 | /// 10 | /// @extends FORMS_Container 11 | /// 12 | /// @desc A bar with dropdown menus, usually placed at the top of the application window. 13 | /// 14 | /// @param {Array} [_items] An array of items in the menu bar. 15 | /// @param {Struct.FORMS_MenuBarProps, Undefined} [_props] Properties to create the menu bar with or `undefined` 16 | /// (default). 17 | function FORMS_MenuBar(_items = [], _props = undefined): FORMS_Container(_props) constructor 18 | { 19 | static Container_update = update; 20 | 21 | /// @var {Array} 22 | /// @private 23 | __items = _items; 24 | 25 | /// @var {Real} 26 | /// @private 27 | __itemCurrent = -1; 28 | 29 | /// @var {Struct.WeakRef, Undefined} 30 | /// @private 31 | __contextMenu = undefined; 32 | 33 | /// @var {Struct.FORMS_UnitValue} The widget's width. Defaults to 100%. 34 | Width = Width.from_props(_props, "Width", 100, FORMS_EUnit.Percent); 35 | 36 | /// @var {Struct.FORMS_UnitValue} The widget's height. Defaults to 24px. 37 | Height = Height.from_props(_props, "Height", 24, FORMS_EUnit.Pixel); 38 | 39 | static draw_content = function () 40 | { 41 | var _menu = self; 42 | var _items = _menu.__items; 43 | var _itemCurrent = _menu.__itemCurrent; 44 | var _itemIndex = 0; 45 | var _contextMenuY = __realY + __realHeight; 46 | 47 | Pen.PaddingX = 2; 48 | Pen.PaddingY = 4; 49 | Pen.start(); 50 | 51 | repeat(array_length(_items)) 52 | { 53 | var _item = _items[_itemIndex]; 54 | var _itemX = __realX + Pen.X - 8; 55 | 56 | var _link = Pen.button(_item.Name, 57 | { 58 | BackgroundColor: c_white, 59 | BackgroundAlpha: (_itemIndex == _itemCurrent) ? 0.2 : 0.0, 60 | BackgroundColorHover: c_white, 61 | BackgroundAlphaHover: 0.2, 62 | Disabled: (_item.ContextMenu == undefined), 63 | }); 64 | 65 | if ((_link == FORMS_EControlAction.Click 66 | || (_link == FORMS_EControlAction.MouseOver 67 | && _menu.__contextMenu != undefined 68 | && _menu.__itemCurrent != _itemIndex)) 69 | && _item.ContextMenu != undefined) 70 | { 71 | if (_menu.__contextMenu != undefined) 72 | { 73 | _menu.__contextMenu.ref.destroy_later(); 74 | _menu.__contextMenu = undefined; 75 | } 76 | 77 | var _itemContextMenu = new _item.ContextMenu(); 78 | _itemContextMenu.X.Value = _itemX; 79 | _itemContextMenu.Y.Value = _contextMenuY; 80 | _menu.__contextMenu = weak_ref_create(_itemContextMenu); 81 | 82 | forms_get_root().add_child(_itemContextMenu); 83 | 84 | _itemCurrent = _itemIndex; 85 | _menu.__itemCurrent = _itemCurrent; 86 | } 87 | 88 | Pen.move(1); 89 | ++_itemIndex; 90 | } 91 | 92 | Pen.finish(); 93 | return self; 94 | } 95 | 96 | static update = function (_deltaTime) 97 | { 98 | Container_update(_deltaTime); 99 | if (__contextMenu != undefined && !weak_ref_alive(__contextMenu)) 100 | { 101 | __contextMenu = undefined; 102 | __itemCurrent = -1; 103 | } 104 | return self; 105 | } 106 | } 107 | 108 | /// @func FORMS_MenuBarItem(_name[, _contextMenu]) 109 | /// 110 | /// @desc An item in a {@link FORMS_MenuBar}. 111 | /// 112 | /// @param {String} _name The name of the menu item. 113 | /// @param {Function, Undefined} [_contextMenu] A constructor of a struct that inherits from {@link FORMS_ContextMenu} 114 | /// to be created when the menu item is selected, or `undefined` (default). 115 | function FORMS_MenuBarItem(_name, _contextMenu = undefined) constructor 116 | { 117 | /// @var {String} The name of the menu item. 118 | Name = _name; 119 | 120 | /// @var {Function, Undefined} A constructor of a struct that inherits from {@link FORMS_ContextMenu} to be created 121 | /// when the menu item is selected, or `undefined` (default). 122 | ContextMenu = _contextMenu; 123 | } 124 | -------------------------------------------------------------------------------- /sprites/FORMS_SprColorPickerCircle/FORMS_SprColorPickerCircle.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprColorPickerCircle", 4 | "bboxMode":0, 5 | "bbox_bottom":31, 6 | "bbox_left":0, 7 | "bbox_right":31, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"5ffd9e5d-cc30-4d25-a95c-b60ae7d36348","name":"5ffd9e5d-cc30-4d25-a95c-b60ae7d36348","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | {"$GMSpriteFrame":"","%Name":"645f44f4-831f-4421-b556-b59ff4f25090","name":"645f44f4-831f-4421-b556-b59ff4f25090","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 17 | ], 18 | "gridX":0, 19 | "gridY":0, 20 | "height":32, 21 | "HTile":false, 22 | "layers":[ 23 | {"$GMImageLayer":"","%Name":"d8394bbb-8ac5-4dd4-985d-eefd6c8288fc","blendMode":0,"displayName":"default","isLocked":false,"name":"d8394bbb-8ac5-4dd4-985d-eefd6c8288fc","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 24 | ], 25 | "name":"FORMS_SprColorPickerCircle", 26 | "nineSlice":null, 27 | "origin":4, 28 | "parent":{ 29 | "name":"Sprites", 30 | "path":"folders/Forms/Sprites.yy", 31 | }, 32 | "preMultiplyAlpha":false, 33 | "resourceType":"GMSprite", 34 | "resourceVersion":"2.0", 35 | "sequence":{ 36 | "$GMSequence":"", 37 | "%Name":"FORMS_SprColorPickerCircle", 38 | "autoRecord":true, 39 | "backdropHeight":768, 40 | "backdropImageOpacity":0.5, 41 | "backdropImagePath":"", 42 | "backdropWidth":1366, 43 | "backdropXOffset":0.0, 44 | "backdropYOffset":0.0, 45 | "events":{ 46 | "$KeyframeStore":"", 47 | "Keyframes":[], 48 | "resourceType":"KeyframeStore", 49 | "resourceVersion":"2.0", 50 | }, 51 | "eventStubScript":null, 52 | "eventToFunction":{}, 53 | "length":2.0, 54 | "lockOrigin":false, 55 | "moments":{ 56 | "$KeyframeStore":"", 57 | "Keyframes":[], 58 | "resourceType":"KeyframeStore", 59 | "resourceVersion":"2.0", 60 | }, 61 | "name":"FORMS_SprColorPickerCircle", 62 | "playback":1, 63 | "playbackSpeed":30.0, 64 | "playbackSpeedType":0, 65 | "resourceType":"GMSequence", 66 | "resourceVersion":"2.0", 67 | "showBackdrop":true, 68 | "showBackdropImage":false, 69 | "timeUnits":1, 70 | "tracks":[ 71 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 72 | {"$Keyframe":"","Channels":{ 73 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"5ffd9e5d-cc30-4d25-a95c-b60ae7d36348","path":"sprites/FORMS_SprColorPickerCircle/FORMS_SprColorPickerCircle.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 74 | },"Disabled":false,"id":"7ad41b36-c3ef-4ab7-a611-b6d9a9a9b772","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 75 | {"$Keyframe":"","Channels":{ 76 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"645f44f4-831f-4421-b556-b59ff4f25090","path":"sprites/FORMS_SprColorPickerCircle/FORMS_SprColorPickerCircle.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 77 | },"Disabled":false,"id":"6c7a40b2-3544-4218-be8a-5c0fa4a670c6","IsCreationKey":false,"Key":1.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 78 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 79 | ], 80 | "visibleRange":null, 81 | "volume":1.0, 82 | "xorigin":16, 83 | "yorigin":16, 84 | }, 85 | "swatchColours":null, 86 | "swfPrecision":0.5, 87 | "textureGroupId":{ 88 | "name":"Default", 89 | "path":"texturegroups/Default", 90 | }, 91 | "type":0, 92 | "VTile":false, 93 | "width":32, 94 | } -------------------------------------------------------------------------------- /options/android/options_android.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMAndroidOptions":"", 3 | "%Name":"Android", 4 | "name":"Android", 5 | "option_android_application_tag_inject":"", 6 | "option_android_arch_arm64":true, 7 | "option_android_arch_armv7":false, 8 | "option_android_arch_x86_64":false, 9 | "option_android_attribute_allow_backup":false, 10 | "option_android_build_tools":"", 11 | "option_android_compile_sdk":"", 12 | "option_android_device_support":0, 13 | "option_android_display_name":"Created with GameMaker", 14 | "option_android_facebook_app_display_name":"", 15 | "option_android_facebook_id":"", 16 | "option_android_gamepad_support":true, 17 | "option_android_google_apk_expansion":false, 18 | "option_android_google_cloud_saving":false, 19 | "option_android_google_dynamic_asset_delivery":false, 20 | "option_android_google_licensing_public_key":"", 21 | "option_android_google_services_app_id":"", 22 | "option_android_icon_adaptivebg_hdpi":"${base_options_dir}/android/icons_adaptivebg/hdpi.png", 23 | "option_android_icon_adaptivebg_ldpi":"${base_options_dir}/android/icons_adaptivebg/ldpi.png", 24 | "option_android_icon_adaptivebg_mdpi":"${base_options_dir}/android/icons_adaptivebg/mdpi.png", 25 | "option_android_icon_adaptivebg_xhdpi":"${base_options_dir}/android/icons_adaptivebg/xhdpi.png", 26 | "option_android_icon_adaptivebg_xxhdpi":"${base_options_dir}/android/icons_adaptivebg/xxhdpi.png", 27 | "option_android_icon_adaptivebg_xxxhdpi":"${base_options_dir}/android/icons_adaptivebg/xxxhdpi.png", 28 | "option_android_icon_adaptive_generate":false, 29 | "option_android_icon_adaptive_hdpi":"${base_options_dir}/android/icons_adaptive/hdpi.png", 30 | "option_android_icon_adaptive_ldpi":"${base_options_dir}/android/icons_adaptive/ldpi.png", 31 | "option_android_icon_adaptive_mdpi":"${base_options_dir}/android/icons_adaptive/mdpi.png", 32 | "option_android_icon_adaptive_xhdpi":"${base_options_dir}/android/icons_adaptive/xhdpi.png", 33 | "option_android_icon_adaptive_xxhdpi":"${base_options_dir}/android/icons_adaptive/xxhdpi.png", 34 | "option_android_icon_adaptive_xxxhdpi":"${base_options_dir}/android/icons_adaptive/xxxhdpi.png", 35 | "option_android_icon_hdpi":"${base_options_dir}/android/icons/hdpi.png", 36 | "option_android_icon_ldpi":"${base_options_dir}/android/icons/ldpi.png", 37 | "option_android_icon_mdpi":"${base_options_dir}/android/icons/mdpi.png", 38 | "option_android_icon_xhdpi":"${base_options_dir}/android/icons/xhdpi.png", 39 | "option_android_icon_xxhdpi":"${base_options_dir}/android/icons/xxhdpi.png", 40 | "option_android_icon_xxxhdpi":"${base_options_dir}/android/icons/xxxhdpi.png", 41 | "option_android_install_location":0, 42 | "option_android_interpolate_pixels":false, 43 | "option_android_launchscreen_fill":0, 44 | "option_android_lint":false, 45 | "option_android_logcat":"yoyo:V DEBUG:V AndroidRuntime:V", 46 | "option_android_minimum_sdk":"", 47 | "option_android_orient_landscape":true, 48 | "option_android_orient_landscape_flipped":true, 49 | "option_android_orient_portrait":true, 50 | "option_android_orient_portrait_flipped":true, 51 | "option_android_package_company":"company", 52 | "option_android_package_domain":"com", 53 | "option_android_package_product":"game", 54 | "option_android_permission_bluetooth":true, 55 | "option_android_permission_internet":true, 56 | "option_android_permission_network_state":false, 57 | "option_android_permission_read_phone_state":false, 58 | "option_android_permission_record_audio":false, 59 | "option_android_permission_write_external_storage":false, 60 | "option_android_proguard_minifying":false, 61 | "option_android_proguard_shrinking":false, 62 | "option_android_scale":0, 63 | "option_android_screen_depth":0, 64 | "option_android_sleep_margin":4, 65 | "option_android_splashscreen_background_colour":255, 66 | "option_android_splash_screens_landscape":"${base_options_dir}/android/splash/landscape.png", 67 | "option_android_splash_screens_portrait":"${base_options_dir}/android/splash/portrait.png", 68 | "option_android_splash_time":0, 69 | "option_android_support_lib":"", 70 | "option_android_sync_amazon":false, 71 | "option_android_target_sdk":"", 72 | "option_android_texture_page":"2048x2048", 73 | "option_android_tools_from_version":false, 74 | "option_android_tv_banner":"${base_options_dir}/android/tv_banner.png", 75 | "option_android_tv_isgame":true, 76 | "option_android_tv_supports_leanback":true, 77 | "option_android_use_facebook":false, 78 | "option_android_version":"0.1.0.0", 79 | "resourceType":"GMAndroidOptions", 80 | "resourceVersion":"2.0", 81 | } -------------------------------------------------------------------------------- /sprites/FORMS_SprRound4/FORMS_SprRound4.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprRound4", 4 | "bboxMode":0, 5 | "bbox_bottom":11, 6 | "bbox_left":0, 7 | "bbox_right":11, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"bc3a8f9b-8518-48ed-bd49-4530d4db3ccf","name":"bc3a8f9b-8518-48ed-bd49-4530d4db3ccf","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | {"$GMSpriteFrame":"","%Name":"17678ef0-9744-4f65-a14f-ae355b8a0517","name":"17678ef0-9744-4f65-a14f-ae355b8a0517","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 17 | ], 18 | "gridX":0, 19 | "gridY":0, 20 | "height":12, 21 | "HTile":false, 22 | "layers":[ 23 | {"$GMImageLayer":"","%Name":"ea6e71fa-d25f-46cb-a7b1-b8418a0e0bf4","blendMode":0,"displayName":"default","isLocked":false,"name":"ea6e71fa-d25f-46cb-a7b1-b8418a0e0bf4","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 24 | ], 25 | "name":"FORMS_SprRound4", 26 | "nineSlice":{ 27 | "$GMNineSliceData":"", 28 | "bottom":4, 29 | "enabled":true, 30 | "guideColour":[4294902015,4294902015,4294902015,4294902015,], 31 | "highlightColour":1728023040, 32 | "highlightStyle":0, 33 | "left":4, 34 | "resourceType":"GMNineSliceData", 35 | "resourceVersion":"2.0", 36 | "right":4, 37 | "tileMode":[ 38 | 0, 39 | 0, 40 | 0, 41 | 0, 42 | 0, 43 | ], 44 | "top":4, 45 | }, 46 | "origin":0, 47 | "parent":{ 48 | "name":"Sprites", 49 | "path":"folders/Forms/Sprites.yy", 50 | }, 51 | "preMultiplyAlpha":false, 52 | "resourceType":"GMSprite", 53 | "resourceVersion":"2.0", 54 | "sequence":{ 55 | "$GMSequence":"", 56 | "%Name":"FORMS_SprRound4", 57 | "autoRecord":true, 58 | "backdropHeight":768, 59 | "backdropImageOpacity":0.5, 60 | "backdropImagePath":"", 61 | "backdropWidth":1366, 62 | "backdropXOffset":0.0, 63 | "backdropYOffset":0.0, 64 | "events":{ 65 | "$KeyframeStore":"", 66 | "Keyframes":[], 67 | "resourceType":"KeyframeStore", 68 | "resourceVersion":"2.0", 69 | }, 70 | "eventStubScript":null, 71 | "eventToFunction":{}, 72 | "length":2.0, 73 | "lockOrigin":false, 74 | "moments":{ 75 | "$KeyframeStore":"", 76 | "Keyframes":[], 77 | "resourceType":"KeyframeStore", 78 | "resourceVersion":"2.0", 79 | }, 80 | "name":"FORMS_SprRound4", 81 | "playback":1, 82 | "playbackSpeed":30.0, 83 | "playbackSpeedType":0, 84 | "resourceType":"GMSequence", 85 | "resourceVersion":"2.0", 86 | "showBackdrop":true, 87 | "showBackdropImage":false, 88 | "timeUnits":1, 89 | "tracks":[ 90 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 91 | {"$Keyframe":"","Channels":{ 92 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"bc3a8f9b-8518-48ed-bd49-4530d4db3ccf","path":"sprites/FORMS_SprRound4/FORMS_SprRound4.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 93 | },"Disabled":false,"id":"afa34e55-b475-4917-ab7b-c62c76ea1dbd","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 94 | {"$Keyframe":"","Channels":{ 95 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"17678ef0-9744-4f65-a14f-ae355b8a0517","path":"sprites/FORMS_SprRound4/FORMS_SprRound4.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 96 | },"Disabled":false,"id":"18170805-8127-4b3e-a449-f384c0aa1922","IsCreationKey":false,"Key":1.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 97 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 98 | ], 99 | "visibleRange":null, 100 | "volume":1.0, 101 | "xorigin":0, 102 | "yorigin":0, 103 | }, 104 | "swatchColours":null, 105 | "swfPrecision":2.525, 106 | "textureGroupId":{ 107 | "name":"Default", 108 | "path":"texturegroups/Default", 109 | }, 110 | "type":0, 111 | "VTile":false, 112 | "width":12, 113 | } -------------------------------------------------------------------------------- /format-gml.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | import jsbeautifier 4 | import json 5 | import os 6 | import re 7 | import subprocess 8 | import sys 9 | 10 | VERSION_MAJOR = 1 11 | VERSION_MINOR = 0 12 | VERSION_PATCH = 1 13 | VERSION_STRING = f"{VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_PATCH}" 14 | 15 | HELP_MESSAGE = """ 16 | Usage: format-gml [-h, -v, --validate, --staged, --all, --file FILE] 17 | 18 | Arguments: 19 | -h - Show this help message and exit. 20 | -v - Show version and exit. 21 | --validate - Check whether all staged GML files are properly formatted and exit with status 0 on success or 1 on fail. 22 | --staged - Format all staged GML files. This is the default option. 23 | --all - Format all GML files in the repo. 24 | --file - Format only given file. 25 | """[ 26 | 1: 27 | ] 28 | 29 | OPTIONS_PATH = "./.jsbeautifyrc" 30 | 31 | if os.path.exists(OPTIONS_PATH): 32 | with open(OPTIONS_PATH, "r") as f: 33 | OPTIONS = json.load(f) 34 | else: 35 | OPTIONS = None 36 | 37 | 38 | def beautify_file(filepath): 39 | res = jsbeautifier.beautify_file(filepath, OPTIONS) 40 | res = re.sub(r"\$[\s\n]+\"", '$"', res) 41 | res = re.sub(r"\@[\s\n]+\"", '@"', res) 42 | res = re.sub(r"\[[\s\n]+\@", '[@ ', res) 43 | res = re.sub(r"\[[\s\n]+\|", '[| ', res) 44 | res = re.sub(r"\[[\s\n]+\#", '[# ', res) 45 | res = re.sub(r"\[[\s\n]+\?", '[? ', res) 46 | res = re.sub(r"\[[\s\n]*\$", '[$ ', res) 47 | return res 48 | 49 | 50 | def get_staged_files(): 51 | # Run the git command 52 | result = subprocess.run( 53 | ["git", "diff", "--name-only", "--cached"], 54 | stdout=subprocess.PIPE, # Capture output 55 | stderr=subprocess.PIPE, # Capture errors 56 | text=True, 57 | ) # Return output as string 58 | 59 | # Check if there was an error 60 | if result.returncode != 0: 61 | print(f"Error: {result.stderr}") 62 | return [] 63 | 64 | # Get the output (list of file paths) 65 | staged_files = result.stdout.strip().split("\n") 66 | 67 | # Remove any empty strings (in case no files are staged) 68 | return [file for file in staged_files if file] 69 | 70 | 71 | def get_staged_file_contents(file_path): 72 | try: 73 | # Run the git show command to get the staged contents 74 | result = subprocess.run( 75 | ["git", "show", f":{file_path}"], capture_output=True, text=True, check=True 76 | ) 77 | return result.stdout # Return the staged file contents 78 | except subprocess.CalledProcessError as e: 79 | print(f"ERROR: {e}") 80 | exit(1) 81 | 82 | 83 | if __name__ == "__main__": 84 | target = "--staged" 85 | filepath = None 86 | 87 | if len(sys.argv) > 1: 88 | target = sys.argv[1] 89 | 90 | if target == "--file": 91 | if len(sys.argv) > 2: 92 | filepath = sys.argv[2] 93 | else: 94 | print("Argument FILE not defined!") 95 | print(1) 96 | 97 | if target == "-h": 98 | print(HELP_MESSAGE) 99 | elif target == "-v": 100 | print(VERSION_STRING) 101 | elif target == "--validate": 102 | for filepath in get_staged_files(): 103 | if filepath.endswith(".gml"): 104 | orig = get_staged_file_contents(filepath) 105 | res = beautify_file(filepath) 106 | if orig != res: 107 | print( 108 | f'ERROR: File "{filepath}" is not properly formatted!\n\nPlease run ./format-gml.py to fix formatting of all staged GML files and stage the changes before running commit again.' 109 | ) 110 | exit(1) 111 | elif target == "--staged": 112 | for filepath in get_staged_files(): 113 | if filepath.endswith(".gml"): 114 | res = beautify_file(filepath) 115 | with open(filepath, "w") as f: 116 | f.write(res) 117 | elif target == "--all": 118 | for dirpath, _, filenames in os.walk("."): 119 | for filename in filenames: 120 | if filename.endswith(".gml"): 121 | filepath = os.path.join(dirpath, filename) 122 | res = beautify_file(filepath) 123 | with open(filepath, "w") as f: 124 | f.write(res) 125 | elif target == "--file": 126 | res = beautify_file(filepath) 127 | with open(filepath, "w") as f: 128 | f.write(res) 129 | else: 130 | print(f"Invalid target {target}! Run format-gml -h to display usage.") 131 | exit(1) 132 | -------------------------------------------------------------------------------- /sprites/FORMS_SprScrollableX/FORMS_SprScrollableX.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprScrollableX", 4 | "bboxMode":0, 5 | "bbox_bottom":11, 6 | "bbox_left":0, 7 | "bbox_right":3, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"118bf686-29d2-41eb-8f03-d7cde88a8338","name":"118bf686-29d2-41eb-8f03-d7cde88a8338","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | {"$GMSpriteFrame":"","%Name":"99b5a2a8-c6b3-44a0-959c-18725fcfbb6b","name":"99b5a2a8-c6b3-44a0-959c-18725fcfbb6b","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 17 | ], 18 | "gridX":0, 19 | "gridY":0, 20 | "height":12, 21 | "HTile":false, 22 | "layers":[ 23 | {"$GMImageLayer":"","%Name":"f71b168d-d115-4c83-ae31-266651410767","blendMode":0,"displayName":"default","isLocked":false,"name":"f71b168d-d115-4c83-ae31-266651410767","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 24 | ], 25 | "name":"FORMS_SprScrollableX", 26 | "nineSlice":{ 27 | "$GMNineSliceData":"", 28 | "bottom":4, 29 | "enabled":true, 30 | "guideColour":[4294902015,4294902015,4294902015,4294902015,], 31 | "highlightColour":1728023040, 32 | "highlightStyle":0, 33 | "left":0, 34 | "resourceType":"GMNineSliceData", 35 | "resourceVersion":"2.0", 36 | "right":0, 37 | "tileMode":[ 38 | 0, 39 | 0, 40 | 0, 41 | 0, 42 | 0, 43 | ], 44 | "top":4, 45 | }, 46 | "origin":0, 47 | "parent":{ 48 | "name":"Sprites", 49 | "path":"folders/Forms/Sprites.yy", 50 | }, 51 | "preMultiplyAlpha":false, 52 | "resourceType":"GMSprite", 53 | "resourceVersion":"2.0", 54 | "sequence":{ 55 | "$GMSequence":"", 56 | "%Name":"FORMS_SprScrollableX", 57 | "autoRecord":true, 58 | "backdropHeight":768, 59 | "backdropImageOpacity":0.5, 60 | "backdropImagePath":"", 61 | "backdropWidth":1366, 62 | "backdropXOffset":0.0, 63 | "backdropYOffset":0.0, 64 | "events":{ 65 | "$KeyframeStore":"", 66 | "Keyframes":[], 67 | "resourceType":"KeyframeStore", 68 | "resourceVersion":"2.0", 69 | }, 70 | "eventStubScript":null, 71 | "eventToFunction":{}, 72 | "length":2.0, 73 | "lockOrigin":false, 74 | "moments":{ 75 | "$KeyframeStore":"", 76 | "Keyframes":[], 77 | "resourceType":"KeyframeStore", 78 | "resourceVersion":"2.0", 79 | }, 80 | "name":"FORMS_SprScrollableX", 81 | "playback":1, 82 | "playbackSpeed":30.0, 83 | "playbackSpeedType":0, 84 | "resourceType":"GMSequence", 85 | "resourceVersion":"2.0", 86 | "showBackdrop":true, 87 | "showBackdropImage":false, 88 | "timeUnits":1, 89 | "tracks":[ 90 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 91 | {"$Keyframe":"","Channels":{ 92 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"118bf686-29d2-41eb-8f03-d7cde88a8338","path":"sprites/FORMS_SprScrollableX/FORMS_SprScrollableX.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 93 | },"Disabled":false,"id":"56df2f50-3621-4795-b962-29b7675ba028","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 94 | {"$Keyframe":"","Channels":{ 95 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"99b5a2a8-c6b3-44a0-959c-18725fcfbb6b","path":"sprites/FORMS_SprScrollableX/FORMS_SprScrollableX.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 96 | },"Disabled":false,"id":"caf85c4b-7686-4781-83b0-6a0aa69fbbca","IsCreationKey":false,"Key":1.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 97 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 98 | ], 99 | "visibleRange":null, 100 | "volume":1.0, 101 | "xorigin":0, 102 | "yorigin":0, 103 | }, 104 | "swatchColours":null, 105 | "swfPrecision":0.5, 106 | "textureGroupId":{ 107 | "name":"Default", 108 | "path":"texturegroups/Default", 109 | }, 110 | "type":0, 111 | "VTile":false, 112 | "width":4, 113 | } -------------------------------------------------------------------------------- /sprites/FORMS_SprScrollableY/FORMS_SprScrollableY.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprScrollableY", 4 | "bboxMode":0, 5 | "bbox_bottom":3, 6 | "bbox_left":0, 7 | "bbox_right":11, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"99b5a2a8-c6b3-44a0-959c-18725fcfbb6b","name":"99b5a2a8-c6b3-44a0-959c-18725fcfbb6b","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | {"$GMSpriteFrame":"","%Name":"118bf686-29d2-41eb-8f03-d7cde88a8338","name":"118bf686-29d2-41eb-8f03-d7cde88a8338","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 17 | ], 18 | "gridX":0, 19 | "gridY":0, 20 | "height":4, 21 | "HTile":false, 22 | "layers":[ 23 | {"$GMImageLayer":"","%Name":"f71b168d-d115-4c83-ae31-266651410767","blendMode":0,"displayName":"default","isLocked":false,"name":"f71b168d-d115-4c83-ae31-266651410767","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 24 | ], 25 | "name":"FORMS_SprScrollableY", 26 | "nineSlice":{ 27 | "$GMNineSliceData":"", 28 | "bottom":0, 29 | "enabled":true, 30 | "guideColour":[4294902015,4294902015,4294902015,4294902015,], 31 | "highlightColour":1728023040, 32 | "highlightStyle":0, 33 | "left":4, 34 | "resourceType":"GMNineSliceData", 35 | "resourceVersion":"2.0", 36 | "right":4, 37 | "tileMode":[ 38 | 0, 39 | 0, 40 | 0, 41 | 0, 42 | 0, 43 | ], 44 | "top":0, 45 | }, 46 | "origin":0, 47 | "parent":{ 48 | "name":"Sprites", 49 | "path":"folders/Forms/Sprites.yy", 50 | }, 51 | "preMultiplyAlpha":false, 52 | "resourceType":"GMSprite", 53 | "resourceVersion":"2.0", 54 | "sequence":{ 55 | "$GMSequence":"", 56 | "%Name":"FORMS_SprScrollableY", 57 | "autoRecord":true, 58 | "backdropHeight":768, 59 | "backdropImageOpacity":0.5, 60 | "backdropImagePath":"", 61 | "backdropWidth":1366, 62 | "backdropXOffset":0.0, 63 | "backdropYOffset":0.0, 64 | "events":{ 65 | "$KeyframeStore":"", 66 | "Keyframes":[], 67 | "resourceType":"KeyframeStore", 68 | "resourceVersion":"2.0", 69 | }, 70 | "eventStubScript":null, 71 | "eventToFunction":{}, 72 | "length":2.0, 73 | "lockOrigin":false, 74 | "moments":{ 75 | "$KeyframeStore":"", 76 | "Keyframes":[], 77 | "resourceType":"KeyframeStore", 78 | "resourceVersion":"2.0", 79 | }, 80 | "name":"FORMS_SprScrollableY", 81 | "playback":1, 82 | "playbackSpeed":30.0, 83 | "playbackSpeedType":0, 84 | "resourceType":"GMSequence", 85 | "resourceVersion":"2.0", 86 | "showBackdrop":true, 87 | "showBackdropImage":false, 88 | "timeUnits":1, 89 | "tracks":[ 90 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 91 | {"$Keyframe":"","Channels":{ 92 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"99b5a2a8-c6b3-44a0-959c-18725fcfbb6b","path":"sprites/FORMS_SprScrollableY/FORMS_SprScrollableY.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 93 | },"Disabled":false,"id":"caf85c4b-7686-4781-83b0-6a0aa69fbbca","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 94 | {"$Keyframe":"","Channels":{ 95 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"118bf686-29d2-41eb-8f03-d7cde88a8338","path":"sprites/FORMS_SprScrollableY/FORMS_SprScrollableY.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 96 | },"Disabled":false,"id":"56df2f50-3621-4795-b962-29b7675ba028","IsCreationKey":false,"Key":1.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 97 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 98 | ], 99 | "visibleRange":null, 100 | "volume":1.0, 101 | "xorigin":0, 102 | "yorigin":0, 103 | }, 104 | "swatchColours":null, 105 | "swfPrecision":0.5, 106 | "textureGroupId":{ 107 | "name":"Default", 108 | "path":"texturegroups/Default", 109 | }, 110 | "type":0, 111 | "VTile":false, 112 | "width":12, 113 | } -------------------------------------------------------------------------------- /scripts/FORMS_CompoundWidget/FORMS_CompoundWidget.gml: -------------------------------------------------------------------------------- 1 | /// @func FORMS_CompoundWidgetProps() 2 | /// 3 | /// @extends FORMS_WidgetProps 4 | /// 5 | /// @desc Properties accepted by the constructor of {@link FORMS_CompoundWidget}. 6 | function FORMS_CompoundWidgetProps(): FORMS_WidgetProps() constructor {} 7 | 8 | /// @func FORMS_CompoundWidget([_props[, _children]]) 9 | /// 10 | /// @extends FORMS_Widget 11 | /// 12 | /// @desc Base struct for widgets that have an array of child widgets. 13 | /// 14 | /// @param {Struct.FORMS_CompoundWidgetProps, Undefined} [_props] Properties to create the compound widget with or 15 | /// `undefined` (default). 16 | /// @param {Array, Undefined} [_children] An array of child widgets to add to the compound widget 17 | /// or `undefined` (default). 18 | function FORMS_CompoundWidget(_props = undefined, _children = undefined): FORMS_Widget(_props) constructor 19 | { 20 | static Widget_update = update; 21 | static Widget_destroy = destroy; 22 | 23 | /// @var {Array} An array of child widgets. 24 | /// @readonly 25 | /// @see FORMS_CompoundWidget.add_child 26 | /// @see FORMS_CompoundWidget.has_child 27 | /// @see FORMS_CompoundWidget.remove_child 28 | Children = []; 29 | 30 | if (is_array(_children)) 31 | { 32 | var _count = array_length(_children); 33 | for (var i = 0; i < _count; ++i) 34 | { 35 | add_child(_children[i]); 36 | } 37 | } 38 | 39 | /// @func add_child(_child) 40 | /// 41 | /// @desc Adds a child to this widget. 42 | /// 43 | /// @param {Struct.FORMS_Widget} _child The child widget to be added. Must not have a [parent](./FORMS_Widget.Parent)! 44 | /// 45 | /// @return {Struct.FORMS_CompoundWidget} Returns `self`. 46 | static add_child = function (_child) 47 | { 48 | forms_assert(_child.Parent == undefined, "Widget already has a parent!"); 49 | array_push(Children, _child); 50 | _child.Parent = self; 51 | return self; 52 | } 53 | 54 | /// @func has_child(_child) 55 | /// 56 | /// @desc Checks whether given widget is a child of this widget. 57 | /// 58 | /// @param {Struct.FORMS_Widget} _child The widget to check. 59 | /// 60 | /// @return {Bool} Returns `true` if this widget is the parent of given child widget. 61 | static has_child = function (_child) 62 | { 63 | gml_pragma("forceinline"); 64 | return (_child.Parent == self); 65 | } 66 | 67 | static remove_child = function (_child) 68 | { 69 | forms_assert(_child.Parent == self, "Widget not a child of this parent!"); 70 | for (var i = array_length(Children) - 1; i >= 0; --i) 71 | { 72 | var _widget = Children[i]; 73 | if (_widget == _child) 74 | { 75 | array_delete(Children, i, 1); 76 | _widget.Parent = undefined; 77 | break; 78 | } 79 | } 80 | return self; 81 | } 82 | 83 | static find_widget = function (_id) 84 | { 85 | if (Id == _id) 86 | { 87 | return self; 88 | } 89 | 90 | var _count = array_length(Children); 91 | for (var i = 0; i < _count; ++i) 92 | { 93 | var _found = Children[i].find_widget(_id); 94 | if (_found != undefined) 95 | { 96 | return _found; 97 | } 98 | } 99 | 100 | return undefined; 101 | } 102 | 103 | static layout = function () 104 | { 105 | FORMS_LAYOUT_GENERATED; 106 | 107 | var _parentX = __realX; 108 | var _parentY = __realY; 109 | var _parentWidth = __realWidth; 110 | var _parentHeight = __realHeight; 111 | var _count = array_length(Children); 112 | 113 | for (var i = 0; i < _count; ++i) 114 | { 115 | with(Children[i]) 116 | { 117 | var _autoWidth = get_auto_width(); 118 | var _autoHeight = get_auto_height(); 119 | 120 | __realWidth = floor(Width.get_absolute(_parentWidth, _autoWidth)); 121 | __realHeight = floor(Height.get_absolute(_parentHeight, _autoHeight)); 122 | __realX = floor(_parentX + X.get_absolute(_parentWidth, _autoWidth)); 123 | __realY = floor(_parentY + Y.get_absolute(_parentHeight, _autoHeight)); 124 | 125 | layout(); 126 | } 127 | } 128 | 129 | return self; 130 | } 131 | 132 | static update = function (_deltaTime) 133 | { 134 | Widget_update(_deltaTime); 135 | var _count = array_length(Children); 136 | for (var i = 0; i < _count; ++i) 137 | { 138 | Children[i].update(_deltaTime); 139 | } 140 | return self; 141 | } 142 | 143 | static draw = function () 144 | { 145 | var _count = array_length(Children); 146 | for (var i = 0; i < _count; ++i) 147 | { 148 | Children[i].draw(); 149 | } 150 | return self; 151 | } 152 | 153 | static destroy = function () 154 | { 155 | Widget_destroy(); 156 | 157 | for (var i = array_length(Children) - 1; i >= 0; --i) 158 | { 159 | Children[i].destroy(); 160 | } 161 | Children = undefined; 162 | 163 | return undefined; 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /sprites/FORMS_SprRadioButton/FORMS_SprRadioButton.yy: -------------------------------------------------------------------------------- 1 | { 2 | "$GMSprite":"", 3 | "%Name":"FORMS_SprRadioButton", 4 | "bboxMode":0, 5 | "bbox_bottom":47, 6 | "bbox_left":0, 7 | "bbox_right":47, 8 | "bbox_top":0, 9 | "collisionKind":1, 10 | "collisionTolerance":0, 11 | "DynamicTexturePage":false, 12 | "edgeFiltering":false, 13 | "For3D":false, 14 | "frames":[ 15 | {"$GMSpriteFrame":"","%Name":"c773e82c-b3c1-426f-9289-429fa0e443b7","name":"c773e82c-b3c1-426f-9289-429fa0e443b7","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 16 | {"$GMSpriteFrame":"","%Name":"762f7b1b-c949-4bdd-968e-dbf844344d72","name":"762f7b1b-c949-4bdd-968e-dbf844344d72","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 17 | {"$GMSpriteFrame":"","%Name":"d28694ca-370a-4d8b-9a4e-fe30261ca472","name":"d28694ca-370a-4d8b-9a4e-fe30261ca472","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, 18 | ], 19 | "gridX":0, 20 | "gridY":0, 21 | "height":48, 22 | "HTile":false, 23 | "layers":[ 24 | {"$GMImageLayer":"","%Name":"b0e3e361-7822-433c-8161-87536b6981e6","blendMode":0,"displayName":"default","isLocked":false,"name":"b0e3e361-7822-433c-8161-87536b6981e6","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, 25 | ], 26 | "name":"FORMS_SprRadioButton", 27 | "nineSlice":null, 28 | "origin":0, 29 | "parent":{ 30 | "name":"Sprites", 31 | "path":"folders/Forms/Sprites.yy", 32 | }, 33 | "preMultiplyAlpha":false, 34 | "resourceType":"GMSprite", 35 | "resourceVersion":"2.0", 36 | "sequence":{ 37 | "$GMSequence":"", 38 | "%Name":"FORMS_SprRadioButton", 39 | "autoRecord":true, 40 | "backdropHeight":768, 41 | "backdropImageOpacity":0.5, 42 | "backdropImagePath":"", 43 | "backdropWidth":1366, 44 | "backdropXOffset":0.0, 45 | "backdropYOffset":0.0, 46 | "events":{ 47 | "$KeyframeStore":"", 48 | "Keyframes":[], 49 | "resourceType":"KeyframeStore", 50 | "resourceVersion":"2.0", 51 | }, 52 | "eventStubScript":null, 53 | "eventToFunction":{}, 54 | "length":3.0, 55 | "lockOrigin":false, 56 | "moments":{ 57 | "$KeyframeStore":"", 58 | "Keyframes":[], 59 | "resourceType":"KeyframeStore", 60 | "resourceVersion":"2.0", 61 | }, 62 | "name":"FORMS_SprRadioButton", 63 | "playback":1, 64 | "playbackSpeed":30.0, 65 | "playbackSpeedType":0, 66 | "resourceType":"GMSequence", 67 | "resourceVersion":"2.0", 68 | "showBackdrop":true, 69 | "showBackdropImage":false, 70 | "timeUnits":1, 71 | "tracks":[ 72 | {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ 73 | {"$Keyframe":"","Channels":{ 74 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"c773e82c-b3c1-426f-9289-429fa0e443b7","path":"sprites/FORMS_SprRadioButton/FORMS_SprRadioButton.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 75 | },"Disabled":false,"id":"d6ac7e84-edd3-43dd-99ef-ef0bbaf4ace6","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 76 | {"$Keyframe":"","Channels":{ 77 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"762f7b1b-c949-4bdd-968e-dbf844344d72","path":"sprites/FORMS_SprRadioButton/FORMS_SprRadioButton.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 78 | },"Disabled":false,"id":"63ea8f2a-37fc-4e44-a605-d4728e513fa4","IsCreationKey":false,"Key":1.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 79 | {"$Keyframe":"","Channels":{ 80 | "0":{"$SpriteFrameKeyframe":"","Id":{"name":"d28694ca-370a-4d8b-9a4e-fe30261ca472","path":"sprites/FORMS_SprRadioButton/FORMS_SprRadioButton.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, 81 | },"Disabled":false,"id":"7070f28b-e230-4f9e-af1b-eb4f72f741b9","IsCreationKey":false,"Key":2.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, 82 | ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, 83 | ], 84 | "visibleRange":null, 85 | "volume":1.0, 86 | "xorigin":0, 87 | "yorigin":0, 88 | }, 89 | "swatchColours":null, 90 | "swfPrecision":2.525, 91 | "textureGroupId":{ 92 | "name":"Default", 93 | "path":"texturegroups/Default", 94 | }, 95 | "type":0, 96 | "VTile":false, 97 | "width":48, 98 | } -------------------------------------------------------------------------------- /Forms.resource_order: -------------------------------------------------------------------------------- 1 | { 2 | "FolderOrderSettings":[ 3 | {"name":"FontAwesome6.5.1","order":3,"path":"folders/FontAwesome6.5.1.yy",}, 4 | {"name":"Forms","order":4,"path":"folders/Forms.yy",}, 5 | {"name":"Fonts","order":1,"path":"folders/Forms/Fonts.yy",}, 6 | {"name":"Scripts","order":2,"path":"folders/Forms/Scripts.yy",}, 7 | {"name":"Shaders","order":4,"path":"folders/Forms/Shaders.yy",}, 8 | {"name":"Sprites","order":3,"path":"folders/Forms/Sprites.yy",}, 9 | {"name":"Test","order":5,"path":"folders/Test.yy",}, 10 | {"name":"ContextMenus","order":3,"path":"folders/Test/ContextMenus.yy",}, 11 | {"name":"Widgets","order":2,"path":"folders/Test/Widgets.yy",}, 12 | ], 13 | "ResourceOrderSettings":[ 14 | {"name":"FA_FntBrands12","order":1,"path":"fonts/FA_FntBrands12/FA_FntBrands12.yy",}, 15 | {"name":"FA_FntRegular12","order":2,"path":"fonts/FA_FntRegular12/FA_FntRegular12.yy",}, 16 | {"name":"FA_FntSolid12","order":3,"path":"fonts/FA_FntSolid12/FA_FntSolid12.yy",}, 17 | {"name":"RmTest","order":1,"path":"rooms/RmTest/RmTest.yy",}, 18 | {"name":"FileContextMenu","order":1,"path":"scripts/FileContextMenu/FileContextMenu.yy",}, 19 | {"name":"FORMS_ApplicationSurface","order":20,"path":"scripts/FORMS_ApplicationSurface/FORMS_ApplicationSurface.yy",}, 20 | {"name":"FORMS_Box","order":1,"path":"scripts/FORMS_Box/FORMS_Box.yy",}, 21 | {"name":"FORMS_Color","order":20,"path":"scripts/FORMS_Color/FORMS_Color.yy",}, 22 | {"name":"FORMS_ColorPicker","order":2,"path":"scripts/FORMS_ColorPicker/FORMS_ColorPicker.yy",}, 23 | {"name":"FORMS_CompoundWidget","order":3,"path":"scripts/FORMS_CompoundWidget/FORMS_CompoundWidget.yy",}, 24 | {"name":"FORMS_Container","order":4,"path":"scripts/FORMS_Container/FORMS_Container.yy",}, 25 | {"name":"FORMS_ContextMenu","order":6,"path":"scripts/FORMS_ContextMenu/FORMS_ContextMenu.yy",}, 26 | {"name":"FORMS_Dock","order":7,"path":"scripts/FORMS_Dock/FORMS_Dock.yy",}, 27 | {"name":"FORMS_Dropdown","order":8,"path":"scripts/FORMS_Dropdown/FORMS_Dropdown.yy",}, 28 | {"name":"FORMS_KeyboardShortcut","order":9,"path":"scripts/FORMS_KeyboardShortcut/FORMS_KeyboardShortcut.yy",}, 29 | {"name":"FORMS_MenuBar","order":10,"path":"scripts/FORMS_MenuBar/FORMS_MenuBar.yy",}, 30 | {"name":"FORMS_NodeGraph","order":11,"path":"scripts/FORMS_NodeGraph/FORMS_NodeGraph.yy",}, 31 | {"name":"FORMS_Pen","order":12,"path":"scripts/FORMS_Pen/FORMS_Pen.yy",}, 32 | {"name":"FORMS_Question","order":21,"path":"scripts/FORMS_Question/FORMS_Question.yy",}, 33 | {"name":"FORMS_RootWidget","order":13,"path":"scripts/FORMS_RootWidget/FORMS_RootWidget.yy",}, 34 | {"name":"FORMS_Scrollbar","order":14,"path":"scripts/FORMS_Scrollbar/FORMS_Scrollbar.yy",}, 35 | {"name":"FORMS_ScrollPane","order":15,"path":"scripts/FORMS_ScrollPane/FORMS_ScrollPane.yy",}, 36 | {"name":"FORMS_Toolbar","order":22,"path":"scripts/FORMS_Toolbar/FORMS_Toolbar.yy",}, 37 | {"name":"FORMS_Tree","order":16,"path":"scripts/FORMS_Tree/FORMS_Tree.yy",}, 38 | {"name":"FORMS_Widget","order":17,"path":"scripts/FORMS_Widget/FORMS_Widget.yy",}, 39 | {"name":"FORMS_Window","order":18,"path":"scripts/FORMS_Window/FORMS_Window.yy",}, 40 | {"name":"FORMS_Workspace","order":19,"path":"scripts/FORMS_Workspace/FORMS_Workspace.yy",}, 41 | {"name":"TestControlsScrollPane","order":5,"path":"scripts/TestControlsScrollPane/TestControlsScrollPane.yy",}, 42 | {"name":"TestUI","order":1,"path":"scripts/TestUI/TestUI.yy",}, 43 | {"name":"TestWelcomeScrollPane","order":2,"path":"scripts/TestWelcomeScrollPane/TestWelcomeScrollPane.yy",}, 44 | {"name":"TestWorkspace","order":3,"path":"scripts/TestWorkspace/TestWorkspace.yy",}, 45 | {"name":"FORMS_SprColorPickerCircle","order":11,"path":"sprites/FORMS_SprColorPickerCircle/FORMS_SprColorPickerCircle.yy",}, 46 | {"name":"FORMS_SprEyeDropper","order":12,"path":"sprites/FORMS_SprEyeDropper/FORMS_SprEyeDropper.yy",}, 47 | {"name":"FORMS_SprRadioButton","order":1,"path":"sprites/FORMS_SprRadioButton/FORMS_SprRadioButton.yy",}, 48 | {"name":"FORMS_SprRectangle","order":2,"path":"sprites/FORMS_SprRectangle/FORMS_SprRectangle.yy",}, 49 | {"name":"FORMS_SprRound4","order":3,"path":"sprites/FORMS_SprRound4/FORMS_SprRound4.yy",}, 50 | {"name":"FORMS_SprRound8","order":4,"path":"sprites/FORMS_SprRound8/FORMS_SprRound8.yy",}, 51 | {"name":"FORMS_SprScrollableX","order":5,"path":"sprites/FORMS_SprScrollableX/FORMS_SprScrollableX.yy",}, 52 | {"name":"FORMS_SprScrollableY","order":6,"path":"sprites/FORMS_SprScrollableY/FORMS_SprScrollableY.yy",}, 53 | {"name":"FORMS_SprShadow","order":7,"path":"sprites/FORMS_SprShadow/FORMS_SprShadow.yy",}, 54 | {"name":"FORMS_SprSlider","order":8,"path":"sprites/FORMS_SprSlider/FORMS_SprSlider.yy",}, 55 | {"name":"FORMS_SprTab","order":9,"path":"sprites/FORMS_SprTab/FORMS_SprTab.yy",}, 56 | {"name":"FORMS_SprTabWorkspace","order":10,"path":"sprites/FORMS_SprTabWorkspace/FORMS_SprTabWorkspace.yy",}, 57 | {"name":"SprSponzaBBMOD","order":4,"path":"sprites/SprSponzaBBMOD/SprSponzaBBMOD.yy",}, 58 | ], 59 | } -------------------------------------------------------------------------------- /scripts/FORMS_Dropdown/FORMS_Dropdown.gml: -------------------------------------------------------------------------------- 1 | /// @func FORMS_DropdownProps() 2 | /// 3 | /// @extends FORMS_ContainerProps 4 | /// 5 | /// @desc Properties accepted by the constructor of {@link FORMS_Dropdown}. 6 | function FORMS_DropdownProps(): FORMS_ContainerProps() constructor 7 | { 8 | /// @var {Struct.FORMS_Container, Undefined} A container that opened this dropdown or `undefined`. 9 | Container = undefined; 10 | } 11 | 12 | /// @func FORMS_Dropdown(_id, _values, _index, _width[, _props]) 13 | /// 14 | /// @extends FORMS_Container 15 | /// 16 | /// @desc A container that draws options of a [dropdown](./FORMS_Pen.dropdown.html). 17 | /// 18 | /// @param {String} _id The ID of the dropdown that opened this. 19 | /// @param {Array} _values An array of values to select from. 20 | /// @param {Real} _index The index of the currently selected value. 21 | /// @param {Real} _width The width of the dropdown that opened this. 22 | /// @param {Struct.FORMS_DropdownProps, Undefined} [_props] Properties to create the container with or `undefined`. 23 | function FORMS_Dropdown(_id, _values, _index, _width, _props = undefined): FORMS_Container(_props) constructor 24 | { 25 | static Container_layout = layout; 26 | static Container_update = update; 27 | static Container_draw = draw; 28 | 29 | /// @var {String} The ID of the dropdown that opened this. 30 | /// @readonly 31 | DropdownId = _id; 32 | 33 | /// @var {Array} An array of values to select from. 34 | /// @readonly 35 | DropdownValues = _values; 36 | 37 | /// @var {Real} The index of the currently selected value. 38 | /// @readonly 39 | DropdownIndex = _index; 40 | 41 | /// @var {Real} The width of the dropdown that opened this. 42 | /// @readonly 43 | DropdownWidth = _width; 44 | 45 | /// @var {Bool} If `true` then the size of the container is recomputed from its contents the next time method 46 | /// [layout](./FORMS_Widget.layout.html) is called. Defaults to `true`. 47 | ContentFit = true; 48 | 49 | /// @var {Constant.Color} The tint color of the background sprite. Defaults to `0x181818`. 50 | BackgroundColor = 0x181818; 51 | 52 | /// @var {Struct.FORMS_Container, Undefined} A container that opened this dropdown or `undefined` (default). 53 | /// @readonly 54 | Container = forms_get_prop(_props, "Container"); 55 | 56 | /// @private 57 | __containerScrollX = undefined; 58 | 59 | /// @private 60 | __containerScrollY = undefined; 61 | 62 | static draw_content = function () 63 | { 64 | var _x = 0; 65 | var _y = 0; 66 | var _values = DropdownValues; 67 | var _index = DropdownIndex; 68 | var _dropdownWidth = DropdownWidth; 69 | var _lineHeight = string_height("M"); 70 | var _select = undefined; 71 | 72 | for (var i = 0; i < array_length(_values); ++i) 73 | { 74 | var _option = _values[i]; 75 | var _value = string( 76 | is_struct(_option) 77 | ? (_option[$ "Text"] ?? _option.Value) 78 | : _option 79 | ); 80 | var _stringWidth = string_width(_value); 81 | var _valueWidth = max(_stringWidth, _dropdownWidth); 82 | 83 | if (Pen.is_mouse_over(_x, _y, _valueWidth, _lineHeight)) 84 | { 85 | forms_draw_rectangle(_x, _y, _valueWidth, _lineHeight, c_white, 0.3); 86 | if (forms_mouse_check_button_pressed(mb_left)) 87 | { 88 | _select = i; 89 | } 90 | forms_set_cursor(cr_handpoint); 91 | if (_stringWidth > __realWidth) 92 | { 93 | forms_set_tooltip(_value); 94 | } 95 | } 96 | else if (i == _index) 97 | { 98 | forms_draw_rectangle(_x, _y, _valueWidth, _lineHeight, c_white, 0.1); 99 | } 100 | 101 | draw_text(_x, _y, _value); 102 | 103 | _y += _lineHeight; 104 | } 105 | 106 | if (_select != undefined) 107 | { 108 | var _option = _values[_select]; 109 | var _value = is_struct(_option) ? _option.Value : _option; 110 | forms_return_result(DropdownId, _value); 111 | destroy_later(); 112 | } 113 | 114 | ContentWidth = _dropdownWidth; 115 | ContentHeight = _y; 116 | 117 | return self; 118 | } 119 | 120 | static layout = function () 121 | { 122 | var _windowHeight = window_get_height(); 123 | __realHeight = min(__realHeight, _windowHeight); 124 | __realX = clamp(__realX, 0, window_get_width() - __realWidth); 125 | __realY = clamp(__realY, 0, _windowHeight - __realHeight); 126 | Container_layout(); 127 | return self; 128 | } 129 | 130 | static update = function (_deltaTime) 131 | { 132 | Container_update(_deltaTime); 133 | var _scrollChanged = false; 134 | if (Container != undefined) 135 | { 136 | __containerScrollX ??= Container.ScrollX; 137 | __containerScrollY ??= Container.ScrollY; 138 | if (__containerScrollX != Container.ScrollX || __containerScrollY != Container.ScrollY) 139 | { 140 | _scrollChanged = true; 141 | } 142 | } 143 | if (_scrollChanged || (!is_mouse_over() && mouse_check_button_pressed(mb_left))) 144 | { 145 | destroy_later(); 146 | } 147 | return self; 148 | } 149 | 150 | static draw = function () 151 | { 152 | var _shadowOffset = 16; 153 | draw_sprite_stretched_ext( 154 | FORMS_SprShadow, 0, 155 | __realX - _shadowOffset, 156 | __realY - _shadowOffset, 157 | __realWidth + _shadowOffset * 2, 158 | __realHeight + _shadowOffset * 2, 159 | c_black, 0.5); 160 | Container_draw(); 161 | return self; 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /scripts/TestControlsScrollPane/TestControlsScrollPane.gml: -------------------------------------------------------------------------------- 1 | function TestControlsScrollPane(): FORMS_ScrollPane() constructor 2 | { 3 | Name = "Controls Test"; 4 | Icon = FA_ESolid.List; 5 | 6 | Checked1 = false; 7 | Checked2 = true; 8 | Radio = 0; 9 | Slider = 0; 10 | DropdownValues = [ 11 | "Some", 12 | "Stuff", 13 | "Here", 14 | "That", 15 | "You", 16 | "Can", 17 | "Select", 18 | ]; 19 | DropdownIndex = 0; 20 | InputString = ""; 21 | InputPassword = ""; 22 | InputReal = 0; 23 | Color = new FORMS_Color(0xAA000000 | global.formsAccentColor); 24 | var _propsFolder = { 25 | Icon: FA_ESolid.FolderOpen, 26 | IconCollapsed: FA_ESolid.Folder, 27 | IconFont: FA_FntSolid12, 28 | IconColor: c_gray, 29 | }; 30 | var _propsFile = { 31 | Icon: FA_ESolid.File, 32 | IconFont: FA_FntSolid12, 33 | }; 34 | Tree = new FORMS_Tree([ 35 | new FORMS_TreeItem("Item 1", _propsFolder, [ 36 | new FORMS_TreeItem("Item A", _propsFile), 37 | new FORMS_TreeItem("Item B", _propsFile), 38 | ]), 39 | new FORMS_TreeItem("Item 2", _propsFolder, [ 40 | new FORMS_TreeItem("Item C", _propsFolder, [ 41 | new FORMS_TreeItem("Some", _propsFile), 42 | new FORMS_TreeItem("Folder", _propsFolder, [ 43 | new FORMS_TreeItem("Oh", _propsFile), 44 | new FORMS_TreeItem("Yeah", _propsFile), 45 | ]), 46 | new FORMS_TreeItem("Here", _propsFile), 47 | ]), 48 | new FORMS_TreeItem("Item D", _propsFile), 49 | ]), 50 | ]); 51 | 52 | static draw_content = function () 53 | { 54 | var _props; 55 | 56 | Pen.start() 57 | .text("Some stuff ") 58 | .text("Some other stuff!", 59 | { 60 | Color: global.formsAccentColor, 61 | Cursor: cr_handpoint, 62 | Tooltip: "Oh yeah!" 63 | }) 64 | .nl(); 65 | 66 | if (Pen.section("Buttons")) 67 | { 68 | if (Pen.button("Click me!", { Tooltip: "Click the button!" })) 69 | { 70 | var _question = new FORMS_Question("You've clicked the button!", function (_button) {}); 71 | forms_get_root().add_child(_question); 72 | } 73 | Pen.nl(); 74 | Pen.end_section(); 75 | } 76 | 77 | if (Pen.section("Checkboxes")) 78 | { 79 | if (Pen.checkbox(Checked1) | Pen.link(" Label 1")) 80 | { 81 | Checked1 = !Checked1; 82 | } 83 | Pen.nl(); 84 | 85 | _props = { Tooltip: "Checkbox with a clickable label!" }; 86 | if (Pen.checkbox(Checked2, _props) | Pen.link(" Label 2", _props)) 87 | { 88 | Checked2 = !Checked2; 89 | } 90 | Pen.nl(); 91 | Pen.end_section(); 92 | } 93 | 94 | if (Pen.section("Radio buttons")) 95 | { 96 | if (Pen.radio(Radio == 0) | Pen.link(" Radio 1")) 97 | { 98 | Radio = 0; 99 | } 100 | Pen.nl(); 101 | 102 | if (Pen.radio(Radio == 1) | Pen.link(" Radio 2")) 103 | { 104 | Radio = 1; 105 | } 106 | Pen.nl(); 107 | 108 | if (Pen.radio(Radio == 2) | Pen.link(" Radio 3")) 109 | { 110 | Radio = 2; 111 | } 112 | Pen.nl(); 113 | Pen.end_section(); 114 | } 115 | 116 | if (Pen.section("Sliders")) 117 | { 118 | if (Pen.slider("slider", Slider, -100, 100, 119 | { 120 | Pre: "X: ", 121 | Post: "%", 122 | Integers: true, 123 | Tooltip: "This is the best slider ever!" 124 | })) 125 | { 126 | Slider = Pen.get_result(); 127 | } 128 | Pen.text(" Slider").nl(); 129 | Pen.end_section(); 130 | } 131 | 132 | if (Pen.section("Dropdowns")) 133 | { 134 | if (Pen.dropdown("dropdown", DropdownIndex, DropdownValues)) 135 | { 136 | DropdownIndex = Pen.get_result(); 137 | } 138 | Pen.text(" Dropdown").nl(); 139 | Pen.end_section(); 140 | } 141 | 142 | if (Pen.section("Inputs")) 143 | { 144 | if (Pen.input("input-string", InputString, { Placeholder: "Some text here..." })) 145 | { 146 | InputString = Pen.get_result(); 147 | } 148 | Pen.text(" String input").nl(); 149 | 150 | if (Pen.input("input-password", InputPassword, { Placeholder: "Your password", Secret: true })) 151 | { 152 | InputPassword = Pen.get_result(); 153 | } 154 | Pen.text(" Password input").nl(); 155 | 156 | if (Pen.input("input-real", InputReal, { Tooltip: "This one has a tooltip!" })) 157 | { 158 | InputReal = Pen.get_result(); 159 | } 160 | Pen.text(" Real input").nl(); 161 | 162 | if (Pen.color("input-color", Color)) 163 | { 164 | Color = Pen.get_result(); 165 | } 166 | Pen.text(" Color input").nl(); 167 | 168 | Pen.end_section(); 169 | } 170 | 171 | if (Pen.section("Icons")) 172 | { 173 | Pen.icon_regular(FA_ERegular.AddressBook, { Width: 24 }); 174 | Pen.move(2); 175 | Pen.icon_solid(FA_ESolid.TruckFast, { Width: 24 }); 176 | Pen.move(2); 177 | Pen.icon_brands(FA_EBrands.Github, { Width: 24 }); 178 | Pen.nl(); 179 | Pen.end_section(); 180 | } 181 | 182 | if (Pen.section("Trees")) 183 | { 184 | Tree.draw(Pen); 185 | Pen.end_section(); 186 | } 187 | 188 | if (Pen.section("Sections")) 189 | { 190 | Pen.text("You").nl(); 191 | 192 | if (Pen.section("Section 1")) 193 | { 194 | Pen.text("Can").nl(); 195 | 196 | if (Pen.section("Section 1a")) 197 | { 198 | Pen.text("Also").nl(); 199 | Pen.end_section(); 200 | } 201 | 202 | if (Pen.section("Section 1b")) 203 | { 204 | Pen.text("Have").nl(); 205 | Pen.end_section(); 206 | } 207 | 208 | if (Pen.section("Section 1c")) 209 | { 210 | Pen.text("Sections").nl(); 211 | Pen.end_section(); 212 | } 213 | 214 | Pen.end_section(); 215 | } 216 | 217 | if (Pen.section("Section 2")) 218 | { 219 | Pen.text("Inside").nl(); 220 | 221 | if (Pen.section("Section 2a")) 222 | { 223 | Pen.text("Sections").nl(); 224 | Pen.end_section(); 225 | } 226 | 227 | if (Pen.section("Section 2b")) 228 | { 229 | Pen.text("Like").nl(); 230 | Pen.end_section(); 231 | } 232 | 233 | if (Pen.section("Section 2c")) 234 | { 235 | Pen.text("This").nl(); 236 | Pen.end_section(); 237 | } 238 | 239 | Pen.end_section(); 240 | } 241 | 242 | Pen.end_section(); 243 | } 244 | 245 | Pen.finish(); 246 | 247 | FORMS_CONTENT_UPDATE_SIZE; 248 | 249 | return self; 250 | } 251 | } 252 | -------------------------------------------------------------------------------- /scripts/FORMS_ApplicationSurface/FORMS_ApplicationSurface.gml: -------------------------------------------------------------------------------- 1 | /// @func FORMS_ApplicationSurfaceProps() 2 | /// 3 | /// @extends FORMS_CompoundWidgetProps 4 | /// 5 | /// @desc Properties accepted by the constructor of {@link FORMS_ApplicationSurface}. 6 | function FORMS_ApplicationSurfaceProps(): FORMS_CompoundWidgetProps() constructor 7 | { 8 | /// @var {Id.Surface, Undefined} An ID of a surface to draw instead of the application surface or `undefined` to 9 | /// draw the application surface. 10 | Surface = undefined; 11 | 12 | /// @var {Bool, Undefined} Whether to draw the surface stretched (`true`) or scaled while keeping its aspect ratio 13 | /// (`false`). 14 | Stretch = undefined; 15 | 16 | /// @var {Bool, Undefined} Whether to rescale the surface to the form (`true`) or keep its dimensions unchanged 17 | /// (`false`). 18 | Resize = undefined; 19 | 20 | /// @var {Constant.Color, Undefined} The color to fill the empty space around the surface with. 21 | BackgroundColor = undefined; 22 | 23 | /// @var {Real, Undefined} The alpha value of the background. 24 | BackgroundAlpha = forms_get_prop(_props, "BackgroundColor") ?? 1.0; 25 | } 26 | 27 | /// @func FORMS_ApplicationSurface([_props[, _children]]) 28 | /// 29 | /// @extends FORMS_CompoundWidget 30 | /// 31 | /// @desc A collection of widget drawn on top of a surface (by default the application surface). 32 | /// 33 | /// @param {Struct.FORMS_ApplicationSurfaceProps, Undefined} [_props] Properties to create the surface widget with or 34 | /// `undefined` (default). 35 | /// @param {Array, Undefined} [_children] An array of child widgets to add to the surface widget or 36 | /// `undefined` (default). 37 | /* beautify ignore:start */ 38 | function FORMS_ApplicationSurface(_props = undefined, _children = undefined): FORMS_CompoundWidget(_props, _children) constructor 39 | /* beautify ignore:end */ 40 | { 41 | static CompoundWidget_layout = layout; 42 | static CompoundWidget_draw = draw; 43 | 44 | /// @var {Id.Surface, Undefined} An ID of a surface to draw instead of the application surface or `undefined` 45 | /// (default) to draw the application surface. 46 | Surface = forms_get_prop(_props, "Surface"); 47 | 48 | /// @var {Bool} Whether to draw the surface stretched (`true`) or scaled while keeping its aspect ratio (`false`, 49 | /// default). 50 | Stretch = forms_get_prop(_props, "Stretch") ?? false; 51 | 52 | /// @var {Bool, Undefined} Whether to rescale the surface to the form (`true`) or keep its dimensions unchanged 53 | /// (`false`). 54 | Resize = forms_get_prop(_props, "Resize") ?? false; 55 | 56 | /// @var {Constant.Color} The color to fill the empty space around the surface with. Defaults to `c_black`. 57 | BackgroundColor = forms_get_prop(_props, "BackgroundColor") ?? c_black; 58 | 59 | /// @var {Real} The alpha value of the background. Defaults to 1. 60 | BackgroundAlpha = forms_get_prop(_props, "BackgroundColor") ?? 1.0; 61 | 62 | /// @var {Real} The absolute X position of the drawn surface. Updated in [layout](./FORMS_Widget.layout.html). 63 | /// @readonly 64 | SurfaceX = 0; 65 | 66 | /// @var {Real} The absolute Y position of the drawn surface. Updated in [layout](./FORMS_Widget.layout.html). 67 | /// @readonly 68 | SurfaceY = 0; 69 | 70 | /// @var {Real} The actual width of the drawn surface after it's stretched or scaled. Updated in 71 | /// [layout](./FORMS_Widget.layout.html). 72 | /// @readonly 73 | SurfaceWidth = 0; 74 | 75 | /// @var {Real} The actual height of the drawn surface after it's stretched or scaled. Updated in 76 | /// [layout](./FORMS_Widget.layout.html). 77 | /// @readonly 78 | SurfaceHeight = 0; 79 | 80 | /// @var {Real} The X position of the mouse, relative to the surface's position. Updated in 81 | /// [layout](./FORMS_Widget.layout.html). 82 | /// @readonly 83 | MouseX = 0; 84 | 85 | /// @var {Real} The Y position of the mouse, relative to the surface's position. Updated in 86 | /// [layout](./FORMS_Widget.layout.html). 87 | /// @readonly 88 | MouseY = 0; 89 | 90 | /// @func get_surface() 91 | /// 92 | /// @desc Retrieves the ID of the surface that the widget draws. 93 | /// 94 | /// @return {Id.Surface} The ID of the surface that the widget draws or -1 if 95 | /// {@link FORMS_ApplicationSurface.Surface} is `undefined` and the application surface is disabled. 96 | static get_surface = function () 97 | { 98 | gml_pragma("forceinline"); 99 | return Surface ?? (application_surface_is_enabled() ? application_surface : -1); 100 | } 101 | 102 | static layout = function () 103 | { 104 | CompoundWidget_layout(); 105 | 106 | var _surface = get_surface(); 107 | 108 | if (Resize) 109 | { 110 | var _aspect = __realWidth / __realHeight; 111 | var _aspectSurface = surface_get_width(_surface) / surface_get_height(_surface); 112 | 113 | if (_aspectSurface != _aspect) 114 | { 115 | surface_resize(_surface, __realWidth, __realHeight); 116 | } 117 | } 118 | 119 | if (Stretch || Resize) 120 | { 121 | SurfaceX = __realX; 122 | SurfaceY = __realY; 123 | SurfaceWidth = __realWidth; 124 | SurfaceHeight = __realHeight; 125 | } 126 | else if (surface_exists(_surface)) 127 | { 128 | var _aspect = __realWidth / __realHeight; 129 | var _aspectSurface = surface_get_width(_surface) / surface_get_height(_surface); 130 | 131 | if (_aspectSurface > _aspect) 132 | { 133 | SurfaceWidth = __realWidth; 134 | SurfaceHeight = __realWidth / _aspectSurface; 135 | } 136 | else 137 | { 138 | SurfaceHeight = __realHeight; 139 | SurfaceWidth = __realHeight * _aspectSurface; 140 | } 141 | 142 | SurfaceX = floor(__realX + (__realWidth - SurfaceWidth) / 2); 143 | SurfaceY = floor(__realY + (__realHeight - SurfaceHeight) / 2); 144 | } 145 | 146 | MouseX = forms_mouse_get_x() - SurfaceX; 147 | MouseY = forms_mouse_get_y() - SurfaceY; 148 | } 149 | 150 | /// @func is_mouse_over() 151 | /// 152 | /// @desc Checks whether mouse position is inside of a rectangle defined by the position and size of the surface 153 | /// that this widget draws. 154 | /// 155 | /// @return {Bool} Returns `true` if mouse is inside of the rectangle. 156 | /// 157 | /// @example 158 | /// The following example shows how to check whether the is mouse cursor inside of a surface drawn by a widget 159 | /// `viewport`, taking into account which widget is currently hovered (the top level widget underneath the mouse 160 | /// cursor must also be `viewport`). 161 | /// ```gml 162 | /// /// @desc Create event 163 | /// gui = new FORMS_RootWidget(); 164 | /// viewport = new FORMS_ApplicationSurface({ Width: "100%", Height: "100%" }); 165 | /// gui.add_child(viewport); 166 | /// 167 | /// /// @desc Step event 168 | /// gui.update(delta_time); 169 | /// var _mouseInViewport = (gui.WidgetHovered == viewport && viewport.is_mouse_over()); 170 | /// if (_mouseInViewport && mouse_check_button_pressed(mb_left)) 171 | /// { 172 | /// // Use has clicked inside of the viewport... 173 | /// } 174 | /// ``` 175 | static is_mouse_over = function () 176 | { 177 | gml_pragma("forceinline"); 178 | return (MouseX >= 0 && MouseX < SurfaceWidth 179 | && MouseY >= 0 && MouseY < SurfaceHeight); 180 | } 181 | 182 | static draw = function () 183 | { 184 | forms_draw_rectangle(__realX, __realY, __realWidth, __realHeight, BackgroundColor, BackgroundAlpha); 185 | 186 | var _surface = get_surface(); 187 | if (surface_exists(_surface)) 188 | { 189 | draw_surface_stretched(_surface, SurfaceX, SurfaceY, SurfaceWidth, SurfaceHeight); 190 | } 191 | 192 | forms_scissor_rect_push(__realX, __realY, __realWidth, __realHeight); 193 | CompoundWidget_draw(); 194 | forms_scissor_rect_pop(); 195 | 196 | return self; 197 | } 198 | } 199 | -------------------------------------------------------------------------------- /scripts/FORMS_Workspace/FORMS_Workspace.gml: -------------------------------------------------------------------------------- 1 | /// @func FORMS_WorkspaceProps() 2 | /// 3 | /// @extends FORMS_WidgetProps 4 | /// 5 | /// @desc Properties accepted by the constructor of {@link FORMS_Workspace}. 6 | function FORMS_WorkspaceProps(): FORMS_WidgetProps() constructor 7 | { 8 | /// @var {Constant.Color, Undefined} The background color of the workspace. 9 | BackgroundColor = undefined; 10 | 11 | /// @var {Real, Undefined} The alpha value of the background. 12 | BackgroundAlpha = undefined; 13 | } 14 | 15 | /// @func FORMS_Workspace([_props]) 16 | /// 17 | /// @extends FORMS_Widget 18 | /// 19 | /// @desc A container that widgets who represent individual workspaces are added to as tabs. 20 | /// 21 | /// @param {Struct.FORMS_WorkspaceProps, Undefined} [_props] Properties to create the workspace with or `undefined` 22 | /// (default). 23 | function FORMS_Workspace(_props = undefined): FORMS_Widget(_props) constructor 24 | { 25 | static Widget_update = update; 26 | 27 | /// @var {Constant.Color} The background color of the workspace. Defaults to `0x202020`. 28 | BackgroundColor = forms_get_prop(_props, "BackgroundColor") ?? 0x202020; 29 | 30 | /// @var {Real} The alpha value of the background. Defaults to 1. 31 | BackgroundAlpha = forms_get_prop(_props, "BackgroundAlpha") ?? 1.0; 32 | 33 | /// @var {Struct.FORMS_WorkspaceTabs} A container that displays the workspace's tabs. 34 | /// @readonly 35 | TabContainer = new FORMS_WorkspaceTabs(); 36 | 37 | TabContainer.Parent = self; 38 | 39 | /// @var {Array} 40 | /// @private 41 | __tabs = []; 42 | 43 | /// @var {Real} 44 | /// @private 45 | __tabCurrent = 0; 46 | 47 | /// @func set_tab(_tabs) 48 | /// 49 | /// @desc Changes the array of widgets tabbed to the workspace. 50 | /// 51 | /// @param {Array} _tabs The new array tabbed widgets. 52 | /// 53 | /// @return {Struct.FORMS_Workspace} Returns `self`. 54 | static set_tabs = function (_tabs) 55 | { 56 | forms_assert(array_length(__tabs) == 0, 57 | "Workspace already has tabs!"); // TODO: Why is this here? :thinking: 58 | __tabs = _tabs; 59 | var i = 0; 60 | repeat(array_length(__tabs)) 61 | { 62 | __tabs[i++].Parent = self; 63 | } 64 | return self; 65 | } 66 | 67 | /// @func add_tab(_widget) 68 | /// 69 | /// @desc Tabs a new widget to the dock. 70 | /// 71 | /// @param {Struct.FORMS_Widget} _widget The widget to add to the workspace's tabs. 72 | /// 73 | /// @return {Struct.FORMS_Workspace} Returns `self`. 74 | static add_tab = function (_widget) 75 | { 76 | forms_assert(_widget.Parent == undefined, "Widget already has a parent!"); 77 | array_push(__tabs, _widget); 78 | _widget.Parent = self; 79 | return self; 80 | } 81 | 82 | static layout = function () 83 | { 84 | FORMS_LAYOUT_GENERATED; 85 | 86 | var _parentX = __realX; 87 | var _parentY = __realY; 88 | var _parentWidth = __realWidth; 89 | var _parentHeight = __realHeight; 90 | 91 | with(TabContainer) 92 | { 93 | var _autoWidth = get_auto_width(); 94 | var _autoHeight = get_auto_height(); 95 | 96 | __realWidth = floor(Width.get_absolute(_parentWidth, _autoWidth)); 97 | __realHeight = floor(Height.get_absolute(_parentHeight, _autoHeight)); 98 | __realX = floor(_parentX + X.get_absolute(_parentWidth, _autoWidth)); 99 | __realY = floor(_parentY + Y.get_absolute(_parentHeight, _autoHeight)); 100 | 101 | layout(); 102 | } 103 | 104 | if (__tabCurrent < array_length(__tabs)) 105 | { 106 | var _tab = __tabs[__tabCurrent]; 107 | _tab.__realX = _parentX; 108 | _tab.__realY = _parentY + TabContainer.__realHeight; 109 | _tab.__realWidth = _parentWidth; 110 | _tab.__realHeight = _parentHeight - TabContainer.__realHeight; 111 | _tab.layout(); 112 | } 113 | 114 | return self; 115 | } 116 | 117 | static update = function (_deltaTime) 118 | { 119 | Widget_update(_deltaTime); 120 | TabContainer.update(_deltaTime); 121 | if (__tabCurrent < array_length(__tabs)) 122 | { 123 | var _tab = __tabs[__tabCurrent]; 124 | _tab.update(_deltaTime); 125 | } 126 | return self; 127 | } 128 | 129 | static draw = function () 130 | { 131 | forms_draw_rectangle( 132 | __realX, __realY, __realWidth, __realHeight, 133 | BackgroundColor, BackgroundAlpha); 134 | 135 | var _tabCurrent = __tabCurrent; // Backup before it changes! 136 | TabContainer.draw(); 137 | if (_tabCurrent < array_length(__tabs)) 138 | { 139 | __tabs[_tabCurrent].draw(); 140 | } 141 | 142 | return self; 143 | } 144 | } 145 | 146 | /// @func FORMS_WorkspaceTabsProps() 147 | /// 148 | /// @extends FORMS_ContainerProps 149 | /// 150 | /// @desc Properties accepted by the constructor of {@link FORMS_WorkspaceTabs}. 151 | function FORMS_WorkspaceTabsProps(): FORMS_ContainerProps() constructor {} 152 | 153 | /// @func FORMS_WorkspaceTabs([_props]) 154 | /// 155 | /// @extends FORMS_Container 156 | /// 157 | /// @desc A container that displays tabs added to a {@link FORMS_Workspace}. 158 | /// 159 | /// @params {Struct.FORMS_WorkspaceTabsProps, Undefined} [_props] Properties to create the workspace tabs container with 160 | /// or `undefined` (default). 161 | function FORMS_WorkspaceTabs(_props = undefined): FORMS_Container(_props) constructor 162 | { 163 | /// @var {Struct.FORMS_UnitValue} The width of the workspace tabs container. Defaults to 100%. 164 | Width.from_props(_props, "Width", 100, FORMS_EUnit.Percent); 165 | 166 | /// @var {Struct.FORMS_UnitValue} The height of the workspace tabs container. Defaults to 32px. 167 | Height.from_props(_props, "Height", 32); 168 | 169 | // TODO: Docs 170 | BackgroundColor = forms_get_prop(_props, "BackgroundColor") ?? 0x181818; 171 | 172 | /// @var {Bool} Whether the default scrolling direction of the container is vertical (`true`) or horizontal 173 | /// (`false`). Defaults to `false`. 174 | IsDefaultScrollVertical = forms_get_prop(_props, "IsDefaultScrollVertical") ?? false; 175 | 176 | static draw_content = function () 177 | { 178 | var _workspace = Parent; 179 | var _tabs = _workspace.__tabs; 180 | var _tabCount = array_length(_tabs); 181 | var _tabCurrent = _workspace.__tabCurrent; 182 | var _tabIndex = 0; 183 | 184 | var _tabPadding = 9; 185 | Pen.PaddingX = 4; 186 | Pen.start(); 187 | 188 | repeat(_tabCount) 189 | { 190 | var _tab = _tabs[_tabIndex]; 191 | var _iconSpace = ((_tab.Icon != undefined) ? 24 : 0); 192 | if (_tabCurrent == _tabIndex) 193 | { 194 | draw_sprite_stretched_ext( 195 | FORMS_SprTabWorkspace, 0, 196 | Pen.X, 0, 197 | _tabPadding 198 | + _iconSpace 199 | + string_width(_tab.Name) + ((_tabCount > 1) ? 4 + 16 : 0) 200 | + _tabPadding, 201 | __realHeight, 202 | 0x282828, 1.0 203 | ); 204 | } 205 | Pen.move(_tabPadding); 206 | if (_tab.Icon != undefined) 207 | { 208 | fa_draw(_tab.IconFont, _tab.Icon, Pen.X, Pen.Y); 209 | Pen.move(_iconSpace); 210 | } 211 | if (Pen.link(_tab.Name, { Color: (_tabIndex == _tabCurrent) ? c_white : c_silver })) 212 | { 213 | _tabCurrent = _tabIndex; 214 | _workspace.__tabCurrent = _tabCurrent; 215 | } 216 | if (_tabCount > 1) 217 | { 218 | Pen.move(4); 219 | if (Pen.icon_solid(FA_ESolid.Xmark, { Width: 16, Color: c_gray })) 220 | { 221 | _tab.Parent = undefined; 222 | _tab.destroy(); 223 | 224 | array_delete(_tabs, _tabIndex--, 1); 225 | --_tabCount; 226 | 227 | _tabCurrent = clamp(_tabCurrent, 0, _tabCount - 1); 228 | _workspace.__tabCurrent = _tabCurrent; 229 | } 230 | } 231 | Pen.move(_tabPadding); 232 | ++_tabIndex; 233 | } 234 | 235 | Pen.move(2); 236 | if (Pen.icon_solid(FA_ESolid.Plus, { Width: 24 })) 237 | { 238 | // TODO: Open context menu with workspaces 239 | } 240 | 241 | Pen.finish(); 242 | 243 | ContentWidth = Pen.get_max_x(); 244 | 245 | return self; 246 | } 247 | } 248 | -------------------------------------------------------------------------------- /Forms.yyp: -------------------------------------------------------------------------------- 1 | { 2 | "$GMProject":"", 3 | "%Name":"Forms", 4 | "AudioGroups":[ 5 | {"$GMAudioGroup":"","%Name":"audiogroup_default","name":"audiogroup_default","resourceType":"GMAudioGroup","resourceVersion":"2.0","targets":-1,}, 6 | ], 7 | "configs":{ 8 | "children":[], 9 | "name":"Default", 10 | }, 11 | "defaultScriptType":1, 12 | "Folders":[ 13 | {"$GMFolder":"","%Name":"FontAwesome6.5.1","folderPath":"folders/FontAwesome6.5.1.yy","name":"FontAwesome6.5.1","resourceType":"GMFolder","resourceVersion":"2.0",}, 14 | {"$GMFolder":"","%Name":"Forms","folderPath":"folders/Forms.yy","name":"Forms","resourceType":"GMFolder","resourceVersion":"2.0",}, 15 | {"$GMFolder":"","%Name":"Fonts","folderPath":"folders/Forms/Fonts.yy","name":"Fonts","resourceType":"GMFolder","resourceVersion":"2.0",}, 16 | {"$GMFolder":"","%Name":"Scripts","folderPath":"folders/Forms/Scripts.yy","name":"Scripts","resourceType":"GMFolder","resourceVersion":"2.0",}, 17 | {"$GMFolder":"","%Name":"Shaders","folderPath":"folders/Forms/Shaders.yy","name":"Shaders","resourceType":"GMFolder","resourceVersion":"2.0",}, 18 | {"$GMFolder":"","%Name":"Sprites","folderPath":"folders/Forms/Sprites.yy","name":"Sprites","resourceType":"GMFolder","resourceVersion":"2.0",}, 19 | {"$GMFolder":"","%Name":"Test","folderPath":"folders/Test.yy","name":"Test","resourceType":"GMFolder","resourceVersion":"2.0",}, 20 | {"$GMFolder":"","%Name":"ContextMenus","folderPath":"folders/Test/ContextMenus.yy","name":"ContextMenus","resourceType":"GMFolder","resourceVersion":"2.0",}, 21 | {"$GMFolder":"","%Name":"Widgets","folderPath":"folders/Test/Widgets.yy","name":"Widgets","resourceType":"GMFolder","resourceVersion":"2.0",}, 22 | ], 23 | "IncludedFiles":[ 24 | {"$GMIncludedFile":"","%Name":"LICENSE-FontAwesome.txt","CopyToMask":-1,"filePath":"datafiles","name":"LICENSE-FontAwesome.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, 25 | ], 26 | "isEcma":false, 27 | "LibraryEmitters":[], 28 | "MetaData":{ 29 | "IDEVersion":"2024.11.0.179", 30 | }, 31 | "name":"Forms", 32 | "resources":[ 33 | {"id":{"name":"FA_FntBrands12","path":"fonts/FA_FntBrands12/FA_FntBrands12.yy",},}, 34 | {"id":{"name":"FA_FntRegular12","path":"fonts/FA_FntRegular12/FA_FntRegular12.yy",},}, 35 | {"id":{"name":"FA_FntSolid12","path":"fonts/FA_FntSolid12/FA_FntSolid12.yy",},}, 36 | {"id":{"name":"FORMS_FntNormal","path":"fonts/FORMS_FntNormal/FORMS_FntNormal.yy",},}, 37 | {"id":{"name":"OTest","path":"objects/OTest/OTest.yy",},}, 38 | {"id":{"name":"RmTest","path":"rooms/RmTest/RmTest.yy",},}, 39 | {"id":{"name":"__FA","path":"scripts/__FA/__FA.yy",},}, 40 | {"id":{"name":"__forms","path":"scripts/__forms/__forms.yy",},}, 41 | {"id":{"name":"EditContextMenu","path":"scripts/EditContextMenu/EditContextMenu.yy",},}, 42 | {"id":{"name":"FileContextMenu","path":"scripts/FileContextMenu/FileContextMenu.yy",},}, 43 | {"id":{"name":"FORMS_ApplicationSurface","path":"scripts/FORMS_ApplicationSurface/FORMS_ApplicationSurface.yy",},}, 44 | {"id":{"name":"FORMS_Box","path":"scripts/FORMS_Box/FORMS_Box.yy",},}, 45 | {"id":{"name":"FORMS_Color","path":"scripts/FORMS_Color/FORMS_Color.yy",},}, 46 | {"id":{"name":"FORMS_ColorPicker","path":"scripts/FORMS_ColorPicker/FORMS_ColorPicker.yy",},}, 47 | {"id":{"name":"FORMS_CompoundWidget","path":"scripts/FORMS_CompoundWidget/FORMS_CompoundWidget.yy",},}, 48 | {"id":{"name":"FORMS_Container","path":"scripts/FORMS_Container/FORMS_Container.yy",},}, 49 | {"id":{"name":"FORMS_ContextMenu","path":"scripts/FORMS_ContextMenu/FORMS_ContextMenu.yy",},}, 50 | {"id":{"name":"FORMS_Dock","path":"scripts/FORMS_Dock/FORMS_Dock.yy",},}, 51 | {"id":{"name":"FORMS_Dropdown","path":"scripts/FORMS_Dropdown/FORMS_Dropdown.yy",},}, 52 | {"id":{"name":"FORMS_KeyboardShortcut","path":"scripts/FORMS_KeyboardShortcut/FORMS_KeyboardShortcut.yy",},}, 53 | {"id":{"name":"FORMS_MenuBar","path":"scripts/FORMS_MenuBar/FORMS_MenuBar.yy",},}, 54 | {"id":{"name":"FORMS_NodeGraph","path":"scripts/FORMS_NodeGraph/FORMS_NodeGraph.yy",},}, 55 | {"id":{"name":"FORMS_Pen","path":"scripts/FORMS_Pen/FORMS_Pen.yy",},}, 56 | {"id":{"name":"FORMS_Question","path":"scripts/FORMS_Question/FORMS_Question.yy",},}, 57 | {"id":{"name":"FORMS_RootWidget","path":"scripts/FORMS_RootWidget/FORMS_RootWidget.yy",},}, 58 | {"id":{"name":"FORMS_Scrollbar","path":"scripts/FORMS_Scrollbar/FORMS_Scrollbar.yy",},}, 59 | {"id":{"name":"FORMS_ScrollPane","path":"scripts/FORMS_ScrollPane/FORMS_ScrollPane.yy",},}, 60 | {"id":{"name":"FORMS_Toolbar","path":"scripts/FORMS_Toolbar/FORMS_Toolbar.yy",},}, 61 | {"id":{"name":"FORMS_Tree","path":"scripts/FORMS_Tree/FORMS_Tree.yy",},}, 62 | {"id":{"name":"FORMS_Widget","path":"scripts/FORMS_Widget/FORMS_Widget.yy",},}, 63 | {"id":{"name":"FORMS_Window","path":"scripts/FORMS_Window/FORMS_Window.yy",},}, 64 | {"id":{"name":"FORMS_Workspace","path":"scripts/FORMS_Workspace/FORMS_Workspace.yy",},}, 65 | {"id":{"name":"TestControlsScrollPane","path":"scripts/TestControlsScrollPane/TestControlsScrollPane.yy",},}, 66 | {"id":{"name":"TestStatusBar","path":"scripts/TestStatusBar/TestStatusBar.yy",},}, 67 | {"id":{"name":"TestUI","path":"scripts/TestUI/TestUI.yy",},}, 68 | {"id":{"name":"TestWelcomeScrollPane","path":"scripts/TestWelcomeScrollPane/TestWelcomeScrollPane.yy",},}, 69 | {"id":{"name":"TestWorkspace","path":"scripts/TestWorkspace/TestWorkspace.yy",},}, 70 | {"id":{"name":"FORMS_ShColorWheel","path":"shaders/FORMS_ShColorWheel/FORMS_ShColorWheel.yy",},}, 71 | {"id":{"name":"FORMS_SprColor","path":"sprites/FORMS_SprColor/FORMS_SprColor.yy",},}, 72 | {"id":{"name":"FORMS_SprColorPickerCircle","path":"sprites/FORMS_SprColorPickerCircle/FORMS_SprColorPickerCircle.yy",},}, 73 | {"id":{"name":"FORMS_SprEyeDropper","path":"sprites/FORMS_SprEyeDropper/FORMS_SprEyeDropper.yy",},}, 74 | {"id":{"name":"FORMS_SprRadioButton","path":"sprites/FORMS_SprRadioButton/FORMS_SprRadioButton.yy",},}, 75 | {"id":{"name":"FORMS_SprRectangle","path":"sprites/FORMS_SprRectangle/FORMS_SprRectangle.yy",},}, 76 | {"id":{"name":"FORMS_SprRound4","path":"sprites/FORMS_SprRound4/FORMS_SprRound4.yy",},}, 77 | {"id":{"name":"FORMS_SprRound8","path":"sprites/FORMS_SprRound8/FORMS_SprRound8.yy",},}, 78 | {"id":{"name":"FORMS_SprScrollableX","path":"sprites/FORMS_SprScrollableX/FORMS_SprScrollableX.yy",},}, 79 | {"id":{"name":"FORMS_SprScrollableY","path":"sprites/FORMS_SprScrollableY/FORMS_SprScrollableY.yy",},}, 80 | {"id":{"name":"FORMS_SprShadow","path":"sprites/FORMS_SprShadow/FORMS_SprShadow.yy",},}, 81 | {"id":{"name":"FORMS_SprSlider","path":"sprites/FORMS_SprSlider/FORMS_SprSlider.yy",},}, 82 | {"id":{"name":"FORMS_SprTab","path":"sprites/FORMS_SprTab/FORMS_SprTab.yy",},}, 83 | {"id":{"name":"FORMS_SprTabWorkspace","path":"sprites/FORMS_SprTabWorkspace/FORMS_SprTabWorkspace.yy",},}, 84 | {"id":{"name":"SprSponzaBBMOD","path":"sprites/SprSponzaBBMOD/SprSponzaBBMOD.yy",},}, 85 | ], 86 | "resourceType":"GMProject", 87 | "resourceVersion":"2.0", 88 | "RoomOrderNodes":[ 89 | {"roomId":{"name":"RmTest","path":"rooms/RmTest/RmTest.yy",},}, 90 | ], 91 | "templateType":"game", 92 | "TextureGroups":[ 93 | {"$GMTextureGroup":"","%Name":"Default","autocrop":true,"border":2,"compressFormat":"bz2","customOptions":"","directory":"","groupParent":null,"isScaled":true,"loadType":"default","mipsToGenerate":0,"name":"Default","resourceType":"GMTextureGroup","resourceVersion":"2.0","targets":-1,}, 94 | {"$GMTextureGroup":"","%Name":"Forms","autocrop":true,"border":2,"compressFormat":"bz2","customOptions":"","directory":"","groupParent":null,"isScaled":true,"loadType":"default","mipsToGenerate":0,"name":"Forms","resourceType":"GMTextureGroup","resourceVersion":"2.0","targets":-1,}, 95 | {"$GMTextureGroup":"","%Name":"FontAwesome","autocrop":true,"border":2,"compressFormat":"bz2","customOptions":"","directory":"","groupParent":null,"isScaled":true,"loadType":"default","mipsToGenerate":0,"name":"FontAwesome","resourceType":"GMTextureGroup","resourceVersion":"2.0","targets":-1,}, 96 | ], 97 | } -------------------------------------------------------------------------------- /datafiles/LICENSE-FontAwesome.txt: -------------------------------------------------------------------------------- 1 | Fonticons, Inc. (https://fontawesome.com) 2 | 3 | -------------------------------------------------------------------------------- 4 | 5 | Font Awesome Free License 6 | 7 | Font Awesome Free is free, open source, and GPL friendly. You can use it for 8 | commercial projects, open source projects, or really almost whatever you want. 9 | Full Font Awesome Free license: https://fontawesome.com/license/free. 10 | 11 | -------------------------------------------------------------------------------- 12 | 13 | # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) 14 | 15 | The Font Awesome Free download is licensed under a Creative Commons 16 | Attribution 4.0 International License and applies to all icons packaged 17 | as SVG and JS file types. 18 | 19 | -------------------------------------------------------------------------------- 20 | 21 | # Fonts: SIL OFL 1.1 License 22 | 23 | In the Font Awesome Free download, the SIL OFL license applies to all icons 24 | packaged as web and desktop font files. 25 | 26 | Copyright (c) 2023 Fonticons, Inc. (https://fontawesome.com) 27 | with Reserved Font Name: "Font Awesome". 28 | 29 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 30 | This license is copied below, and is also available with a FAQ at: 31 | http://scripts.sil.org/OFL 32 | 33 | SIL OPEN FONT LICENSE 34 | Version 1.1 - 26 February 2007 35 | 36 | PREAMBLE 37 | The goals of the Open Font License (OFL) are to stimulate worldwide 38 | development of collaborative font projects, to support the font creation 39 | efforts of academic and linguistic communities, and to provide a free and 40 | open framework in which fonts may be shared and improved in partnership 41 | with others. 42 | 43 | The OFL allows the licensed fonts to be used, studied, modified and 44 | redistributed freely as long as they are not sold by themselves. The 45 | fonts, including any derivative works, can be bundled, embedded, 46 | redistributed and/or sold with any software provided that any reserved 47 | names are not used by derivative works. The fonts and derivatives, 48 | however, cannot be released under any other type of license. The 49 | requirement for fonts to remain under this license does not apply 50 | to any document created using the fonts or their derivatives. 51 | 52 | DEFINITIONS 53 | "Font Software" refers to the set of files released by the Copyright 54 | Holder(s) under this license and clearly marked as such. This may 55 | include source files, build scripts and documentation. 56 | 57 | "Reserved Font Name" refers to any names specified as such after the 58 | copyright statement(s). 59 | 60 | "Original Version" refers to the collection of Font Software components as 61 | distributed by the Copyright Holder(s). 62 | 63 | "Modified Version" refers to any derivative made by adding to, deleting, 64 | or substituting — in part or in whole — any of the components of the 65 | Original Version, by changing formats or by porting the Font Software to a 66 | new environment. 67 | 68 | "Author" refers to any designer, engineer, programmer, technical 69 | writer or other person who contributed to the Font Software. 70 | 71 | PERMISSION & CONDITIONS 72 | Permission is hereby granted, free of charge, to any person obtaining 73 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 74 | redistribute, and sell modified and unmodified copies of the Font 75 | Software, subject to the following conditions: 76 | 77 | 1) Neither the Font Software nor any of its individual components, 78 | in Original or Modified Versions, may be sold by itself. 79 | 80 | 2) Original or Modified Versions of the Font Software may be bundled, 81 | redistributed and/or sold with any software, provided that each copy 82 | contains the above copyright notice and this license. These can be 83 | included either as stand-alone text files, human-readable headers or 84 | in the appropriate machine-readable metadata fields within text or 85 | binary files as long as those fields can be easily viewed by the user. 86 | 87 | 3) No Modified Version of the Font Software may use the Reserved Font 88 | Name(s) unless explicit written permission is granted by the corresponding 89 | Copyright Holder. This restriction only applies to the primary font name as 90 | presented to the users. 91 | 92 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 93 | Software shall not be used to promote, endorse or advertise any 94 | Modified Version, except to acknowledge the contribution(s) of the 95 | Copyright Holder(s) and the Author(s) or with their explicit written 96 | permission. 97 | 98 | 5) The Font Software, modified or unmodified, in part or in whole, 99 | must be distributed entirely under this license, and must not be 100 | distributed under any other license. The requirement for fonts to 101 | remain under this license does not apply to any document created 102 | using the Font Software. 103 | 104 | TERMINATION 105 | This license becomes null and void if any of the above conditions are 106 | not met. 107 | 108 | DISCLAIMER 109 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 110 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 111 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 112 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 113 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 114 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 115 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 116 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 117 | OTHER DEALINGS IN THE FONT SOFTWARE. 118 | 119 | -------------------------------------------------------------------------------- 120 | 121 | # Code: MIT License (https://opensource.org/licenses/MIT) 122 | 123 | In the Font Awesome Free download, the MIT license applies to all non-font and 124 | non-icon files. 125 | 126 | Copyright 2023 Fonticons, Inc. 127 | 128 | Permission is hereby granted, free of charge, to any person obtaining a copy of 129 | this software and associated documentation files (the "Software"), to deal in the 130 | Software without restriction, including without limitation the rights to use, copy, 131 | modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 132 | and to permit persons to whom the Software is furnished to do so, subject to the 133 | following conditions: 134 | 135 | The above copyright notice and this permission notice shall be included in all 136 | copies or substantial portions of the Software. 137 | 138 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 139 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 140 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 141 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 142 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 143 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 144 | 145 | -------------------------------------------------------------------------------- 146 | 147 | # Attribution 148 | 149 | Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font 150 | Awesome Free files already contain embedded comments with sufficient 151 | attribution, so you shouldn't need to do anything additional when using these 152 | files normally. 153 | 154 | We've kept attribution comments terse, so we ask that you do not actively work 155 | to remove them from files, especially code. They're a great way for folks to 156 | learn about Font Awesome. 157 | 158 | -------------------------------------------------------------------------------- 159 | 160 | # Brand Icons 161 | 162 | All brand icons are trademarks of their respective owners. The use of these 163 | trademarks does not indicate endorsement of the trademark holder by Font 164 | Awesome, nor vice versa. **Please do not use brand logos for any purpose except 165 | to represent the company, product, or service to which they refer.** 166 | -------------------------------------------------------------------------------- /scripts/__forms/__forms.gml: -------------------------------------------------------------------------------- 1 | /// @macro {Real} The major version number of Forms. 2 | #macro FORMS_VERSION_MAJOR 0 3 | 4 | /// @macro {Real} The minor version number of Forms. 5 | #macro FORMS_VERSION_MINOR 1 6 | 7 | /// @macro {Real} The patch version number of Forms. 8 | #macro FORMS_VERSION_PATCH 0 9 | 10 | /// @macro {String} The version of Forms as a string "major.minor.patch". 11 | #macro FORMS_VERSION_STRING $"{FORMS_VERSION_MAJOR}.{FORMS_VERSION_MINOR}.{FORMS_VERSION_PATCH}" 12 | 13 | /// @var {Constant.Color} The accent color. Used for example as color of the tick icon in selected checkboxes or the 14 | /// circle icon in selected radio buttons. Default value is `0x5B9D00` ("GameMaker green"). 15 | global.formsAccentColor = 0x5B9D00; 16 | 17 | /// @func forms_assert(_expr, _message) 18 | /// 19 | /// @desc Calls `show_error(_message, true)` if given expression doesn't evaluate to `true`. 20 | /// 21 | /// @param {Bool} _expr The expression to check. 22 | /// @param {String} _message The error message to show if expression is `false`. 23 | function forms_assert(_expr, _message) 24 | { 25 | gml_pragma("forceinline"); 26 | if (!_expr) 27 | { 28 | show_error(_message, true); 29 | } 30 | } 31 | 32 | /// @func forms_draw_text(_x, _y, _text[, _color[, _alpha]]) 33 | /// 34 | /// @desc Draws a text. 35 | /// 36 | /// @param {Real} _x The X position to draw the text at. 37 | /// @param {Real} _y The Y position to draw the text at. 38 | /// @param {String} _text The text to draw. 39 | /// @param {Constant.Color} [_color] The color of the text. Defaults to `c_white`. 40 | /// @param {Real} [_alpha] The alpha value of the text. Defaults to 1. 41 | function forms_draw_text(_x, _y, _text, _color = c_white, _alpha = 1.0) 42 | { 43 | gml_pragma("forceinline"); 44 | draw_text_color(_x, _y, _text, _color, _color, _color, _color, 1.0); 45 | } 46 | 47 | /// @func forms_draw_rectangle(_x, _y, _width, _height[, _color[, _alpha]]) 48 | /// 49 | /// @desc Draws a rectangle using a stretched sprite to save on batch breaks. 50 | /// 51 | /// @param {Real} _x The X position of the rectangle. 52 | /// @param {Real} _y The Y position of the rectangle. 53 | /// @param {Real} _width The width of the rectangle. 54 | /// @param {Real} _height The height of the rectangle. 55 | /// @param {Constant.Color} [_color] The color of the rectangle. Defaults to 56 | /// `c_white`. 57 | /// @param {Real} [_alpha] The alpha value of the rectangle. Defaults to 1. 58 | function forms_draw_rectangle(_x, _y, _width, _height, _color = c_white, _alpha = 1.0) 59 | { 60 | gml_pragma("forceinline"); 61 | draw_sprite_stretched_ext(FORMS_SprRectangle, 0, _x, _y, _width, _height, _color, _alpha); 62 | } 63 | 64 | /// @func forms_draw_roundrect(_x, _y, _width, _height, [_radius, _color, _alpha]) 65 | /// 66 | /// @desc Draws a rectangle using a stretched sprite to save on batch breaks. 67 | /// 68 | /// @param {Real} _x The X position of the rectangle. 69 | /// @param {Real} _y The Y position of the rectangle. 70 | /// @param {Real} _width The width of the rectangle. 71 | /// @param {Real} _height The height of the rectangle. 72 | /// @param {Real} _radius Corner radius, either 4 or 8. Defaults to 4. 73 | /// @param {Constant.Color} [_color] The color of the rectangle. Defaults to `c_white`. 74 | /// @param {Real} [_alpha] The alpha value of the rectangle. Defaults to 1. 75 | function forms_draw_roundrect(_x, _y, _width, _height, _radius = 4, _color = c_white, _alpha = 1.0) 76 | { 77 | gml_pragma("forceinline"); 78 | _radius = clamp((_radius div 4) * 4, 4, 8); 79 | draw_sprite_stretched_ext((_radius == 4) ? FORMS_SprRound4 : FORMS_SprRound8, 0, _x, _y, _width, _height, _color, 80 | _alpha); 81 | } 82 | 83 | /// @func forms_char_is_digit(_char) 84 | /// 85 | /// @desc Checks whether given character is a digit. 86 | /// 87 | /// @param {String} _char The character to check. 88 | /// 89 | /// @return {Bool} Returns `true` if the character is a digit. 90 | function forms_char_is_digit(_char) 91 | { 92 | gml_pragma("forceinline"); 93 | return (_char >= "0" && _char <= "9"); 94 | } 95 | 96 | /// @func forms_char_is_letter(_char) 97 | /// 98 | /// @desc Checks whether given character is a letter. 99 | /// 100 | /// @param {String} _char The character. 101 | /// 102 | /// @return {Bool} Returns `true` if the character is a letter. 103 | function forms_char_is_letter(_char) 104 | { 105 | gml_pragma("forceinline"); 106 | return ((_char >= "a" && _char <= "b") 107 | || (_char >= "A" && _char <= "B")); 108 | } 109 | 110 | /// @func forms_parse_real(_string) 111 | /// 112 | /// @desc Tries to parse a real number from a string. 113 | /// 114 | /// @param {String} _string The string to parse the number from. 115 | /// 116 | /// @return {Real, Undefined} The parsed number or `undefined` if the string does not represent a number. 117 | /// 118 | /// @example 119 | /// The following code tries to parse a number from a variable `_userInput` (string) and stores the result into 120 | /// `_number`. If parsing fails, it defaults to 0. 121 | /// ```gml 122 | /// var _number = forms_parse_real(_userInput) ?? 0; 123 | /// ``` 124 | function forms_parse_real(_string) 125 | { 126 | var _sign = 1; 127 | var _number = "0"; 128 | var _index = 1; 129 | var _state = 0; 130 | 131 | repeat(string_length(_string) + 1) 132 | { 133 | var _char = string_char_at(_string, _index++); 134 | 135 | switch (_state) 136 | { 137 | case 0: 138 | if (_char == "-") 139 | { 140 | _sign *= -1; 141 | } 142 | else if (_char == "+") 143 | { 144 | _sign *= +1; 145 | } 146 | else if (forms_char_is_digit(_char) 147 | || _char == ".") 148 | { 149 | _state = 1; 150 | --_index; 151 | } 152 | else 153 | { 154 | return undefined; 155 | } 156 | break; 157 | 158 | case 1: 159 | if (forms_char_is_digit(_char) 160 | || _char == ".") 161 | { 162 | _number += _char; 163 | } 164 | else 165 | { 166 | return undefined; 167 | } 168 | break; 169 | 170 | case 2: 171 | if (forms_char_is_digit(_char)) 172 | { 173 | _number += _char; 174 | } 175 | else 176 | { 177 | return undefined; 178 | } 179 | break; 180 | } 181 | } 182 | 183 | return _sign * real(_number); 184 | } 185 | 186 | // @var {Id.DsStack} 187 | /// @private 188 | global.__formsScissorStack = ds_stack_create(); 189 | 190 | /// @var {Array, Undefined} 191 | /// @private 192 | global.__formsScissorRect = undefined; 193 | 194 | /// @func forms_scissor_rect_push(_x, _y, _width, _height) 195 | /// 196 | /// @desc Pushes the current scissor rectangle onto a stack and then changes it to the intersection of the current one 197 | /// with the one specified. If there's no scissor rectangle currently set, the size of the window is used instead. 198 | /// 199 | /// @param {Real} _x The X coordinate of the top left corner of the scissor rectangle to intersect the current one with. 200 | /// @param {Real} _y The Y coordinate of the top left corner of the scissor rectangle to intersect the current one with. 201 | /// @param {Real} _width The width of the scrissor rectangle to intersect the current one with. 202 | /// @param {Real} _height The height of the scrissor rectangle to intersect the current one with. 203 | /// 204 | /// @see forms_scissor_rect_pop 205 | function forms_scissor_rect_push(_x, _y, _width, _height) 206 | { 207 | ds_stack_push(global.__formsScissorStack, global.__formsScissorRect); 208 | if (global.__formsScissorRect == undefined) 209 | { 210 | global.__formsScissorRect = [_x, _y, _x + _width, _y + _height]; 211 | } 212 | else 213 | { 214 | global.__formsScissorRect = [ 215 | max(global.__formsScissorRect[0], _x), 216 | max(global.__formsScissorRect[1], _y), 217 | min(global.__formsScissorRect[2], _x + _width), 218 | min(global.__formsScissorRect[3], _y + _height) 219 | ]; 220 | } 221 | gpu_set_scissor( 222 | global.__formsScissorRect[0], 223 | global.__formsScissorRect[1], 224 | global.__formsScissorRect[2] - global.__formsScissorRect[0], 225 | global.__formsScissorRect[3] - global.__formsScissorRect[1] 226 | ); 227 | } 228 | 229 | /// @func forms_scissor_rect_pop() 230 | /// 231 | /// @desc Pops a scissor rectangle from the stack and sets it as the current one. 232 | /// 233 | /// @see forms_scissor_rect_push 234 | function forms_scissor_rect_pop() 235 | { 236 | global.__formsScissorRect = ds_stack_top(global.__formsScissorStack); 237 | ds_stack_pop(global.__formsScissorStack); 238 | if (global.__formsScissorRect == undefined) 239 | { 240 | gpu_set_scissor(0, 0, window_get_width(), window_get_height()); 241 | } 242 | else 243 | { 244 | gpu_set_scissor( 245 | global.__formsScissorRect[0], 246 | global.__formsScissorRect[1], 247 | global.__formsScissorRect[2] - global.__formsScissorRect[0], 248 | global.__formsScissorRect[3] - global.__formsScissorRect[1] 249 | ); 250 | } 251 | } 252 | -------------------------------------------------------------------------------- /scripts/forms_container/forms_container.gml: -------------------------------------------------------------------------------- 1 | /// @macro {Code} A shorthand for 2 | /// `ContentWidth = Pen.get_max_x(); ContentHeight = Pen.get_max_y();`. Useful in {@link FORMS_Container.draw_content}. 3 | /* beautify ignore:start */ 4 | #macro FORMS_CONTENT_UPDATE_SIZE \ 5 | do { ContentWidth = Pen.get_max_x(); ContentHeight = Pen.get_max_y(); } until (1) 6 | /* beautify ignore:end */ 7 | 8 | /// @func FORMS_ContainerProps() 9 | /// 10 | /// @extends FORMS_WidgetProps 11 | /// 12 | /// @desc Properties accepted by the constructor of {@link FORMS_Container}. 13 | function FORMS_ContainerProps(): FORMS_WidgetProps() constructor 14 | { 15 | /// @var {Asset.GMSprite, Undefined} The background sprite of the container, stretched over its entire size. 16 | BackgroundSprite = undefined; 17 | 18 | /// @var {Real, Undefined} The subimage of the background sprite to use. 19 | BackgroundIndex = undefined; 20 | 21 | /// @var {Constant.Color, Undefined} The tint color of the background sprite. 22 | BackgroundColor = undefined; 23 | 24 | /// @var {Real, Undefined} The alpha value of the background sprite. 25 | BackgroundAlpha = undefined; 26 | 27 | /// @var {Bool, Undefined} Whether the default scrolling direction of the container is vertical (`true`) or 28 | /// horizontal (`false`). 29 | IsDefaultScrollVertical = undefined; 30 | 31 | /// @var {Bool, Undefined} Whether the container should be automatically resized to fit its content upon its 32 | /// creation. 33 | ContentFit = undefined; 34 | } 35 | 36 | /// @func FORMS_Container([_props]) 37 | /// 38 | /// @extends FORMS_Widget 39 | /// 40 | /// @desc A widget that draws a scrollable content into a surface. 41 | /// 42 | /// @param {Struct.FORMS_ContainerProps, Undefined} [_props] Properties to create the container with or `undefined` 43 | /// (default). 44 | function FORMS_Container(_props = undefined): FORMS_Widget(_props) constructor 45 | { 46 | static Widget_layout = layout; 47 | static Widget_destroy = destroy; 48 | 49 | /// @var {Id.Surface} The ID of the container's surface. 50 | /// @readonly 51 | Surface = -1; 52 | 53 | /// @var {Asset.GMSprite} The background sprite of the container, stretched over its entire size. Defaults to 54 | /// `FORMS_SprRectangle`. 55 | BackgroundSprite = forms_get_prop(_props, "BackgroundSprite") ?? FORMS_SprRectangle; 56 | 57 | /// @var {Real} The subimage of the background sprite to use. Defaults to 0. 58 | BackgroundIndex = forms_get_prop(_props, "BackgroundIndex") ?? 0; 59 | 60 | /// @var {Constant.Color} The tint color of the background sprite. Defaults to `0x272727`. 61 | BackgroundColor = forms_get_prop(_props, "BackgroundColor") ?? 0x272727; 62 | 63 | /// @var {Real} The alpha value of the background sprite. Defaults to 1. 64 | BackgroundAlpha = forms_get_prop(_props, "BackgroundAlpha") ?? 1.0; 65 | 66 | /// @var {Real} The scroll of the contents on the X axis. Defaults to 0. 67 | /// @readonly 68 | /// @see FORMS_Container.set_scroll_x 69 | ScrollX = 0; 70 | 71 | /// @var {Real} The scroll of the contents on the Y axis. Defaults to 0. 72 | /// @readonly 73 | /// @see FORMS_Container.set_scroll_y 74 | ScrollY = 0; 75 | 76 | /// @var {Bool} Whether the default scrolling direction of the container is vertical (`true`) or horizontal 77 | /// (`false`). Defaults to `true`. 78 | IsDefaultScrollVertical = forms_get_prop(_props, "IsDefaultScrollVertical") ?? true; 79 | 80 | /// @var {Bool} If `true` then the size of the container is recomputed from its contents the next time method 81 | /// [layout](./FORMS_Widget.layout.html) is called. Defaults to `false`. 82 | ContentFit = forms_get_prop(_props, "ContentFit") ?? false; 83 | 84 | /// @var {Struct.FORMS_Pen} A pen used by this container to draw text and controls like inputs, checkboxes, buttons 85 | /// etc. 86 | /// @readonly 87 | Pen = new FORMS_Pen(self); 88 | 89 | /// @var {Real} The width of the content. Defaults to 0. 90 | /// @see FORMS_Container.fetch_content_size 91 | ContentWidth = 0; 92 | 93 | /// @var {Real} The height of the content. Defaults to 0. 94 | /// @see FORMS_Container.fetch_content_size 95 | ContentHeight = 0; 96 | 97 | /// @func fetch_content_size() 98 | /// 99 | /// @desc Draws the content into a off-screen surface to fetch its width and height. 100 | /// 101 | /// @return {Struct.FORMS_Container} Returns `self`. 102 | static fetch_content_size = function () 103 | { 104 | var _surface = surface_create(1, 1); 105 | surface_set_target(_surface); 106 | draw_content(); 107 | surface_reset_target(); 108 | surface_free(_surface); 109 | return self; 110 | } 111 | 112 | /// @func set_scroll_x(_scroll) 113 | /// 114 | /// @desc Changes the container's scroll on the X axis. 115 | /// 116 | /// @param {Real} _scroll The new scroll value. Clamped between 0 and the width of the container's content. 117 | /// 118 | /// @return {Struct.FORMS_Container} Returns `self`. 119 | static set_scroll_x = function (_scroll) 120 | { 121 | gml_pragma("forceinline"); 122 | ScrollX = round(clamp(_scroll, 0, max(ContentWidth - __realWidth, 0))); 123 | return self; 124 | } 125 | 126 | /// @func set_scroll_y(_scroll) 127 | /// 128 | /// @desc Changes the container's scroll on the Y axis. 129 | /// 130 | /// @param {Real} _scroll The new scroll value. Clamped between 0 and the height of the container's content. 131 | /// 132 | /// @return {Struct.FORMS_Container} Returns `self`. 133 | static set_scroll_y = function (_scroll) 134 | { 135 | gml_pragma("forceinline"); 136 | ScrollY = round(clamp(_scroll, 0, max(ContentHeight - __realHeight, 0))); 137 | return self; 138 | } 139 | 140 | static layout = function () 141 | { 142 | if (ContentFit) 143 | { 144 | fetch_content_size(); 145 | 146 | // TODO: Add setter 147 | Width.Value = ContentWidth; 148 | Width.Unit = FORMS_EUnit.Pixel; 149 | Height.Value = ContentHeight; 150 | Height.Unit = FORMS_EUnit.Pixel; 151 | 152 | __realWidth = ContentWidth; 153 | __realHeight = ContentHeight; 154 | 155 | ContentFit = false; 156 | } 157 | Widget_layout(); 158 | return self; 159 | } 160 | 161 | static update = function (_deltaTime) 162 | { 163 | var _scroll = is_mouse_over() * (mouse_wheel_down() - mouse_wheel_up()) * string_height("M"); 164 | if (keyboard_check(vk_control) == IsDefaultScrollVertical) 165 | { 166 | ScrollX += _scroll; 167 | } 168 | else 169 | { 170 | ScrollY += _scroll; 171 | } 172 | 173 | // Clamp scroll 174 | set_scroll_x(ScrollX); 175 | set_scroll_y(ScrollY); 176 | 177 | return self; 178 | } 179 | 180 | /// @func draw_content() 181 | /// 182 | /// @desc Draws contents of the container. 183 | /// 184 | /// @return {Struct.FORMS_Container} Returns `self`. 185 | static draw_content = function () 186 | { 187 | return self; 188 | } 189 | 190 | static draw = function () 191 | { 192 | if (__realWidth <= 0 || __realHeight <= 0) 193 | { 194 | return self; 195 | } 196 | 197 | if (!surface_exists(Surface)) 198 | { 199 | Surface = surface_create(__realWidth, __realHeight); 200 | } 201 | else if (surface_get_width(Surface) != __realWidth 202 | || surface_get_height(Surface) != __realHeight) 203 | { 204 | surface_resize(Surface, __realWidth, __realHeight); 205 | } 206 | 207 | surface_set_target(Surface); 208 | draw_clear_alpha(0, 0); 209 | draw_sprite_stretched_ext( 210 | BackgroundSprite, BackgroundIndex, 211 | 0, 0, __realWidth, __realHeight, 212 | BackgroundColor, BackgroundAlpha); 213 | 214 | forms_push_mouse_coordinates(__realX - ScrollX, __realY - ScrollY); 215 | var _world = matrix_get(matrix_world); 216 | _world[@ 12] -= ScrollX; 217 | _world[@ 13] -= ScrollY; 218 | matrix_set(matrix_world, _world); 219 | draw_content(); 220 | _world[@ 12] += ScrollX; 221 | _world[@ 13] += ScrollY; 222 | matrix_set(matrix_world, _world); 223 | 224 | var _size = 24; 225 | var _color = c_black; //global.formsAccentColor; 226 | var _alpha = 0.5; 227 | if (ScrollX > 0) 228 | { 229 | draw_sprite_stretched_ext( 230 | FORMS_SprScrollableX, 0, 231 | 0, 0, _size, __realHeight, 232 | _color, _alpha); 233 | } 234 | if (ContentWidth - ScrollX > __realWidth) 235 | { 236 | draw_sprite_stretched_ext( 237 | FORMS_SprScrollableX, 1, 238 | __realWidth - _size, 0, _size, __realHeight, 239 | _color, _alpha); 240 | } 241 | 242 | if (ScrollY > 0) 243 | { 244 | draw_sprite_stretched_ext( 245 | FORMS_SprScrollableY, 0, 246 | 0, 0, __realWidth, _size, 247 | _color, _alpha); 248 | } 249 | if (ContentHeight - ScrollY > __realHeight) 250 | { 251 | draw_sprite_stretched_ext( 252 | FORMS_SprScrollableY, 1, 253 | 0, __realHeight - _size, __realWidth, _size, 254 | _color, _alpha); 255 | } 256 | 257 | forms_push_mouse_coordinates(-(__realX - ScrollX), -(__realY - ScrollY)); 258 | surface_reset_target(); 259 | 260 | draw_surface(Surface, __realX, __realY); 261 | 262 | return self; 263 | } 264 | 265 | static destroy = function () 266 | { 267 | Widget_destroy(); 268 | if (surface_exists(Surface)) { surface_free(Surface); } 269 | Pen = Pen.destroy(); 270 | return undefined; 271 | } 272 | } 273 | --------------------------------------------------------------------------------