shithub: map

Download patch

ref: c6a16dc58a2cb3152cd0b08b81fbf85df713280b
parent: 3cbc44156098b3e1d2a5fce0bdb25aaa991efe2b
author: sirjofri <sirjofri@sirjofri.de>
date: Sun Feb 9 11:28:20 EST 2025

updates code to match new libnate version

--- a/map.c
+++ b/map.c
@@ -37,7 +37,7 @@
 	if (new && getwindow(display, Refnone) < 0)
 		sysfatal("%r");
 	
-	nateredraw();
+	nateredraw(1);
 }
 
 int
@@ -61,15 +61,15 @@
 	
 	inittestimage();
 	
-	NAssign(NWindow, &mainwindow, New_Window())
+	NAssign(NWindow, &mainwindow, New_Window(nil))
 	->MakeRoot()
 	->Slot(
-		New_VBox()
+		New_VBox(nil)
 		->Slot(
-			New_HBox()
+			New_HBox("menu")
 			->SizeToContent(1)
 			->Slot(
-				New_Button()
+				New_Button(nil)
 				->SizeToContent(1)
 				->Border(1, display->black)
 				->Label("Exit")
@@ -76,7 +76,7 @@
 				->OnClick(exitclicked, nil)
 			)
 			->Slot(
-				New_Button()
+				New_Button(nil)
 				->SizeToContent(1)
 				->Label("Test")
 				->Border(1, display->black)
@@ -83,26 +83,26 @@
 			)
 		)
 		->Slot(
-			New_Box()
+			New_Box(nil)
 			->Border(1, display->black)
 			->Size(Pt(200, 300))
 			->Slot(
-				NAssign(NImage, &nimage, New_Image())
+				NAssign(NImage, &nimage, New_Image("map"))
 				->Image(testimage)
 			)
 		)
 		->Slot(
-			New_Box()
+			New_Box(nil)
 			->Border(1, display->black)
 			->Size(Pt(500, 30))
 			->Slot(
-				New_Label()
+				New_Label(nil)
 				->Label("Status Line")
 			)
 		)
 	);
 	
-	nateredraw();
+	nateredraw(1);
 	
 	for (;;) {
 		switch (event(&ev)) {
--