smooth popup transitions fade in and out

This commit is contained in:
RossAscends
2023-04-30 01:41:50 +09:00
parent 6f1193f057
commit ef4c3b54b0
2 changed files with 56 additions and 30 deletions

View File

@ -3436,8 +3436,8 @@ function callPopup(text, type, inputValue = '') {
$("#dialogue_popup_input").focus();
}
$("#shadow_popup").transition({
opacity: 1.0,
duration: animation_duration,
opacity: 1,
duration: 200,
easing: animation_easing,
});
@ -4166,15 +4166,26 @@ $(document).ready(function () {
});
$("#character_cross").click(function () {
is_advanced_char_open = false;
$("#character_popup").css("display", "none");
$("#character_popup").transition({
opacity: 0,
duration: 200,
easing: animation_easing,
});
setTimeout(function () { $("#character_popup").css("display", "none"); }, 200);
//$("#character_popup").css("display", "none");
});
$("#character_popup_ok").click(function () {
is_advanced_char_open = false;
$("#character_popup").css("display", "none");
});
$("#dialogue_popup_ok").click(function (e) {
$("#shadow_popup").css("display", "none");
$("#shadow_popup").css("opacity:", 0.0);
$("#shadow_popup").transition({
opacity: 0,
duration: 200,
easing: animation_easing,
});
setTimeout(function () { $("#shadow_popup").css("display", "none"); }, 200);
// $("#shadow_popup").css("opacity:", 0.0);
if (popup_type == "del_bg") {
delBackground(bg_file_for_del.attr("bgfile"));
bg_file_for_del.parent().remove();
@ -4272,8 +4283,13 @@ $(document).ready(function () {
}
});
$("#dialogue_popup_cancel").click(function (e) {
$("#shadow_popup").css("display", "none");
$("#shadow_popup").css("opacity:", 0.0);
$("#shadow_popup").transition({
opacity: 0,
duration: 200,
easing: animation_easing,
});
setTimeout(function () { $("#shadow_popup").css("display", "none"); }, 200);
//$("#shadow_popup").css("opacity:", 0.0);
popup_type = "";
if (dialogueResolve) {
@ -4813,7 +4829,7 @@ $(document).ready(function () {
saveSettingsDebounced();
});
$("#donation").click(function () {
/* $("#donation").click(function () {
$("#shadow_tips_popup").css("display", "block");
$("#shadow_tips_popup").transition({
opacity: 1.0,
@ -4821,9 +4837,9 @@ $(document).ready(function () {
easing: animation_easing,
complete: function () { },
});
});
}); */
$("#tips_cross").click(function () {
/* $("#tips_cross").click(function () {
$("#shadow_tips_popup").transition({
opacity: 0.0,
duration: 100,
@ -4832,10 +4848,16 @@ $(document).ready(function () {
$("#shadow_tips_popup").css("display", "none");
},
});
});
}); */
$("#select_chat_cross").click(function () {
$("#shadow_select_chat_popup").css("display", "none");
$("#shadow_select_chat_popup").transition({
opacity: 0,
duration: 200,
easing: animation_easing,
});
setTimeout(function () { $("#shadow_select_chat_popup").css("display", "none"); }, 200);
//$("#shadow_select_chat_popup").css("display", "none");
$("#load_select_chat_div").css("display", "block");
});

View File

@ -1348,7 +1348,9 @@ input[type=search]:focus::-webkit-search-cancel-button {
top: 50%;
transform: translateY(-50%);
text-align: center;
box-shadow: 0 0 5px 5px var(--fullred);
box-shadow: 0 0 5px black;
/* var(--fullred) */
border: 1px solid var(--white30a);
padding: 4px;
background-color: var(--black70a);
border-radius: 10px;
@ -2542,7 +2544,7 @@ body .ui-widget-content {
padding: 0 5px;
}
#rm_group_buttons > div {
#rm_group_buttons>div {
display: flex;
flex-direction: column;
}
@ -3062,7 +3064,9 @@ a {
display: none;
}
.hiddenByTag, .hiddenByFav, .hiddenBySearch {
.hiddenByTag,
.hiddenByFav,
.hiddenBySearch {
display: none !important;
}