<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to APP_TEMPLATE</title><link>https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/</link><description>Recent changes to APP_TEMPLATE</description><atom:link href="https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/feed" rel="self"/><language>en</language><lastBuildDate>Wed, 24 Apr 2024 20:26:36 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/feed" rel="self" type="application/rss+xml"/><item><title>APP_TEMPLATE modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v29
+++ v30
@@ -24,21 +24,6 @@
 Will be called when you **first** start the app. It will be called **once** in the whole system running process. 
 If you want to do something each time the app is switched to, use `onSwitchToApp()` instead.

-###def onSwitchToApp(self)
-Gets called every time the app is switched to with `APP_BASE.setCurrentApp()`.
-
-###def onLeaveApp(self)
-Gets called when this is the active app and APP_BASE.setCurrentApp is called.
-(Even if the new App is the same App.)
-
-###def onMouseDown(self)
-Gets called ONCE when the display is touched FIRST.
-If you need the mouse position, import `UITools.py` and use `UITools.mousex` and `UITools.mousey`.
-
-###def onMouseUp(self)
-Gets called ONCE when the display is released.
-If you need the mouse position, import `UITools.py` and use `UITools.mousex` and `UITools.mousey`.
-
 ###def update(self, screen, deltatime)
 This is the main update function of your app. It gets called every frame, after the screen was cleared and before the display gets flipped.
 Use that function to update and draw your app. This function is only called on the current running App.
@@ -56,6 +41,21 @@

 `deltatime` is the time that passed since the last frame in seconds. See `update` above  for further information.

+###def onSwitchToApp(self)
+Gets called every time the app is switched to with `APP_BASE.setCurrentApp()`.
+
+###def onLeaveApp(self)
+Gets called when this is the active app and APP_BASE.setCurrentApp is called.
+(Even if the new App is the same App.)
+
+###def onMouseDown(self)
+Gets called ONCE when the display is touched FIRST.
+If you need the mouse position, import `UITools.py` and use `UITools.mousex` and `UITools.mousey`.
+
+###def onMouseUp(self)
+Gets called ONCE when the display is released.
+If you need the mouse position, import `UITools.py` and use `UITools.mousex` and `UITools.mousey`.
+
 ---------

 That's everything you need to create, initialize and update your app. Have Fun creating your own one.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Wed, 24 Apr 2024 20:26:36 -0000</pubDate><guid>https://sourceforge.net46dffdf05aa1891796b2a7fa70b80ef29e1f05cf</guid></item><item><title>APP_TEMPLATE modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v28
+++ v29
@@ -27,6 +27,10 @@
 ###def onSwitchToApp(self)
 Gets called every time the app is switched to with `APP_BASE.setCurrentApp()`.

+###def onLeaveApp(self)
+Gets called when this is the active app and APP_BASE.setCurrentApp is called.
+(Even if the new App is the same App.)
+
 ###def onMouseDown(self)
 Gets called ONCE when the display is touched FIRST.
 If you need the mouse position, import `UITools.py` and use `UITools.mousex` and `UITools.mousey`.
@@ -50,6 +54,8 @@

 e.g. Update an alarm clock timer with `backgroundUpdate` so that it updates the time even if another App is running.

+`deltatime` is the time that passed since the last frame in seconds. See `update` above  for further information.
+
 ---------

 That's everything you need to create, initialize and update your app. Have Fun creating your own one.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Wed, 24 Apr 2024 20:25:32 -0000</pubDate><guid>https://sourceforge.net3b41f816ded72e25c9f996e76220b260547f5f0f</guid></item><item><title>APP_TEMPLATE modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v27
+++ v28
@@ -22,7 +22,7 @@

 ###def initialize(self)
 Will be called when you **first** start the app. It will be called **once** in the whole system running process. 
-If you want to do something each time the app is switched to, use `onSwitchToApp() `instead.
+If you want to do something each time the app is switched to, use `onSwitchToApp()` instead.

 ###def onSwitchToApp(self)
 Gets called every time the app is switched to with `APP_BASE.setCurrentApp()`.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Wed, 24 Apr 2024 12:14:33 -0000</pubDate><guid>https://sourceforge.netecc893658f2b065f0afebc1e86abb2b2ba8da6c8</guid></item><item><title>APP_TEMPLATE modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v26
+++ v27
@@ -54,7 +54,7 @@

 That's everything you need to create, initialize and update your app. Have Fun creating your own one.
 You can draw stuff using the `pygame` library which is used all over in this system.
-Pygame has its own documentation here: [https://www.pygame.org/docs/]
+Pygame has its own documentation here: https://www.pygame.org/docs/

 ---------

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Wed, 24 Apr 2024 06:38:47 -0000</pubDate><guid>https://sourceforge.net4b5a6caeba470dff3949ea84154a214af1f4f57f</guid></item><item><title>APP_TEMPLATE modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v25
+++ v26
@@ -37,14 +37,24 @@

 ###def update(self, screen, deltatime)
 This is the main update function of your app. It gets called every frame, after the screen was cleared and before the display gets flipped.
-Use that function to update and draw your app.
+Use that function to update and draw your app. This function is only called on the current running App.

 `screen` is the pygame screen surface to be drawed on. Use it when you draw directly to the screen.
 `deltatime` is the time in seconds that passed since the last frame. e.g. 0.01 = 10ms. Use it to update your stuff "in time".
 e.g. `x = x + speed * deltatime` = move `speed` pixels in one second

+###def backgroundUpdate(self, deltatime)
+This is the update function for Apps that run in the background (no matter which App is the active one).
+It gets called every frame for ALL Apps that are initialized. It also gets called when the App is the current one, 
+right before the Apps `update` function.
+
+e.g. Update an alarm clock timer with `backgroundUpdate` so that it updates the time even if another App is running.
+
+---------
+
 That's everything you need to create, initialize and update your app. Have Fun creating your own one.
 You can draw stuff using the `pygame` library which is used all over in this system.
+Pygame has its own documentation here: [https://www.pygame.org/docs/]

 ---------

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Wed, 24 Apr 2024 06:38:15 -0000</pubDate><guid>https://sourceforge.netfaed260463877aa13d2fba8f5eb8f5be995d65ed</guid></item><item><title>APP_TEMPLATE modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v24
+++ v25
@@ -8,7 +8,8 @@
 Use this template to create your own apps.
 Just save it as another file name and fiddle around with it.
 Don't forget to import  it in `MAIN.py` ([MAIN]), else it won't work.
-Also, don't forget to set the right App name in the `APP_BASE.registerApplication` call at the end of the file. It's usually the App file name without _.py_.
+Also, don't forget to set the right App name in the `APP_BASE.registerApplication` call at the end of the file.
+It's usually the App file name without _.py_.
 This name is used when calling `APP_BASE.setCurrentApp`.

 ##App class Functions
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Wed, 20 Mar 2024 03:41:09 -0000</pubDate><guid>https://sourceforge.net8db7758bdc984cb06683a235adfc4783b1df17fa</guid></item><item><title>APP_TEMPLATE modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v23
+++ v24
@@ -7,7 +7,7 @@
 A basic application with a close button.
 Use this template to create your own apps.
 Just save it as another file name and fiddle around with it.
-Don't forget to import and register it in `MAIN.py` ([MAIN]), else it won't work.
+Don't forget to import  it in `MAIN.py` ([MAIN]), else it won't work.
 Also, don't forget to set the right App name in the `APP_BASE.registerApplication` call at the end of the file. It's usually the App file name without _.py_.
 This name is used when calling `APP_BASE.setCurrentApp`.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Wed, 20 Mar 2024 03:40:42 -0000</pubDate><guid>https://sourceforge.netebe8e957b4f4cdacef0e063f1f8265f6a0de8c5c</guid></item><item><title>APP_TEMPLATE modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v22
+++ v23
@@ -8,6 +8,8 @@
 Use this template to create your own apps.
 Just save it as another file name and fiddle around with it.
 Don't forget to import and register it in `MAIN.py` ([MAIN]), else it won't work.
+Also, don't forget to set the right App name in the `APP_BASE.registerApplication` call at the end of the file. It's usually the App file name without _.py_.
+This name is used when calling `APP_BASE.setCurrentApp`.

 ##App class Functions
 You can overwrite each of the following functions or leave them alone.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Wed, 20 Mar 2024 03:40:03 -0000</pubDate><guid>https://sourceforge.netd2ef989bad71f83d36dc9835da8b7d92244cd4b8</guid></item><item><title>APP_TEMPLATE modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v21
+++ v22
@@ -13,7 +13,7 @@
 You can overwrite each of the following functions or leave them alone.
 Note that, when you NOT overwrite the `update` function, it will draw the "empty application" screen.

-###def __init__()
+###def \_\_init\_\_()
 Constructor. Use this to create class member variables.
 But load stuff into them with `initialize()` when everything is set up properly.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Wed, 20 Mar 2024 03:35:12 -0000</pubDate><guid>https://sourceforge.net79f0987b23c54be8e9190c88c4e801d84cc38fd0</guid></item><item><title>APP_TEMPLATE modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/APP_TEMPLATE/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v20
+++ v21
@@ -12,6 +12,10 @@
 ##App class Functions
 You can overwrite each of the following functions or leave them alone.
 Note that, when you NOT overwrite the `update` function, it will draw the "empty application" screen.
+
+###def __init__()
+Constructor. Use this to create class member variables.
+But load stuff into them with `initialize()` when everything is set up properly.

 ###def initialize(self)
 Will be called when you **first** start the app. It will be called **once** in the whole system running process. 
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Wed, 20 Mar 2024 03:34:06 -0000</pubDate><guid>https://sourceforge.netd1e06c5b9b9b6d8f9a02f3b877cb83f2a9b7ad41</guid></item></channel></rss>