IsMTAWindowActive: Difference between revisions
Jump to navigation
Jump to search
m (Fix OOP syntax) |
mNo edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
* Transferbox | * Transferbox | ||
To get the status of the debug view, see [[isDebugViewActive]]. | To get the status of the debug view, see [[isDebugViewActive]]. | ||
{{Note|You cannot rely on this function to get the focus state of the MTA window - use [[isMTAWindowFocused]] instead}} | |||
==Syntax== | ==Syntax== | ||
Line 12: | Line 14: | ||
bool isMTAWindowActive () | bool isMTAWindowActive () | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[GUI_widgets|GuiElement]].isMTAWindowActive | {{OOP||[[GUI_widgets|GuiElement]].isMTAWindowActive}} | ||
===Returns=== | ===Returns=== | ||
Line 30: | Line 32: | ||
{{GUI_functions}} | {{GUI_functions}} | ||
[[ru:isMTAWindowActive]] | [[ru:isMTAWindowActive]] | ||
{{GUI_events}} |
Latest revision as of 15:04, 8 October 2022
This function returns whether any system windows that take focus are active. This includes:
- Chatbox input
- Console window
- Main menu
- Transferbox
To get the status of the debug view, see isDebugViewActive.
Syntax
bool isMTAWindowActive ()
OOP Syntax Help! I don't understand this!
- Method: GuiElement.isMTAWindowActive(...)
Returns
Returns true if the focus is on the MTA window, false if it isn't.
Example
This piece of script will kill a player if he has any of the above system windows open
function dontAllowAnyOpenWindow () if isMTAWindowActive () then setElementHealth ( getLocalPlayer(), 0.0 ) end end setTimer ( dontAllowAnyOpenWindow, 50, 0 )
See Also
General functions
- guiBringToFront
- getChatboxLayout
- getChatboxCharacterLimit
- guiCreateFont
- guiBlur
- guiFocus
- guiGetAlpha
- guiGetCursorType
- guiGetEnabled
- guiGetFont
- guiGetInputEnabled
- guiGetInputMode
- guiGetPosition
- guiGetProperties
- guiGetProperty
- guiGetScreenSize
- guiGetSize
- guiGetText
- guiGetVisible
- guiMoveToBack
- guiSetAlpha
- guiSetEnabled
- guiSetFont
- guiSetInputEnabled
- guiSetInputMode
- guiSetPosition
- guiSetProperty
- guiSetSize
- guiSetText
- guiSetVisible
- isChatBoxInputActive
- isConsoleActive
- isDebugViewActive
- isMainMenuActive
- isMTAWindowActive
- isTransferBoxActive
- setChatboxCharacterLimit
- setDebugViewActive
Browsers
Buttons
Checkboxes
Comboboxes
- guiCreateComboBox
- guiComboBoxAddItem
- guiComboBoxClear
- guiComboBoxGetItemCount
- guiComboBoxGetItemText
- guiComboBoxGetSelected
- guiComboBoxIsOpen
- guiComboBoxRemoveItem
- guiComboBoxSetItemText
- guiComboBoxSetOpen
- guiComboBoxSetSelected
Edit Boxes
- guiCreateEdit
- guiEditGetCaretIndex
- guiEditGetMaxLength
- guiEditIsMasked
- guiEditIsReadOnly
- guiEditSetCaretIndex
- guiEditSetMasked
- guiEditSetMaxLength
- guiEditSetReadOnly
Gridlists
- guiCreateGridList
- guiGridListAddColumn
- guiGridListAddRow
- guiGridListAutoSizeColumn
- guiGridListClear
- guiGridListGetColumnCount
- guiGridListGetColumnTitle
- guiGridListGetColumnWidth
- guiGridListGetHorizontalScrollPosition
- guiGridListGetItemColor
- guiGridListGetItemData
- guiGridListGetItemText
- guiGridListGetRowCount
- guiGridListGetSelectedCount
- guiGridListGetSelectedItem
- guiGridListGetSelectedItems
- guiGridListGetSelectionMode
- guiGridListIsSortingEnabled
- guiGridListGetVerticalScrollPosition
- guiGridListInsertRowAfter
- guiGridListRemoveColumn
- guiGridListRemoveRow
- guiGridListSetColumnTitle
- guiGridListSetColumnWidth
- guiGridListSetHorizontalScrollPosition
- guiGridListSetItemColor
- guiGridListSetItemData
- guiGridListSetItemText
- guiGridListSetScrollBars
- guiGridListSetSelectedItem
- guiGridListSetSelectionMode
- guiGridListSetSortingEnabled
- guiGridListSetVerticalScrollPosition
Memos
- guiCreateMemo
- guiMemoGetCaretIndex
- guiMemoGetVerticalScrollPosition
- guiMemoSetVerticalScrollPosition
- guiMemoIsReadOnly
- guiMemoSetCaretIndex
- guiMemoSetReadOnly
Progressbars
Radio Buttons
Scrollbars
Scrollpanes
- guiCreateScrollPane
- guiScrollPaneGetHorizontalScrollPosition
- guiScrollPaneGetVerticalScrollPosition
- guiScrollPaneSetHorizontalScrollPosition
- guiScrollPaneSetScrollBars
- guiScrollPaneSetVerticalScrollPosition
Static Images
Tab Panels
Tabs
Text Labels
- guiCreateLabel
- guiLabelGetColor
- guiLabelGetFontHeight
- guiLabelGetTextExtent
- guiLabelSetColor
- guiLabelSetHorizontalAlign
- guiLabelSetVerticalAlign
Windows
Input
GUI
- onClientGUIAccepted
- onClientGUIBlur
- onClientGUIChanged
- onClientGUIClick
- onClientGUIComboBoxAccepted
- onClientGUIDoubleClick
- onClientGUIFocus
- onClientGUIMouseDown
- onClientGUIMouseUp
- onClientGUIMove
- onClientGUIScroll
- onClientGUISize
- onClientGUITabSwitched
- onClientMouseEnter
- onClientMouseLeave
- onClientMouseMove
- onClientMouseWheel