Archived
Formatting tweaks, added window destructor
This commit is contained in:
@@ -118,7 +118,7 @@ namespace Worldbuilder
|
||||
|
||||
public void OnResize(Gtk.Widget widget, int width, int height)
|
||||
{
|
||||
print("SceneRenderer / Resizing...\n");
|
||||
// print("SceneRenderer / Resizing...\n");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+9
-5
@@ -18,22 +18,26 @@
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace Worldbuilder
|
||||
{
|
||||
[GtkTemplate (ui = "/com/brodybrooks/WorldBuilder/window.ui")]
|
||||
namespace Worldbuilder {
|
||||
[GtkTemplate(ui = "/com/brodybrooks/WorldBuilder/window.ui")]
|
||||
public class Window : Adw.ApplicationWindow {
|
||||
[GtkChild]
|
||||
private unowned Gtk.GLArea draw_area;
|
||||
|
||||
private SceneRenderer renderer;
|
||||
|
||||
public Window (Gtk.Application app) {
|
||||
Object (application: app);
|
||||
public Window(Gtk.Application app) {
|
||||
Object(application: app);
|
||||
renderer = new SceneRenderer();
|
||||
|
||||
draw_area.realize.connect(renderer.Setup);
|
||||
draw_area.render.connect(renderer.Render);
|
||||
draw_area.resize.connect(renderer.OnResize);
|
||||
}
|
||||
|
||||
~Window()
|
||||
{
|
||||
print("Closing!!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user