mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2025-10-31 21:50:44 +07:00
make slick the install process
This commit is contained in:
parent
5b29f8e3cc
commit
b2a1c60372
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
.vs
|
||||||
FNA/
|
FNA/
|
||||||
ImGui.NET/
|
ImGui.NET/
|
||||||
fnalibs/
|
fnalibs/
|
||||||
|
|||||||
40
getFNA.sh
40
getFNA.sh
@ -122,40 +122,50 @@ function getLibs()
|
|||||||
# Get the directory of this script
|
# Get the directory of this script
|
||||||
MY_DIR=$(dirname "$BASH_SOURCE")
|
MY_DIR=$(dirname "$BASH_SOURCE")
|
||||||
|
|
||||||
|
|
||||||
|
# gather input
|
||||||
|
|
||||||
# FNA
|
# FNA
|
||||||
if [ ! -d "$MY_DIR/FNA" ]; then
|
if [ ! -d "$MY_DIR/FNA" ]; then
|
||||||
read -p "Download FNA (y/n)? " shouldDownload
|
read -p "Download FNA (y/n)? " shouldDownload
|
||||||
if [[ $shouldDownload =~ ^[Yy]$ ]]; then
|
|
||||||
downloadFNA
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
read -p "Update FNA (y/n)? " shouldUpdate
|
read -p "Update FNA (y/n)? " shouldUpdate
|
||||||
if [[ $shouldUpdate =~ ^[Yy]$ ]]; then
|
|
||||||
updateFNA
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# FNALIBS
|
|
||||||
if [ ! -d "$MY_DIR/fnalibs" ]; then
|
if [ ! -d "$MY_DIR/fnalibs" ]; then
|
||||||
read -p "Download fnalibs (y/n)? " shouldDownloadLibs
|
read -p "Download fnalibs (y/n)? " shouldDownloadLibs
|
||||||
else
|
else
|
||||||
read -p "Redownload fnalibs (y/n)? " shouldDownloadLibs
|
read -p "Redownload fnalibs (y/n)? " shouldDownloadLibs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Dear ImGui
|
||||||
|
if [ ! -d "$MY_DIR/ImGui.NET" ]; then
|
||||||
|
read -p "Download ImGui.NET (y/n)? " shouldDownload
|
||||||
|
else
|
||||||
|
read -p "Update ImGui.NET (y/n)? " shouldUpdate
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# act on the input
|
||||||
|
|
||||||
|
# FNA
|
||||||
|
if [[ $shouldDownload =~ ^[Yy]$ ]]; then
|
||||||
|
downloadFNA
|
||||||
|
elif [[ $shouldUpdate =~ ^[Yy]$ ]]; then
|
||||||
|
updateFNA
|
||||||
|
fi
|
||||||
|
|
||||||
|
# FNALIBS
|
||||||
if [[ $shouldDownloadLibs =~ ^[Yy]$ ]]; then
|
if [[ $shouldDownloadLibs =~ ^[Yy]$ ]]; then
|
||||||
getLibs
|
getLibs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Dear ImGui
|
# Dear ImGui
|
||||||
if [ ! -d "$MY_DIR/ImGui.NET" ]; then
|
if [[ $shouldDownload =~ ^[Yy]$ ]]; then
|
||||||
read -p "Download ImGui.NET (y/n)? " shouldDownload
|
|
||||||
if [[ $shouldDownload =~ ^[Yy]$ ]]; then
|
|
||||||
downloadImGui
|
downloadImGui
|
||||||
fi
|
elif [[ $shouldUpdate =~ ^[Yy]$ ]]; then
|
||||||
else
|
|
||||||
read -p "Update ImGui.NET (y/n)? " shouldUpdate
|
|
||||||
if [[ $shouldUpdate =~ ^[Yy]$ ]]; then
|
|
||||||
updateImGui
|
updateImGui
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,9 +15,13 @@ namespace project_name
|
|||||||
System.Diagnostics.Debug.Listeners.Add(new System.Diagnostics.TextWriterTraceListener(System.Console.Out));
|
System.Diagnostics.Debug.Listeners.Add(new System.Diagnostics.TextWriterTraceListener(System.Console.Out));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// setup a Scene so we have something to show
|
||||||
var newScene = new Scene();
|
var newScene = new Scene();
|
||||||
newScene.addRenderer(new DefaultRenderer());
|
newScene.addRenderer(new DefaultRenderer());
|
||||||
|
|
||||||
|
// optionally render Nez in an ImGui window
|
||||||
|
newScene.finalRenderDelegate = new ImGuiFinalRenderDelegate();
|
||||||
|
|
||||||
var logo = newScene.content.Load<Microsoft.Xna.Framework.Graphics.Texture2D>("nez-logo-black");
|
var logo = newScene.content.Load<Microsoft.Xna.Framework.Graphics.Texture2D>("nez-logo-black");
|
||||||
newScene.createEntity("logo")
|
newScene.createEntity("logo")
|
||||||
.setPosition(Screen.center)
|
.setPosition(Screen.center)
|
||||||
|
|||||||
@ -39,7 +39,7 @@ namespace Nez
|
|||||||
Core.graphicsDevice.Clear( letterboxColor );
|
Core.graphicsDevice.Clear( letterboxColor );
|
||||||
|
|
||||||
|
|
||||||
_imGuiRenderer.BeforeLayout(new GameTime(TimeSpan.FromDays(0), TimeSpan.FromMilliseconds(Time.deltaTime * 1000)));
|
_imGuiRenderer.BeforeLayout(Time.time);
|
||||||
layoutGui();
|
layoutGui();
|
||||||
_imGuiRenderer.AfterLayout();
|
_imGuiRenderer.AfterLayout();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user