<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to UI_BUTTON</title><link>https://sourceforge.net/p/pirobot/wiki/UI_BUTTON/</link><description>Recent changes to UI_BUTTON</description><atom:link href="https://sourceforge.net/p/pirobot/wiki/UI_BUTTON/feed" rel="self"/><language>en</language><lastBuildDate>Wed, 15 Jan 2025 01:43:13 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/pirobot/wiki/UI_BUTTON/feed" rel="self" type="application/rss+xml"/><item><title>UI_BUTTON modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/UI_BUTTON/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -7,7 +7,7 @@
 ##class UI_SURFBUTTON
  A button with two images (default and mouseover).

-###def __init__(self, promillex, promilley, promillewidth, promilleheight, proportions)
+###def _ _ init _ _ (self, promillex, promilley, promillewidth, promilleheight, proportions)
 Constructor for the `UI_SURFBUTTON`.

 - promillex, promilley: The position on the screen in promille. Default: 0
@@ -42,7 +42,7 @@
 ##class UI_CIRCLEBUTTON
 A circular button to click on.

-###def __init__(self, posx, posy, radius)
+###def _ _ init _ _ (self, posx, posy, radius)
 The constructor of an UI_CIRCLEBUTTON

 - posx, posy: The position of the circle button in pixels.
&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, 15 Jan 2025 01:43:13 -0000</pubDate><guid>https://sourceforge.net5d6995bb92a2ff89a6673e5ac08f4d181a31fb6f</guid></item><item><title>UI_BUTTON modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/UI_BUTTON/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -7,34 +7,58 @@
 ##class UI_SURFBUTTON
  A button with two images (default and mouseover).

-###__init__(self, promillex, promilley, promillewidth, promilleheight, proportions)
+###def __init__(self, promillex, promilley, promillewidth, promilleheight, proportions)
 Constructor for the `UI_SURFBUTTON`.

 - promillex, promilley: The position on the screen in promille. Default: 0
 - promillewidth, promilleheight: The width and height of the button on the screen, in promille. Default: UI_BUTTON_STANDARD_SIZE
 - proportions: Which parts of the screen to take for reference. Default: 0  (0 = w, h / 1 = h, h / -1 = w, w)

-###setMouseDownFunc(self, func, value)
+###def setMouseDownFunc(self, func, value)
 Set a function to be called and value to be given when the mouse is down over the button.

-###setMouseUpFunc(self, func, value)
+###def setMouseUpFunc(self, func, value)
 Set a function to be called and value to be given when the mouse was released over the button.

-###setPosition(self, promillex, promilley)
+###def setPosition(self, promillex, promilley)
 Set the position of the button in promille of the screen size.

-###setSize(self, promillewidth, promilleheight)
+###def setSize(self, promillewidth, promilleheight)
 Set the size of the button in promille of the screen size.

-###setDefaultSurface(self, surf1)
+###def setDefaultSurface(self, surf1)
 Set default pygame-surface (image) to be shown when nothing is over the button.

-###setMouseOverSurface(self, surf2)
+###def setMouseOverSurface(self, surf2)
 Set the pygame-surface (image) to be shown when the mouse is over the button.

-###update(self, screen, deltatime, orientation)
+###def update(self, screen, deltatime, orientation)
 Call this in your update call when you want to show and activate the button.
+
 - screen: The pygame screen surface to draw on.
 - deltatime: The deltatime to pass on, in fractures of a second.
 - orientation: The screen orientation. (0-3)

+##class UI_CIRCLEBUTTON
+A circular button to click on.
+
+###def __init__(self, posx, posy, radius)
+The constructor of an UI_CIRCLEBUTTON
+
+- posx, posy: The position of the circle button in pixels.
+- radius: The radius of the circle button in pixels.
+
+###def update(self, screen, deltatime)
+Call this in your update function if you want to show and activate this circlebutton.
+
+- screen: The pygame screen surface to draw to.
+- deltatime: The deltatime passed on in fractions of a second.
+
+###def setMouseDownFunc(self, func, value)
+The function to call with the given value if the mouse is down over this button.
+
+###def setMouseUpFunc(self, func, value)
+The function to call with the given value if the mouse is released over this button.
+
+###def setPromillePosition(self, promillex, promilley)
+Set the position of this button in promille of the screen size.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Tue, 14 Jan 2025 23:45:13 -0000</pubDate><guid>https://sourceforge.net539a6bd49b9b161bcdfc544088561e25c0744d39</guid></item><item><title>UI_BUTTON modified by Benedict Jäggi</title><link>https://sourceforge.net/p/pirobot/wiki/UI_BUTTON/</link><description>&lt;div class="markdown_content"&gt;&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#ui_button"&gt;UI_BUTTON&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#class-ui_surfbutton"&gt;class UI_SURFBUTTON&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#initself-promillex-promilley-promillewidth-promilleheight-proportions"&gt;init(self, promillex, promilley, promillewidth, promilleheight, proportions)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#setmousedownfuncself-func-value"&gt;setMouseDownFunc(self, func, value)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#setmouseupfuncself-func-value"&gt;setMouseUpFunc(self, func, value)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#setpositionself-promillex-promilley"&gt;setPosition(self, promillex, promilley)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#setsizeself-promillewidth-promilleheight"&gt;setSize(self, promillewidth, promilleheight)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#setdefaultsurfaceself-surf1"&gt;setDefaultSurface(self, surf1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#setmouseoversurfaceself-surf2"&gt;setMouseOverSurface(self, surf2)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#updateself-screen-deltatime-orientation"&gt;update(self, screen, deltatime, orientation)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h1 id="ui_button"&gt;UI_BUTTON&lt;/h1&gt;
&lt;p&gt;import over &lt;code&gt;appdata/CodeLibs/UI/UI_BUTTON.py&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;An UI-library concerning buttons with images and circular buttons.&lt;/p&gt;
&lt;h2 id="class-ui_surfbutton"&gt;class UI_SURFBUTTON&lt;/h2&gt;
&lt;p&gt;A button with two images (default and mouseover).&lt;/p&gt;
&lt;h3 id="initself-promillex-promilley-promillewidth-promilleheight-proportions"&gt;&lt;strong&gt;init&lt;/strong&gt;(self, promillex, promilley, promillewidth, promilleheight, proportions)&lt;/h3&gt;
&lt;p&gt;Constructor for the &lt;code&gt;UI_SURFBUTTON&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;promillex, promilley: The position on the screen in promille. Default: 0&lt;/li&gt;
&lt;li&gt;promillewidth, promilleheight: The width and height of the button on the screen, in promille. Default: UI_BUTTON_STANDARD_SIZE&lt;/li&gt;
&lt;li&gt;proportions: Which parts of the screen to take for reference. Default: 0  (0 = w, h / 1 = h, h / -1 = w, w)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="setmousedownfuncself-func-value"&gt;setMouseDownFunc(self, func, value)&lt;/h3&gt;
&lt;p&gt;Set a function to be called and value to be given when the mouse is down over the button.&lt;/p&gt;
&lt;h3 id="setmouseupfuncself-func-value"&gt;setMouseUpFunc(self, func, value)&lt;/h3&gt;
&lt;p&gt;Set a function to be called and value to be given when the mouse was released over the button.&lt;/p&gt;
&lt;h3 id="setpositionself-promillex-promilley"&gt;setPosition(self, promillex, promilley)&lt;/h3&gt;
&lt;p&gt;Set the position of the button in promille of the screen size.&lt;/p&gt;
&lt;h3 id="setsizeself-promillewidth-promilleheight"&gt;setSize(self, promillewidth, promilleheight)&lt;/h3&gt;
&lt;p&gt;Set the size of the button in promille of the screen size.&lt;/p&gt;
&lt;h3 id="setdefaultsurfaceself-surf1"&gt;setDefaultSurface(self, surf1)&lt;/h3&gt;
&lt;p&gt;Set default pygame-surface (image) to be shown when nothing is over the button.&lt;/p&gt;
&lt;h3 id="setmouseoversurfaceself-surf2"&gt;setMouseOverSurface(self, surf2)&lt;/h3&gt;
&lt;p&gt;Set the pygame-surface (image) to be shown when the mouse is over the button.&lt;/p&gt;
&lt;h3 id="updateself-screen-deltatime-orientation"&gt;update(self, screen, deltatime, orientation)&lt;/h3&gt;
&lt;p&gt;Call this in your update call when you want to show and activate the button.&lt;br/&gt;
- screen: The pygame screen surface to draw on.&lt;br/&gt;
- deltatime: The deltatime to pass on, in fractures of a second.&lt;br/&gt;
- orientation: The screen orientation. (0-3)&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benedict Jäggi</dc:creator><pubDate>Tue, 14 Jan 2025 23:25:56 -0000</pubDate><guid>https://sourceforge.netebecc1d18b65319295bce00a9a863d7ec257b9d3</guid></item></channel></rss>