mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 11:09:21 +01:00
НУ, ЗНАЯ ФЕДЮ
This commit is contained in:
parent
52efbbcc81
commit
1f4d264090
@ -96,7 +96,15 @@ local updateFileList, editPublication, messagesItem
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
local workspace, window = system.addWindow(GUI.filledWindow(1, 1, 127, 33, 0xF0F0F0))
|
||||
local windowsContainer = system.getWindowsContainer()
|
||||
|
||||
local workspace, window, menu = system.addWindow(GUI.filledWindow(
|
||||
1,
|
||||
1,
|
||||
math.min(127, windowsContainer.width),
|
||||
math.min(33, windowsContainer.height),
|
||||
0xF0F0F0
|
||||
))
|
||||
|
||||
local leftListPanel = system.addBlurredOrDefaultPanel(window, 1, 1, 23, 1)
|
||||
|
||||
@ -428,7 +436,9 @@ local function checkForUnreadMessages()
|
||||
for _, dialog in pairs(dialogs) do
|
||||
if dialog.last_message_user_id ~= user.id and dialog.last_message_is_read == 0 then
|
||||
messagesItem.has_unread_messages = true
|
||||
break
|
||||
workspace:draw()
|
||||
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1082,6 +1092,7 @@ end
|
||||
|
||||
local function dialogGUI(to_user_name)
|
||||
local messages
|
||||
|
||||
if to_user_name then
|
||||
local result = fieldAPIRequest("result", "messages", {
|
||||
token = user.token,
|
||||
@ -2051,9 +2062,6 @@ end
|
||||
|
||||
loadConfig()
|
||||
|
||||
-- Рисуем синюю писечку если надо
|
||||
checkForUnreadMessages()
|
||||
|
||||
lastMethod = loadCategory
|
||||
|
||||
if select(1, ...) == "updates" then
|
||||
@ -2065,3 +2073,6 @@ else
|
||||
end
|
||||
|
||||
window:resize(window.width, window.height)
|
||||
|
||||
-- Рисуем синюю писечку если надо
|
||||
checkForUnreadMessages()
|
||||
|
||||
@ -43,7 +43,15 @@ local pathHistoryCurrent = 0
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
local workspace, window, menu = system.addWindow(GUI.filledWindow(1, 1, 100, 26, 0xF0F0F0))
|
||||
local windowsContainer = system.getWindowsContainer()
|
||||
|
||||
local workspace, window, menu = system.addWindow(GUI.filledWindow(
|
||||
1,
|
||||
1,
|
||||
math.min(100, windowsContainer.width),
|
||||
math.min(26, windowsContainer.height),
|
||||
0xF0F0F0
|
||||
))
|
||||
|
||||
local titlePanel = window:addChild(GUI.panel(1, 1, 1, 3, 0x3C3C3C))
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ module.onTouch = function()
|
||||
|
||||
local maxWidth, maxHeight = screen.getMaxResolution()
|
||||
local limit = maxWidth * maxHeight
|
||||
local lowerLimit = 30
|
||||
local lowerLimit = 25
|
||||
local cykaTextBox = window.contentLayout:addChild(GUI.textBox(1, 1, 36, 1, nil, 0x880000, {string.format(localization.screenInvalidResolution, lowerLimit, limit)}, 1, 0, 0, true, true))
|
||||
|
||||
local autoscalingSwtich = window.contentLayout:addChild(GUI.switchAndLabel(1, 1, 36, 8, 0x66DB80, 0xE1E1E1, 0xFFFFFF, 0xA5A5A5, localization.screenAutoScale .. ":", userSettings.interfaceScreenAutoScale)).switch
|
||||
@ -111,8 +111,8 @@ module.onTouch = function()
|
||||
width
|
||||
and height
|
||||
and width * height <= limit
|
||||
and width > lowerLimit
|
||||
and height > lowerLimit
|
||||
and width >= lowerLimit
|
||||
and height >= lowerLimit
|
||||
|
||||
return width, height
|
||||
end
|
||||
|
||||
@ -4156,8 +4156,11 @@ function GUI.dropDownMenu(x, y, width, maximumHeight, itemHeight, backgroundColo
|
||||
menu.scrollSpeed = 1
|
||||
|
||||
menu.itemsContainer = menu:addChild(GUI.container(1, 1, menu.width, menu.height))
|
||||
menu.prevButton = menu:addChild(GUI.button(1, 1, menu.width, 1, backgroundColor, textColor, backgroundPressedColor, textPressedColor, "▲"))
|
||||
menu.nextButton = menu:addChild(GUI.button(1, 1, menu.width, 1, backgroundColor, textColor, backgroundPressedColor, textPressedColor, "▼"))
|
||||
|
||||
-- RIP ▲▼
|
||||
-- ⬆⬇
|
||||
menu.prevButton = menu:addChild(GUI.button(1, 1, menu.width, 1, backgroundColor, textColor, backgroundPressedColor, textPressedColor, "⬆"))
|
||||
menu.nextButton = menu:addChild(GUI.button(1, 1, menu.width, 1, backgroundColor, textColor, backgroundPressedColor, textPressedColor, "⬇"))
|
||||
menu.prevButton.colors.transparency, menu.nextButton.colors.transparency = backgroundTransparency, backgroundTransparency
|
||||
menu.prevButton.onTouch = dropDownMenuPrevButtonOnTouch
|
||||
menu.nextButton.onTouch = dropDownMenuNextButtonOnTouch
|
||||
|
||||
@ -2467,7 +2467,7 @@ function system.updateDesktop()
|
||||
end
|
||||
|
||||
dockContainer.width = #dockContainer.children * (userSettings.iconWidth + userSettings.iconHorizontalSpace) - userSettings.iconHorizontalSpace + 6
|
||||
dockContainer.localX = math.floor(workspace.width / 2 - dockContainer.width / 2)
|
||||
dockContainer.localX = math.floor(workspace.width / 2 - dockContainer.width / 2 + 0.5)
|
||||
end
|
||||
|
||||
dockContainer.updateIcons = function()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user