1.0.0f
This commit is contained in:
@@ -303,7 +303,7 @@ function G.UIDEF.card_focus_ui(card)
|
||||
playing_card_colour[4] = 1.5
|
||||
if G.hand and card.area == G.hand then ease_value(playing_card_colour, 4, -1.5, nil, 'REAL',nil, 0.2, 'quad') end
|
||||
|
||||
local t_card_norm = {x = card.T.x + card.T.w/2 - G.ROOM.T.w/2, y = card.T.y + card.T.h/2 - G.ROOM.T.h/2}
|
||||
local tcnx, tcny = card.T.x + card.T.w/2 - G.ROOM.T.w/2, card.T.y + card.T.h/2 - G.ROOM.T.h/2
|
||||
|
||||
local base_background = UIBox{
|
||||
T = {card.VT.x,card.VT.y,0,0},
|
||||
@@ -316,15 +316,15 @@ function G.UIDEF.card_focus_ui(card)
|
||||
}},
|
||||
config = {
|
||||
align = 'cm',
|
||||
offset = {x= 0.007*t_card_norm.x*card.T.w, y = 0.007*t_card_norm.y*card.T.h},
|
||||
offset = {x= 0.007*tcnx*card.T.w, y = 0.007*tcny*card.T.h},
|
||||
parent = card,
|
||||
r_bond = (not G.hand or card.area ~= G.hand) and 'Weak' or 'Strong'
|
||||
}
|
||||
}
|
||||
|
||||
base_background.set_alignment = function()
|
||||
local card_norm = {x = card.T.x + card.T.w/2 - G.ROOM.T.w/2, y = card.T.y + card.T.h/2 - G.ROOM.T.h/2}
|
||||
Moveable.set_alignment(card.children.focused_ui, {offset = {x= 0.007*card_norm.x*card.T.w, y = 0.007*card_norm.y*card.T.h}})
|
||||
local cnx, cny = card.T.x + card.T.w/2 - G.ROOM.T.w/2, card.T.y + card.T.h/2 - G.ROOM.T.h/2
|
||||
Moveable.set_alignment(card.children.focused_ui, {offset = {x= 0.007*cnx*card.T.w, y = 0.007*cny*card.T.h}})
|
||||
end
|
||||
|
||||
local base_attach = base_background:get_UIE_by_ID('ATTACH_TO_ME')
|
||||
@@ -1135,6 +1135,8 @@ end
|
||||
function get_badge_colour(key)
|
||||
G.BADGE_COL = G.BADGE_COL or {
|
||||
eternal = G.C.ETERNAL,
|
||||
perishable = G.C.PERISHABLE,
|
||||
rental = G.C.RENTAL,
|
||||
foil = G.C.DARK_EDITION,
|
||||
holographic = G.C.DARK_EDITION,
|
||||
polychrome = G.C.DARK_EDITION,
|
||||
@@ -2312,6 +2314,7 @@ function G.UIDEF.settings_tab(tab)
|
||||
end
|
||||
end
|
||||
)}),
|
||||
create_toggle({label = localize('b_reduced_motion'), ref_table = G.SETTINGS, ref_value = 'reduced_motion'}),
|
||||
G.F_CRASH_REPORTS and create_toggle({label = localize('b_set_crash_reports'), ref_table = G.SETTINGS, ref_value = 'crashreports', info = localize('ml_crash_report_info')}) or nil,
|
||||
}}
|
||||
elseif tab == 'Video' then
|
||||
@@ -5270,6 +5273,49 @@ function G.UIDEF.challenge_description_tab(args)
|
||||
)
|
||||
end
|
||||
end
|
||||
if challenge.restrictions.banned_other then
|
||||
local other_tab = {}
|
||||
for k, v in pairs(challenge.restrictions.banned_other) do
|
||||
if v.type == 'blind' then
|
||||
other_tab[#other_tab+1] = G.P_BLINDS[v.id]
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(other_tab, function (a, b) return a.order < b.order end)
|
||||
|
||||
for k, v in ipairs(other_tab) do
|
||||
local temp_blind = AnimatedSprite(0,0,1,1, G.ANIMATION_ATLAS['blind_chips'], v.pos)
|
||||
temp_blind:define_draw_steps({
|
||||
{shader = 'dissolve', shadow_height = 0.05},
|
||||
{shader = 'dissolve'}
|
||||
})
|
||||
temp_blind.float = true
|
||||
temp_blind.states.hover.can = true
|
||||
temp_blind.states.drag.can = false
|
||||
temp_blind.states.collide.can = true
|
||||
temp_blind.config = {blind = v, force_focus = true}
|
||||
temp_blind.hover = function()
|
||||
if not G.CONTROLLER.dragging.target or G.CONTROLLER.using_touch then
|
||||
if not temp_blind.hovering and temp_blind.states.visible then
|
||||
temp_blind.hovering = true
|
||||
temp_blind.hover_tilt = 3
|
||||
temp_blind:juice_up(0.05, 0.02)
|
||||
play_sound('chips1', math.random()*0.1 + 0.55, 0.12)
|
||||
temp_blind.config.h_popup = create_UIBox_blind_popup(v, true)
|
||||
temp_blind.config.h_popup_config ={align = 'cl', offset = {x=-0.1,y=0},parent = temp_blind}
|
||||
Node.hover(temp_blind)
|
||||
end
|
||||
end
|
||||
end
|
||||
temp_blind.stop_hover = function() temp_blind.hovering = false; Node.stop_hover(temp_blind); temp_blind.hover_tilt = 0 end
|
||||
|
||||
table.insert(banned_other,
|
||||
{n=G.UIT.R, config={align = "cm", padding = 0}, nodes={
|
||||
{n=G.UIT.O, config={object = temp_blind}}
|
||||
}}
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
if not banned_cards[1] then banned_cards[#banned_cards+1] = {n=G.UIT.R, config={align = "cl"}, nodes= localize{type = 'text', key = 'ch_m_none', vars = {}}} end
|
||||
if not banned_tags[1] then banned_tags[#banned_tags+1] = {n=G.UIT.R, config={align = "cl"}, nodes= localize{type = 'text', key = 'ch_c_none', vars = {}}} end
|
||||
@@ -5687,11 +5733,13 @@ function G.UIDEF.language_selector()
|
||||
table.sort(langs, (function(a, b) return a.label < b.label end))
|
||||
local _row = {}
|
||||
for k, v in ipairs(langs) do
|
||||
_row[#_row+1] = {n=G.UIT.C, config={align = "cm", func = 'beta_lang_alert', padding = 0.05, r = 0.1, minh = 0.7, minw = 4.5, button = v.beta and 'warn_lang' or 'change_lang', ref_table = v, colour = v.beta and G.C.RED or G.C.BLUE, hover = true, shadow = true, focus_args = {snap_to = (k == 1)}}, nodes={
|
||||
{n=G.UIT.R, config={align = "cm"}, nodes={
|
||||
{n=G.UIT.T, config={text = v.label, lang = v, scale = 0.45, colour = G.C.UI.TEXT_LIGHT, shadow = true}}
|
||||
if not G.F_HIDE_BETA_LANGS or (not v.beta) then
|
||||
_row[#_row+1] = {n=G.UIT.C, config={align = "cm", func = 'beta_lang_alert', padding = 0.05, r = 0.1, minh = 0.7, minw = 4.5, button = v.beta and 'warn_lang' or 'change_lang', ref_table = v, colour = v.beta and G.C.RED or G.C.BLUE, hover = true, shadow = true, focus_args = {snap_to = (k == 1)}}, nodes={
|
||||
{n=G.UIT.R, config={align = "cm"}, nodes={
|
||||
{n=G.UIT.T, config={text = v.label, lang = v, scale = 0.45, colour = G.C.UI.TEXT_LIGHT, shadow = true}}
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
end
|
||||
if _row[3] or (k == #langs) then
|
||||
rows[#rows+1] = {n=G.UIT.R, config={align = "cm", padding = 0.1}, nodes=_row}
|
||||
_row = {}
|
||||
@@ -5704,12 +5752,12 @@ function G.UIDEF.language_selector()
|
||||
|
||||
local t = create_UIBox_generic_options({contents ={
|
||||
{n=G.UIT.R, config={align = "cm", padding = 0.05}, nodes=rows},
|
||||
{n=G.UIT.R, config={align = "cm", padding = 0.05}, nodes={
|
||||
G.F_EXTERNAL_LINKS and {n=G.UIT.R, config={align = "cm", padding = 0.05}, nodes={
|
||||
{n=G.UIT.C, config={align = "cm", padding = 0.1, minw = 4, maxw = 4, r = 0.1, minh = 0.8, hover = true, colour = mix_colours(G.C.GREEN, G.C.GREY, 0.4), button = 'loc_survey', shadow = true}, nodes={
|
||||
{n=G.UIT.O, config={object = discord}},
|
||||
{n=G.UIT.T, config={text = G.LANG.button, scale = 0.45, colour = G.C.UI.TEXT_LIGHT, shadow = true}}
|
||||
}},
|
||||
}}
|
||||
}} or nil
|
||||
}})
|
||||
return t
|
||||
end
|
||||
|
Reference in New Issue
Block a user