- 109
- 12
- Версия SA-MP
-
- 0.3.7-R3
Lua:
imgui.OnFrame(function() return windows.mainSettings[0] end, function()
if imgui.Begin('News Helper - Настройки', isOpen, windowFlags) then
if imgui.BeginTabBar('##MainTabs') then
imgui.PushItemWidth(0)
if fa_font then imgui.PushFont(fa_font) end
local selectedTab = data.currentMainSettingsTab
if imgui.BeginTabItem(fa('circle_info') .. ' О скрипте', nil,
selectedTab == 0 and imgui.TabItemFlags.SetSelected or 0) then
if fa_font then imgui.PopFont() end
data.currentMainSettingsTab = 0
-- ...
imgui.EndTabItem()
end
if fa_font then imgui.PushFont(fa_font) end
if imgui.BeginTabItem(fa('gear') .. ' Настройки', nil,
selectedTab == 1 and imgui.TabItemFlags.SetSelected or 0) then
if fa_font then imgui.PopFont() end
data.currentMainSettingsTab = 1
-- ...
imgui.EndTabItem()
end
if fa_font then imgui.PushFont(fa_font) end
if imgui.BeginTabItem(fa('key') .. ' Автологин', nil,
selectedTab == 2 and imgui.TabItemFlags.SetSelected or 0) then
if fa_font then imgui.PopFont() end
data.currentMainSettingsTab = 2
-- ...
imgui.EndTabItem()
end
if fa_font then imgui.PushFont(fa_font) end
--
if imgui.BeginTabItem(fa('keyboard') .. ' Биндер', nil,
selectedTab == 3 and imgui.TabItemFlags.SetSelected or 0) then
if fa_font then imgui.PopFont() end
data.currentMainSettingsTab = 3
-- ...
imgui.EndTabItem()
end
if fa_font then imgui.PushFont(fa_font) end
--
if imgui.BeginTabItem(fa('gamepad') .. ' Горячие клавиши', nil,
selectedTab == 4 and imgui.TabItemFlags.SetSelected or 0) then
if fa_font then imgui.PopFont() end
data.currentMainSettingsTab = 4
-- ...
imgui.EndTabItem()
end
if fa_font then imgui.PushFont(fa_font) end
--
if imgui.BeginTabItem(fa('users') .. ' Чекер', nil,
selectedTab == 5 and imgui.TabItemFlags.SetSelected or 0) then
if fa_font then imgui.PopFont() end
data.currentMainSettingsTab = 5
-- ...
imgui.EndTabItem()
end
if fa_font then imgui.PushFont(fa_font) end
--
if imgui.BeginTabItem(fa('microphone') .. ' Эфиры', nil,
selectedTab == 6 and imgui.TabItemFlags.SetSelected or 0) then
if fa_font then imgui.PopFont() end
data.currentMainSettingsTab = 6
-- ...
imgui.EndTabItem()
end
if fa_font then imgui.PushFont(fa_font) end
--
if imgui.BeginTabItem(fa('comment') .. ' Сообщения эфира', nil,
selectedTab == 7 and imgui.TabItemFlags.SetSelected or 0) then
if fa_font then imgui.PopFont() end
data.currentMainSettingsTab = 7
-- ...
imgui.EndTabItem()
end
if fa_font then imgui.PushFont(fa_font) end
--
if imgui.BeginTabItem(fa('tower_broadcast') .. ' Эфир без вопросов', nil,
selectedTab == 8 and imgui.TabItemFlags.SetSelected or 0) then
if fa_font then imgui.PopFont() end
data.currentMainSettingsTab = 8
-- ...
imgui.EndTabItem()
end
imgui.PopItemWidth()
imgui.EndTabBar()
imgui.PopStyleColor(4)
imgui.End()
end
end
end)
Lua:
sampRegisterChatCommand('newsefir', function()
data.currentMainSettingsTab = 6
windows.mainSettings[0] = true
end)