<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/RU/guiCreateWindow?action=history&amp;feed=atom</id>
	<title>RU/guiCreateWindow - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/RU/guiCreateWindow?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/guiCreateWindow&amp;action=history"/>
	<updated>2026-06-23T02:22:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/guiCreateWindow&amp;diff=49907&amp;oldid=prev</id>
		<title>Necktrox: Added polish page</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/guiCreateWindow&amp;diff=49907&amp;oldid=prev"/>
		<updated>2016-12-05T17:16:47Z</updated>

		<summary type="html">&lt;p&gt;Added polish page&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:16, 5 December 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l85&quot;&gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{RU/GUI_functions}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{RU/GUI_functions}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[en:guiCreateWindow]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[en:guiCreateWindow]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[pl:guiCreateWindow]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_dev_:diff::1.12:old-46250:rev-49907 --&gt;
&lt;/table&gt;</summary>
		<author><name>Necktrox</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/guiCreateWindow&amp;diff=46250&amp;oldid=prev</id>
		<title>Fabervox: перевести пример ещё</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/guiCreateWindow&amp;diff=46250&amp;oldid=prev"/>
		<updated>2015-12-21T17:34:09Z</updated>

		<summary type="html">&lt;p&gt;перевести пример ещё&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is for creating a new GUI window.  This provides a base for other gui elements to be created within.  However, windows do not have a parent and cannot be created in any GUI elements.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element guiCreateWindow ( float x, float y, float width, float height, string titleBarText, bool relative )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Обязательные аргументы=== &lt;br /&gt;
[[Image:gui-window.png|frame|Пример окна.]]&lt;br /&gt;
*'''x:''' Позиция окна по оси X на экране игрока. Зависит от аргумента ''relative''.&lt;br /&gt;
*'''y:''' Позиция окна по оси Y на экране игрока. Зависит от аргумента ''relative''.&lt;br /&gt;
*'''width:''' Ширина окна. Зависит от аргумента ''relative''.&lt;br /&gt;
*'''height:''' Высота окна. Зависит от аргумента ''relative''.&lt;br /&gt;
*'''titleBarText:''' Строка, которая будет выведена в заголовке окна.&lt;br /&gt;
*'''relative:''' Определяет, относительны ли позиция и размер. Если указано ''true'', то значения аргументов ''x, y, width'' и ''height'' должны быть между 0 и 1, относительны к размеру родителя.&lt;br /&gt;
&lt;br /&gt;
===Возвращает===&lt;br /&gt;
Возвращает элемент типа ''gui-window'' в случае успешного создания, ''false'' в противном случае.&lt;br /&gt;
&lt;br /&gt;
==Пример== &lt;br /&gt;
'''Example 1:''' This example creates a information window and adds two tabs to a &amp;quot;tabPanel&amp;quot; tabpanel, and adds some other gui elements to it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local myWindow = guiCreateWindow ( 0, 0, 0.5, 0.4, &amp;quot;Information&amp;quot;, true )  -- create a window which has &amp;quot;Information&amp;quot; in the title bar.&lt;br /&gt;
local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow )       -- create a tab panel which fills the whole window&lt;br /&gt;
local tabMap = guiCreateTab( &amp;quot;Map Information&amp;quot;, tabPanel )                -- create a tab named &amp;quot;Map Information&amp;quot; on 'tabPanel'&lt;br /&gt;
local tabHelp = guiCreateTab( &amp;quot;Help&amp;quot;, tabPanel )                          -- create another tab named &amp;quot;Help&amp;quot; on 'tabPanel'&lt;br /&gt;
&lt;br /&gt;
-- adds a label (text) to each tab&lt;br /&gt;
guiCreateLabel(0.02, 0.04, 0.94, 0.2, &amp;quot;This is information about the current map&amp;quot;, true, tabMap)&lt;br /&gt;
guiCreateLabel(0.02, 0.04, 0.94, 0.92, &amp;quot;This is help text.&amp;quot;, true, tabHelp)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example creates a weapon selection screen, complete with a window, gridlist and a button. Users can select a shotgun or a machine gun. The window is not movable or sizable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--Setup some tables&lt;br /&gt;
&lt;br /&gt;
shotguns = {&lt;br /&gt;
      &amp;quot;chrome&amp;quot;,&lt;br /&gt;
      &amp;quot;sawn-off&amp;quot;,&lt;br /&gt;
      &amp;quot;combat&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
machineGun = {&lt;br /&gt;
      &amp;quot;m4&amp;quot;,&lt;br /&gt;
      &amp;quot;ak-47&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function setupWeaponSelection ( theResource )&lt;br /&gt;
      -- getResourceRootElement(getThisResource()) at the bottom means it will only create the gui on this resource start&lt;br /&gt;
      -- Create a window for our spawnscreen, with the title &amp;quot;Select your weapons&amp;quot;.&lt;br /&gt;
      spawnScreenMenu = guiCreateWindow ( 0.15, 0.33, 0.7, 0.34, &amp;quot;Select your weapons&amp;quot;, true )&lt;br /&gt;
      -- create an OK button to allow the user to confirm their selections, and attach it to the confirmSelection function&lt;br /&gt;
      spawnScreenOKButton = guiCreateButton ( 0.4, 0.85, 0.20, 0.15, &amp;quot;OK&amp;quot;, true, spawnScreenMenu )&lt;br /&gt;
      -- ensure the user can't move or resize our spawnscreen.&lt;br /&gt;
      guiWindowSetMovable ( spawnScreenMenu, false )&lt;br /&gt;
      guiWindowSetSizable ( spawnScreenMenu, false )&lt;br /&gt;
      -- create our gridlist, which fills up most of the window.&lt;br /&gt;
      spawnScreenGridList = guiCreateGridList ( 0, 0.1, 1, 0.9, true, spawnScreenMenu )&lt;br /&gt;
      guiGridListSetSelectionMode ( spawnScreenGridList, 2 ) -- ensure the selection mode is one per column&lt;br /&gt;
      -- Since we have 2 sets of weapons, create a column for shotguns and one for machine guns&lt;br /&gt;
      guiGridListAddColumn ( spawnScreenGridList, &amp;quot;Shotguns&amp;quot;, 0.3 )&lt;br /&gt;
      guiGridListAddColumn ( spawnScreenGridList, &amp;quot;Machine guns&amp;quot;, 0.3 )&lt;br /&gt;
      -- next, we loop through our handguns table to add handgun items to the gridlist&lt;br /&gt;
      for key,weaponName in pairs(shotguns) do&lt;br /&gt;
            -- add a new row to our gridlist each time&lt;br /&gt;
            local row = guiGridListAddRow ( spawnScreenGridList )&lt;br /&gt;
            -- next, we set that row's text to the weapon name. Column is 1 since the &amp;quot;Shotguns&amp;quot; column was created first.&lt;br /&gt;
            guiGridListSetItemText ( spawnScreenGridList, row, 1, weaponName, false, false )&lt;br /&gt;
      end&lt;br /&gt;
      -- we repeat the process for other weapon list, changing the column number&lt;br /&gt;
      row = 0&lt;br /&gt;
      for key,weaponName in pairs(machineGun) do&lt;br /&gt;
            -- we don't need to create new rows as that was done in the previous loop&lt;br /&gt;
            -- we just set the row's text to the weapon name. Column is 2 since the &amp;quot;Machine guns&amp;quot; column was created second.&lt;br /&gt;
            guiGridListSetItemText ( spawnScreenGridList, row, 2, weaponName, false, false )&lt;br /&gt;
            row = row + 1 -- increase the row number&lt;br /&gt;
      end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientResourceStart&amp;quot;, getResourceRootElement(getThisResource()), setupWeaponSelection )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Смотрите также==&lt;br /&gt;
{{RU/GUI_functions}}&lt;br /&gt;
[[en:guiCreateWindow]]&lt;/div&gt;</summary>
		<author><name>Fabervox</name></author>
	</entry>
</feed>