From WikiChip
Editing mirc/picture windows

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 1: Line 1:
{{mirc title|Picture Windows}}
+
{{mIRC Guide}}
 
'''Picture Windows''' in [[mIRC]] are a special type of [[Custom windows - mIRC|custom windows]] that is used as a drawing canvas. mIRC provides a set of [[list of commands - mIRC|commands]], [[list of identifiers - mIRC|identifiers]], and [[on events - mIRC|events]] for manipulating them. Picture windows provide an alternative mean of creating a graphical user interface.
 
'''Picture Windows''' in [[mIRC]] are a special type of [[Custom windows - mIRC|custom windows]] that is used as a drawing canvas. mIRC provides a set of [[list of commands - mIRC|commands]], [[list of identifiers - mIRC|identifiers]], and [[on events - mIRC|events]] for manipulating them. Picture windows provide an alternative mean of creating a graphical user interface.
  
Line 56: Line 56:
  
 
'''{{mIRC|/drawreplace}}''' can be used to replace a color with another in a specific area
 
'''{{mIRC|/drawreplace}}''' can be used to replace a color with another in a specific area
 +
 +
'''Note''': If you get mIRC to draw beyond the current size of the bitmap, the bitmap is extended as needed and mIRC keeps track of where you have drawn.
  
 
== /draw* example ==
 
== /draw* example ==
Line 87: Line 89:
 
Result in:
 
Result in:
  
[[File:Draw_.gif|drawing example]]
+
[[File:Draw.gif|drawing example]]
  
 
== Mouse Events ==
 
== Mouse Events ==
Line 104: Line 106:
 
== Keyboard Events ==
 
== Keyboard Events ==
  
You can catch keyboard input using the {{mIRC|on events/on keydown|on keydown}} and {{mIRC|on events/on keyup|on keyup}} events, which triggers when a key is pressed and released respectively.
+
You can catch keyboard input using the {{mIRC|on events/on keydown}} and {{mIRC|on events/on keyup}} events, which triggers when a key is pressed and released respectively.
  
 
Synopsis: on <level>:<keydown|keyup>:<@window>:<keys>:<command>
 
Synopsis: on <level>:<keydown|keyup>:<@window>:<keys>:<command>
  
<keys> can be a comma sepereated list of key, which are nothing more than number, representing a key, {{mIRC|$keyval}} returns the key code while {{mIRC|$keychar}} returns the actual character of the key. {{mIRC|$keyrpt}} returns $true if the event is triggering because the key is being held down (on keydown only).
+
<keys> can be a comma sepereated list of key, which are nothing more than number, representing a key, {{mIRC|$keyval}} returns the key code while {{mIRC|$keychar}} returns the actual character of the key. {{mIRC|$keyrpt}} returns $true if the event is triggering because the key is being hold down (on keydown only).
  
 
== The $mouse identifier ==
 
== The $mouse identifier ==
Line 150: Line 152:
 
Returns $true if the first point x y is inside the rectangle specified by the 'x y w h' parameters, and $false if it is not.
 
Returns $true if the first point x y is inside the rectangle specified by the 'x y w h' parameters, and $false if it is not.
  
== The {{mIRC|$inroundrect}} identifier ==
+
== The {{mIRC|$inrectround}} identifier ==
  
Synopsis: $inroundrect(x,y,x,y,w,h,w,h)
+
Synopsis: $inrectround(x,y,x,y,w,h,w,h)
  
 
Returns $true if the first point x y is inside the rounded rectangle specified by the 'x y w h' parameters, where the extra 'w h' parameters represent the value used in /drawrect to get the rounded corner, and $false if it is not.
 
Returns $true if the first point x y is inside the rounded rectangle specified by the 'x y w h' parameters, where the extra 'w h' parameters represent the value used in /drawrect to get the rounded corner, and $false if it is not.
Line 200: Line 202:
 
'''$window''' itself returns the name of the window which was just left in the '''leave''' mouse event in a menu definition.
 
'''$window''' itself returns the name of the window which was just left in the '''leave''' mouse event in a menu definition.
  
When used with arguments, if you use a name, it can be a {{mirc|wildcard}} and can be used with the N parameter to represent the Nth window matching.
+
When used with arguments, if you use a name, it can be a wildcard and can be used with the N parameter to represent the Nth window matching.
 
As far as picture window are concerned, $window() has only one couple of properties you can use, '''.bw & .bh''' will return the width & height of the bitmap.
 
As far as picture window are concerned, $window() has only one couple of properties you can use, '''.bw & .bh''' will return the width & height of the bitmap.
  
Line 209: Line 211:
 
Can returns the size, width and height of a .bmp, .jpg or .png file
 
Can returns the size, width and height of a .bmp, .jpg or .png file
  
[[Category:mIRC|picture windows]]
+
[[Category:mIRC]]

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)