GuiWindowSetMovable: Difference between revisions
Jump to navigation
Jump to search
JonChappell (talk | contribs) No edit summary |
m (Added OOP Counterpart Information) |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | {{Client function}} | ||
__NOTOC__ | |||
This function allows you to specify whether or not a user can move a GUI window. | This function allows you to specify whether or not a user can move a GUI window. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool guiWindowSetMovable ( element theElement, bool status ) | bool guiWindowSetMovable ( element theElement, bool status ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[Element/GUI/Window|GuiWindow]]:setMovable|movable|guiWindowIsMovable}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theElement:''' The window to be changed. | *'''theElement:''' The window to be changed. | ||
*'''status:''' A boolean value indicating whether the window is movable or not. | *'''status:''' A boolean value indicating whether the window is movable or not. | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' if the function is successful, ''false'' otherwise. | Returns ''true'' if the function is successful, ''false'' otherwise. | ||
==Example== | ==Example== | ||
This example creates a gui window and sets it to be not movable | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- | function initialize () | ||
-- Create a gui window | |||
-- | local window = guiCreateWindow ( 0.50, 0.50, 0.25, 0.25, "Test", true ) | ||
-- set it to be not movable | |||
guiWindowSetMovable ( window, false ) | |||
-- Show cursor to check if our changes work fine | |||
showCursor ( true ) | |||
end | |||
addEventHandler ( "onClientResourceStart", resourceRoot, initialize ) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{GUI_functions}} | {{GUI_functions}} | ||
{{GUI_events}} |
Latest revision as of 11:31, 7 August 2019
This function allows you to specify whether or not a user can move a GUI window.
Syntax
bool guiWindowSetMovable ( element theElement, bool status )
OOP Syntax Help! I don't understand this!
- Method: GuiWindow:setMovable(...)
- Variable: .movable
- Counterpart: guiWindowIsMovable
Required Arguments
- theElement: The window to be changed.
- status: A boolean value indicating whether the window is movable or not.
Returns
Returns true if the function is successful, false otherwise.
Example
This example creates a gui window and sets it to be not movable
function initialize () -- Create a gui window local window = guiCreateWindow ( 0.50, 0.50, 0.25, 0.25, "Test", true ) -- set it to be not movable guiWindowSetMovable ( window, false ) -- Show cursor to check if our changes work fine showCursor ( true ) end addEventHandler ( "onClientResourceStart", resourceRoot, initialize )
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