Application Configuration - sinusinu/Flora GitHub Wiki
NOTE: this document is currently wrong, please refer to FloraConfig.cs
Let's set some configuration on our application!
As you've seen, there is a FloraConfig object that gets fed into new FloraApplication(core, config) on Program.cs.
FloraConfig contains various launch configurations that your application can use, so you should look into it.
Begin with Simple Program:
Program.cs
using Flora;
using System;
namespace FloraTest {
class Program {
static void Main(string[] args) {
FloraConfig config = new FloraConfig() {
width = 800,
height = 600,
windowTitle = "My Awesome Game",
windowFlags = 0,
renderFlags = FloraConfig.FloraRenderFlags.Vsync
};
MyCore core = new MyCore();
new FloraApplication(core, config);
}
}
}
Currently FloraConfig has 5 variables that can be set.
widthandheightsets the size of window.windowTitlesets the title of the window.windowFlagsis a bitmask that is used in creating window.FloraWindowFlags.Maximizedmakes window maximized at start.FloraWindowFlags.Minimizedmakes window minimized at start. Be aware thatFloraCore.Renderwill not be called when the window is minimized.FloraWindowFlags.Resizablemakes window resizable.FloraWindowFlags.Borderlessmakes window borderless.- Default value is 0.
renderFlagsis a bitmask that is used in creating renderer.FloraRenderFlags.Vsyncmakes renderer sync in display refresh rate(a.k.a. V-sync).- Default value is
FloraRenderFlags.Vsync.