Add Event GUI
This commit is contained in:
parent
e3e472f30b
commit
ea77974d42
7 changed files with 689 additions and 488 deletions
|
@ -2,10 +2,13 @@
|
|||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="00f293cb-c755-478c-9b6f-422f827454e0" name="Default" comment="">
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/globalgamejam/gui/GUI.java" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/globalgamejam/gui/IActionGUI.java" />
|
||||
<change type="MOVED" beforePath="$PROJECT_DIR$/src/globalgamejam/gui/Label.java" afterPath="$PROJECT_DIR$/src/globalgamejam/gui/GUILabel.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/globalgamejam/input/Input.java" afterPath="$PROJECT_DIR$/src/globalgamejam/input/Input.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/globalgamejam/math/Matrix4f.java" afterPath="$PROJECT_DIR$/src/globalgamejam/math/Matrix4f.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/globalgamejam/math/Vector3f.java" afterPath="$PROJECT_DIR$/src/globalgamejam/math/Vector3f.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/globalgamejam/tiles/Tile.java" afterPath="$PROJECT_DIR$/src/globalgamejam/tiles/Tile.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/globalgamejam/render/DisplayManager.java" afterPath="$PROJECT_DIR$/src/globalgamejam/render/DisplayManager.java" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/out/" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
|
@ -21,25 +24,13 @@
|
|||
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file leaf-file-name="Tile.java" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/tiles/Tile.java">
|
||||
<file leaf-file-name="Main.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1360">
|
||||
<caret line="80" column="26" lean-forward="false" selection-start-line="80" selection-start-column="26" selection-end-line="80" selection-end-column="26" />
|
||||
<state relative-caret-position="-340">
|
||||
<caret line="49" column="52" lean-forward="true" selection-start-line="49" selection-start-column="52" selection-end-line="49" selection-end-column="52" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#3194#3195#0" expanded="true" />
|
||||
<element signature="e#3225#3226#0" expanded="true" />
|
||||
<element signature="e#3259#3260#0" expanded="true" />
|
||||
<element signature="e#3287#3288#0" expanded="true" />
|
||||
<element signature="e#3321#3322#0" expanded="true" />
|
||||
<element signature="e#3352#3353#0" expanded="true" />
|
||||
<element signature="e#3402#3403#0" expanded="true" />
|
||||
<element signature="e#3442#3443#0" expanded="true" />
|
||||
<element signature="e#3486#3487#0" expanded="true" />
|
||||
<element signature="e#3520#3521#0" expanded="true" />
|
||||
<element signature="e#3567#3568#0" expanded="true" />
|
||||
<element signature="e#3607#3608#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -58,12 +49,95 @@
|
|||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Matrix4f.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/math/Matrix4f.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="325">
|
||||
<caret line="181" column="5" lean-forward="true" selection-start-line="181" selection-start-column="5" selection-end-line="181" selection-end-column="5" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="GUILabel.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/gui/GUILabel.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-167">
|
||||
<caret line="303" column="38" lean-forward="false" selection-start-line="303" selection-start-column="38" selection-end-line="303" selection-end-column="38" />
|
||||
<folding>
|
||||
<element signature="e#3763#3764#0" expanded="true" />
|
||||
<element signature="e#3778#3779#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="GUI.java" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/gui/GUI.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="374">
|
||||
<caret line="28" column="60" lean-forward="false" selection-start-line="28" selection-start-column="60" selection-end-line="28" selection-end-column="60" />
|
||||
<folding>
|
||||
<element signature="e#1299#1300#0" expanded="true" />
|
||||
<element signature="e#1323#1324#0" expanded="true" />
|
||||
<element signature="e#1354#1355#0" expanded="true" />
|
||||
<element signature="e#1380#1381#0" expanded="true" />
|
||||
<element signature="e#1405#1406#0" expanded="true" />
|
||||
<element signature="e#1429#1430#0" expanded="true" />
|
||||
<element signature="e#1460#1461#0" expanded="true" />
|
||||
<element signature="e#1486#1487#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Input.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/input/Input.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-610">
|
||||
<caret line="130" column="26" lean-forward="true" selection-start-line="130" selection-start-column="26" selection-end-line="130" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="DisplayManager.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/render/DisplayManager.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="212">
|
||||
<caret line="21" column="65" lean-forward="false" selection-start-line="21" selection-start-column="65" selection-end-line="21" selection-end-column="65" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="IActionGUI.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/gui/IActionGUI.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="153">
|
||||
<caret line="9" column="81" lean-forward="true" selection-start-line="9" selection-start-column="81" selection-end-line="9" selection-end-column="81" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Image.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/gui/Image.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="51">
|
||||
<caret line="3" column="0" lean-forward="false" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="25" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="Class" />
|
||||
<option value="Interface" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -88,7 +162,6 @@
|
|||
<option value="$PROJECT_DIR$/src/globalgamejam/render/gui/GUIComponent.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/audio/Audio.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/audio/Sound3D.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/input/Input.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/input/IO.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/math/Color4f.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/math/Mathf.java" />
|
||||
|
@ -100,7 +173,6 @@
|
|||
<option value="$PROJECT_DIR$/../BasicLighting-master/src/Main.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/tiles/TestTile.java" />
|
||||
<option value="$PROJECT_DIR$/res/shaders/main.vert" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/render/DisplayManager.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/render/Camera.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/game/Game.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/tiles/FBOTile.java" />
|
||||
|
@ -113,8 +185,14 @@
|
|||
<option value="$PROJECT_DIR$/res/shaders/main.frag" />
|
||||
<option value="$PROJECT_DIR$/.gitignore" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/math/Vector3f.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/math/Matrix4f.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/tiles/Tile.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/math/Matrix4f.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/gui/Label.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/render/DisplayManager.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/gui/IActionGUI.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/gui/GUILabel.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/gui/GUI.java" />
|
||||
<option value="$PROJECT_DIR$/src/globalgamejam/input/Input.java" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -187,7 +265,73 @@
|
|||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="tiles" />
|
||||
<option name="myItemId" value="render" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="Global-Gam-Jam-2017" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="Global-Gam-Jam-2017" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="globalgamejam" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="math" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="Global-Gam-Jam-2017" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="Global-Gam-Jam-2017" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="globalgamejam" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="input" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="Global-Gam-Jam-2017" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="Global-Gam-Jam-2017" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="globalgamejam" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="gui" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
|
@ -239,7 +383,7 @@
|
|||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="" />
|
||||
<module name="Global-Gam-Jam-2017" />
|
||||
<envs />
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
|
@ -455,13 +599,13 @@
|
|||
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Nl-Palette" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980973" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32921347" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32921347" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32921347" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Properties" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
|
||||
|
@ -494,53 +638,6 @@
|
|||
<option name="FILTER_TARGETS" value="false" />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/res/shaders/main.vert">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="221">
|
||||
<caret line="13" column="7" lean-forward="false" selection-start-line="13" selection-start-column="7" selection-end-line="13" selection-end-column="49" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/res/shaders/main.frag">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="17">
|
||||
<caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/tiles/Tile.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="204">
|
||||
<caret line="17" column="31" lean-forward="true" selection-start-line="17" selection-start-column="31" selection-end-line="17" selection-end-column="31" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#3194#3195#0" expanded="true" />
|
||||
<element signature="e#3225#3226#0" expanded="true" />
|
||||
<element signature="e#3259#3260#0" expanded="true" />
|
||||
<element signature="e#3287#3288#0" expanded="true" />
|
||||
<element signature="e#3321#3322#0" expanded="true" />
|
||||
<element signature="e#3352#3353#0" expanded="true" />
|
||||
<element signature="e#3402#3403#0" expanded="true" />
|
||||
<element signature="e#3442#3443#0" expanded="true" />
|
||||
<element signature="e#3486#3487#0" expanded="true" />
|
||||
<element signature="e#3520#3521#0" expanded="true" />
|
||||
<element signature="e#3567#3568#0" expanded="true" />
|
||||
<element signature="e#3607#3608#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/game/Game.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="102">
|
||||
<caret line="8" column="3" lean-forward="false" selection-start-line="8" selection-start-column="3" selection-end-line="8" selection-end-column="3" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/game/MainGame.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="340">
|
||||
|
@ -593,8 +690,6 @@
|
|||
<caret line="105" column="24" lean-forward="false" selection-start-line="105" selection-start-column="24" selection-end-line="105" selection-end-column="24" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#1383#1582#0" expanded="true" />
|
||||
<element signature="e#1581#1582#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -744,16 +839,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/input/Input.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1981">
|
||||
<caret line="15" column="3" lean-forward="false" selection-start-line="15" selection-start-column="3" selection-end-line="15" selection-end-column="3" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/../BasicLighting-master/src/shader.frag" />
|
||||
<entry file="file://$PROJECT_DIR$/../BasicLighting-master/src/Main.java" />
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/tiles/TestTile.java">
|
||||
|
@ -782,16 +867,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/render/DisplayManager.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="247">
|
||||
<caret line="30" column="65" lean-forward="false" selection-start-line="30" selection-start-column="65" selection-end-line="30" selection-end-column="65" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/tiles/FBOTile.java" />
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/render/Texture.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
|
@ -881,18 +956,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="119">
|
||||
<caret line="49" column="52" lean-forward="true" selection-start-line="49" selection-start-column="52" selection-end-line="49" selection-end-column="52" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#1383#1582#0" expanded="true" />
|
||||
<element signature="e#1581#1582#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/audio/Audio.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-459">
|
||||
|
@ -901,29 +964,10 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/math/Matrix4f.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="189">
|
||||
<caret line="84" column="30" lean-forward="false" selection-start-line="84" selection-start-column="30" selection-end-line="84" selection-end-column="53" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/math/Vector3f.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="206">
|
||||
<caret line="28" column="26" lean-forward="false" selection-start-line="28" selection-start-column="26" selection-end-line="28" selection-end-column="26" />
|
||||
<folding>
|
||||
<element signature="e#465#466#0" expanded="true" />
|
||||
<element signature="e#495#496#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/tiles/Tile.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1360">
|
||||
<caret line="80" column="26" lean-forward="false" selection-start-line="80" selection-start-column="26" selection-end-line="80" selection-end-column="26" />
|
||||
<state relative-caret-position="-1190">
|
||||
<caret line="14" column="3" lean-forward="true" selection-start-line="14" selection-start-column="3" selection-end-line="14" selection-end-column="3" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#3194#3195#0" expanded="true" />
|
||||
|
@ -942,6 +986,95 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/math/Vector3f.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="206">
|
||||
<caret line="28" column="26" lean-forward="false" selection-start-line="28" selection-start-column="26" selection-end-line="28" selection-end-column="26" />
|
||||
<folding>
|
||||
<element signature="e#465#466#0" expanded="true" />
|
||||
<element signature="e#495#496#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/math/Matrix4f.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="325">
|
||||
<caret line="181" column="5" lean-forward="true" selection-start-line="181" selection-start-column="5" selection-end-line="181" selection-end-column="5" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/gui/Image.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="51">
|
||||
<caret line="3" column="0" lean-forward="false" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="25" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/render/DisplayManager.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="212">
|
||||
<caret line="21" column="65" lean-forward="false" selection-start-line="21" selection-start-column="65" selection-end-line="21" selection-end-column="65" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-340">
|
||||
<caret line="49" column="52" lean-forward="true" selection-start-line="49" selection-start-column="52" selection-end-line="49" selection-end-column="52" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/gui/IActionGUI.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="153">
|
||||
<caret line="9" column="81" lean-forward="true" selection-start-line="9" selection-start-column="81" selection-end-line="9" selection-end-column="81" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/gui/GUILabel.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-167">
|
||||
<caret line="303" column="38" lean-forward="false" selection-start-line="303" selection-start-column="38" selection-end-line="303" selection-end-column="38" />
|
||||
<folding>
|
||||
<element signature="e#3763#3764#0" expanded="true" />
|
||||
<element signature="e#3778#3779#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/input/Input.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-610">
|
||||
<caret line="130" column="26" lean-forward="true" selection-start-line="130" selection-start-column="26" selection-end-line="130" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/globalgamejam/gui/GUI.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="374">
|
||||
<caret line="28" column="60" lean-forward="false" selection-start-line="28" selection-start-column="60" selection-end-line="28" selection-end-column="60" />
|
||||
<folding>
|
||||
<element signature="e#1299#1300#0" expanded="true" />
|
||||
<element signature="e#1323#1324#0" expanded="true" />
|
||||
<element signature="e#1354#1355#0" expanded="true" />
|
||||
<element signature="e#1380#1381#0" expanded="true" />
|
||||
<element signature="e#1405#1406#0" expanded="true" />
|
||||
<element signature="e#1429#1430#0" expanded="true" />
|
||||
<element signature="e#1460#1461#0" expanded="true" />
|
||||
<element signature="e#1486#1487#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
<component name="masterDetails">
|
||||
<states>
|
||||
|
|
62
src/globalgamejam/gui/GUI.java
Normal file
62
src/globalgamejam/gui/GUI.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
package globalgamejam.gui;
|
||||
|
||||
import globalgamejam.input.Input;
|
||||
|
||||
/**
|
||||
* Created by trexr on 20/01/2017.
|
||||
*/
|
||||
public abstract class GUI {
|
||||
private int mouseInGUI = 0;//0 = En dehors, 1 = entrer, 2 = deplacer
|
||||
|
||||
protected int x, y;
|
||||
protected int width,height;
|
||||
|
||||
protected IActionGUI action;
|
||||
|
||||
public GUI(int x,int y){
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.width = 0;
|
||||
this.height = 0;
|
||||
}
|
||||
|
||||
public void update(){
|
||||
float mouseX = Input.getMousePosition().x;
|
||||
float mouseY = Input.getMousePosition().y;
|
||||
if(mouseX >= this.x && mouseX <= this.x && mouseY >= this.y && mouseY <= this.y){
|
||||
for(int i = 0;i < Input.NBRE_BUTTON;i++){
|
||||
if(Input.isButton(i)){
|
||||
action.clicked(mouseX,mouseY,i,Input.getButtonState(i));
|
||||
}
|
||||
}
|
||||
if(mouseInGUI == 0){
|
||||
mouseInGUI = 1;
|
||||
action.enter(mouseX,mouseY);
|
||||
}else if(mouseInGUI == 1 && mouseInGUI == 2){
|
||||
mouseInGUI = 2;
|
||||
action.move(mouseX,mouseY);
|
||||
}
|
||||
}else{
|
||||
if(mouseInGUI == 1 && mouseInGUI == 2){
|
||||
mouseInGUI = 0;
|
||||
action.leave(mouseX,mouseY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public void setX(int x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public void setY(int y) {
|
||||
this.y = y;
|
||||
}
|
||||
}
|
|
@ -16,17 +16,14 @@ import org.lwjgl.opengl.GL12;
|
|||
* @author Jean-Baptiste Pommeret (Fiesta)
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Label {
|
||||
public class GUILabel extends GUI {
|
||||
|
||||
private static final int BYTES_PER_PIXEL = 4;//3 for RGB, 4 for RGBA
|
||||
|
||||
private Image label;
|
||||
private float x, y;
|
||||
private String text;
|
||||
private Color color;
|
||||
private int size;
|
||||
private int witdh, height;
|
||||
|
||||
private String font;
|
||||
|
||||
/**
|
||||
|
@ -38,10 +35,9 @@ public class Label {
|
|||
* @param font (String) : the font (i.e. "Arial" or "Times new roman")
|
||||
* @param size (int) : the font size
|
||||
*/
|
||||
public Label(String text, float xC, float yC, Color color, String font, int size){
|
||||
public GUILabel(String text, int xC, int yC, Color color, String font, int size){
|
||||
super(xC,yC);
|
||||
this.text = text;
|
||||
this.x = xC;
|
||||
this.y = yC;
|
||||
this.color = color;
|
||||
this.size = size;
|
||||
this.font = font;
|
||||
|
@ -52,10 +48,10 @@ public class Label {
|
|||
BufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
|
||||
FontMetrics fm = img.getGraphics().getFontMetrics(f_font);
|
||||
|
||||
this.witdh = fm.stringWidth(this.text);
|
||||
this.height = fm.getHeight();
|
||||
super.width = fm.stringWidth(this.text);
|
||||
super.height = fm.getHeight();
|
||||
|
||||
final BufferedImage image = new BufferedImage(this.witdh, this.height, BufferedImage.TYPE_INT_ARGB);
|
||||
final BufferedImage image = new BufferedImage(super.width, this.height, BufferedImage.TYPE_INT_ARGB);
|
||||
// makeTransparent(image);
|
||||
|
||||
Graphics g = image.getGraphics();
|
||||
|
@ -107,7 +103,7 @@ public class Label {
|
|||
/**
|
||||
* Default constructor of a Label. Call the full constructor -> Label("", 100, 100, Color.white, "Arial", 30)
|
||||
*/
|
||||
public Label(){
|
||||
public GUILabel(){
|
||||
this("");
|
||||
}
|
||||
|
||||
|
@ -116,7 +112,7 @@ public class Label {
|
|||
* Call the full constructor -> Label(text, 100, 100, Color.white, "Arial", 30)
|
||||
* @param text (String) : the text to print
|
||||
*/
|
||||
public Label(String text){
|
||||
public GUILabel(String text){
|
||||
this(text, 100, 100, Color.white, "Arial", 30);
|
||||
}
|
||||
|
||||
|
@ -141,10 +137,10 @@ public class Label {
|
|||
BufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
|
||||
FontMetrics fm = img.getGraphics().getFontMetrics(f_font);
|
||||
|
||||
this.witdh = fm.stringWidth(this.text);
|
||||
this.height = fm.getHeight();
|
||||
super.width = fm.stringWidth(this.text);
|
||||
super.height = fm.getHeight();
|
||||
|
||||
final BufferedImage image = new BufferedImage(this.witdh, this.height, BufferedImage.TYPE_INT_ARGB);
|
||||
final BufferedImage image = new BufferedImage(super.width, super.height, BufferedImage.TYPE_INT_ARGB);
|
||||
// makeTransparent(image);
|
||||
|
||||
Graphics g = image.getGraphics();
|
||||
|
@ -214,10 +210,10 @@ public class Label {
|
|||
BufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
|
||||
FontMetrics fm = img.getGraphics().getFontMetrics(f_font);
|
||||
|
||||
this.witdh = fm.stringWidth(this.text);
|
||||
this.height = fm.getHeight();
|
||||
super.width = fm.stringWidth(this.text);
|
||||
super.height = fm.getHeight();
|
||||
|
||||
final BufferedImage image = new BufferedImage(this.witdh, this.height, BufferedImage.TYPE_INT_ARGB);
|
||||
final BufferedImage image = new BufferedImage(super.width, super.height, BufferedImage.TYPE_INT_ARGB);
|
||||
// makeTransparent(image);
|
||||
|
||||
Graphics g = image.getGraphics();
|
||||
|
@ -270,7 +266,7 @@ public class Label {
|
|||
* Return the x coordonnate of the Label (upper left corner)
|
||||
* @return x (float) : the x coordonnate of the Label
|
||||
*/
|
||||
public float getX() {
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
|
@ -278,8 +274,8 @@ public class Label {
|
|||
* Set the x coordonnate of the Label (upper left corner)
|
||||
* @param x (float) : the new x coordonnate of the Label
|
||||
*/
|
||||
public void setX(float x) {
|
||||
this.x = x;
|
||||
public void setX(int x) {
|
||||
super.setX(x);
|
||||
label.setX(x);
|
||||
}
|
||||
|
||||
|
@ -287,7 +283,7 @@ public class Label {
|
|||
* Return the y coordonnate of the Label (upper left corner)
|
||||
* @return y (float) : the y coordonnate of the Label
|
||||
*/
|
||||
public float getY() {
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
|
@ -295,8 +291,8 @@ public class Label {
|
|||
* Set the y coordonnate of the Label (upper left corner)
|
||||
* @param y (float) : the new y coordonnate of the Label
|
||||
*/
|
||||
public void setY(float y) {
|
||||
this.y = y;
|
||||
public void setY(int y) {
|
||||
super.setY(y);
|
||||
label.setY(y);
|
||||
}
|
||||
|
||||
|
@ -305,7 +301,7 @@ public class Label {
|
|||
* @param x (float) : the new x coordonnate of the Label
|
||||
* @param y (float) : the new y coordonnate of the Label
|
||||
*/
|
||||
public void setPosition(float x, float y){
|
||||
public void setPosition(int x, int y){
|
||||
this.setX(x);
|
||||
this.setY(y);
|
||||
}
|
||||
|
@ -323,7 +319,7 @@ public class Label {
|
|||
* @return witdh (int) : the width
|
||||
*/
|
||||
public int getWitdh() {
|
||||
return witdh;
|
||||
return super.width;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -331,7 +327,7 @@ public class Label {
|
|||
* @return height (int) : the height
|
||||
*/
|
||||
public int getHeight() {
|
||||
return height;
|
||||
return super.height;
|
||||
}
|
||||
|
||||
/**
|
11
src/globalgamejam/gui/IActionGUI.java
Normal file
11
src/globalgamejam/gui/IActionGUI.java
Normal file
|
@ -0,0 +1,11 @@
|
|||
package globalgamejam.gui;
|
||||
|
||||
/**
|
||||
* Created by trexr on 20/01/2017.
|
||||
*/
|
||||
public interface IActionGUI {
|
||||
public void enter(float mouseX,float mouseY);
|
||||
public void leave(float mouseX,float mouseY);
|
||||
public void move(float mouseX,float mouseY);
|
||||
public void clicked(float mouseX,float mouseY,int buttonKey,int buttonState);
|
||||
}
|
|
@ -123,7 +123,7 @@ public class Input{
|
|||
return state.get(button + MOUSE_OFFSET) == PRESSED || state.get(button + MOUSE_OFFSET) == REPEATED;
|
||||
}
|
||||
|
||||
public static int isButtonState(int button){
|
||||
public static int getButtonState(int button){
|
||||
return state.get(button + MOUSE_OFFSET);
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ public class Input{
|
|||
return state.get(key) == PRESSED || state.get(key) == REPEATED;
|
||||
}
|
||||
|
||||
public static int isKeyState(int key){
|
||||
public static int getKeyState(int key){
|
||||
return state.get(key);
|
||||
}
|
||||
|
||||
|
|
|
@ -82,8 +82,6 @@ public class Matrix4f {
|
|||
return mat;
|
||||
}
|
||||
|
||||
public Matrix4f translate(float x,float y,float z){
|
||||
|
||||
public Matrix4f translate(float x,float y,float z){
|
||||
Matrix4f mat = new Matrix4f(new float[][]{
|
||||
{1,0,0,x},
|
||||
|
|
|
@ -18,7 +18,8 @@ public class DisplayManager {
|
|||
|
||||
public static void preRender2D(){
|
||||
projection.loadIdentity();
|
||||
projection.Ortho2D(-Main.WIDTH/2.0f, Main.WIDTH/2.0f, -Main.HEIGHT/2.0f, Main.HEIGHT/2.0f, -1, 1);
|
||||
// projection.Ortho2D(-Main.WIDTH/2.0f, Main.WIDTH/2.0f, -Main.HEIGHT/2.0f, Main.HEIGHT/2.0f, -1, 1);
|
||||
projection.Ortho2D(0, Main.WIDTH, 0, Main.HEIGHT, -1, 1);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LESS);
|
||||
glEnable(GL_BLEND);
|
||||
|
|
Reference in a new issue