Difference between revisions of "love.mousepressed (Deutsch)"

m
(Update german translation.)
Line 1: Line 1:
Eine Callback-Funktion, die ausgeführt wird, wenn eine Maustaste gedrückt wird.
+
Eine Rückruffunktion, welche ausgeführt wird, wenn eine Maustaste gedrückt wird.
 
== Funktion ==
 
== Funktion ==
=== Überblick ===
+
=== Übersicht ===
 
<source lang="lua">
 
<source lang="lua">
 
love.mousepressed( x, y, button )
 
love.mousepressed( x, y, button )
 
</source>
 
</source>
 
=== Argumente ===
 
=== Argumente ===
{{param|number|x|Die x-Position der Maus.}}
+
{{param|number (Deutsch)|x|Die x-Position der Maus.}}
{{param|number|y|Die y-Position der Maus.}}
+
{{param|number (Deutsch)|y|Die y-Position der Maus.}}
{{param|MouseConstant|button|Die gedrückte Maustaste.}}
+
{{param|MouseConstant (Deutsch)|button|Die gedrückte Maustaste.}}
=== Rückgabewert ===
+
=== Rückgabewerte ===
Keiner.
+
Keine.
 +
== Beispiele ==
 +
Durch einen Links-Klick wird ein [[string (Deutsch)|String]] neu positioniert.
 +
<source lang="lua">
 +
function love.load()
 +
  printx = 0
 +
  printy = 0
 +
end
 +
function love.draw()
 +
  love.graphics.print("Text", printx, printy)
 +
end
 +
function love.mousepressed(x, y, button)
 +
  if button == "l" then
 +
      printx = x
 +
      printy = y
 +
  end
 +
end
 +
</source>
 
== Siehe auch ==
 
== Siehe auch ==
* [[parent::love (Deutsch)]]
+
* [[parent::love]]
 
[[Category:Callbacks]]
 
[[Category:Callbacks]]
{{#set:Description=Eine Callback-Funktion, die ausgeführt wird, wenn eine Maustaste gedrückt wird.}}
+
{{#set:Description=Eine Rückruffunktion, welche ausgeführt wird, wenn eine Maustaste gedrückt wird.}}
 +
{{#set:Subcategory=General}}
 +
{{#set:Since=000}}
 
== Andere Sprachen ==
 
== Andere Sprachen ==
 
{{i18n|love.mousepressed}}
 
{{i18n|love.mousepressed}}

Revision as of 13:11, 22 December 2014

Eine Rückruffunktion, welche ausgeführt wird, wenn eine Maustaste gedrückt wird.

Funktion

Übersicht

love.mousepressed( x, y, button )

Argumente

number (Deutsch) x
Die x-Position der Maus.
number (Deutsch) y
Die y-Position der Maus.
MouseConstant (Deutsch) button
Die gedrückte Maustaste.

Rückgabewerte

Keine.

Beispiele

Durch einen Links-Klick wird ein String neu positioniert.

function love.load()
   printx = 0
   printy = 0
end
function love.draw()
   love.graphics.print("Text", printx, printy)
end
function love.mousepressed(x, y, button)
   if button == "l" then
      printx = x
      printy = y
   end
end

Siehe auch


Andere Sprachen