Plugin:MirLua/Module/m icolib/de: Difference between revisions
Jump to navigation
Jump to search
Wishmaster (talk | contribs) (Created page with "Registriert ein Icon.") |
Wishmaster (talk | contribs) (Created page with "Beschreibung.") |
||
Line 25: | Line 25: | ||
| style="text-align:center" | {{Ls|YesNo/yes}} | | style="text-align:center" | {{Ls|YesNo/yes}} | ||
| style="text-align:center" | <code>string</code> | | style="text-align:center" | <code>string</code> | ||
| | | Beschreibung. | ||
|- | |- | ||
! scope="row" class="MirLuaParametersTable-parameter" | section | ! scope="row" class="MirLuaParametersTable-parameter" | section |
Revision as of 01:43, 4 November 2024
Allows you to work with icons.
Inkludieren Sie folgendes Modul: local icolib = require('m_icolib')
AddIcon
Registriert ein Icon.
Parameter
Parametername | Benötigt | Typ | Beschreibung |
---|---|---|---|
name | Ja | string
|
Unique icon name. |
description | Ja | string
|
Beschreibung. |
section | Nein | string
|
Section name in Miranda icon settings. By default plugin name (MirLua) is used. |
path | Nein | string
|
Default icon file to use. By default path to executable file of Miranda NG is used. |
Ergebnis
Typ: light userdata
Returns icon handle if icon was registered successfully, otherwise nil
.
Beispiel
local hIcon = icolib.AddIcon('iconUniqueName', 'My super icon')
GetIcon
Returns icon handle.
Parameter
Parametername | Benötigt | Typ | Beschreibung |
---|---|---|---|
name | Ja | string
|
Unique icon name. |
Ergebnis
Typ: boolean
Returns icon handle if icon was found, otherwise nil
.
Beispiel
if icolib.GetIcon('iconUniqueName') then
print('Icon iconUniqueName exists')
end
GetIconHandle
RemoveIcon
Removes an icon.
Parameter
Parametername | Benötigt | Typ | Beschreibung |
---|---|---|---|
name | Ja | string
|
Unique icon name. |
Beispiel
icolib.RemoveIcon('iconUniqueName')