mirror of
https://github.com/1j01/textual-paint.git
synced 2024-11-24 08:44:45 +03:00
Use ASCII art for question bubble icon in --ascii-only mode
This commit is contained in:
parent
a7b92a1643
commit
97bfbda1ec
5
question_icon_ascii.ans
Normal file
5
question_icon_ascii.ans
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[38;2;0;0;0;48;2;128;128;128m _____ [0m
|
||||||
|
[38;2;0;0;0;48;2;128;128;128m [0m[38;2;0;0;0;48;2;255;255;255m/ \[0m[38;2;0;0;0;48;2;128;128;128m [0m
|
||||||
|
[38;2;0;0;0;48;2;255;255;255m| [0m[38;2;0;0;255;48;2;255;255;255m?[0m[38;2;0;0;0;48;2;255;255;255m |[0m
|
||||||
|
[38;2;0;0;0;48;2;128;128;128m [0m[38;2;0;0;0;48;2;255;255;255m\__ __/[0m[38;2;0;0;0;48;2;128;128;128m [0m
|
||||||
|
[38;2;0;0;0;48;2;128;128;128m [0m[38;2;0;0;0;48;2;255;255;255m\|[0m[38;2;0;0;0;48;2;128;128;128m [0m
|
@ -650,9 +650,23 @@ question_icon_console_markup = question_icon_console_markup.replace(" on rgb(128
|
|||||||
|
|
||||||
# also the shadow is normally gray, I just drew it black because I was using gray as the background
|
# also the shadow is normally gray, I just drew it black because I was using gray as the background
|
||||||
question_icon_console_markup = question_icon_console_markup.replace("rgb(0,0,0)", "rgb(128,128,128)")
|
question_icon_console_markup = question_icon_console_markup.replace("rgb(0,0,0)", "rgb(128,128,128)")
|
||||||
# Underline "❩" to make it look like the question mark has a serif. Looks bad because it's a wide character.
|
# I tried underlining "❩" to make it look like the question mark has a serif, but it looks bad because it's a wide character.
|
||||||
# question_icon_console_markup = question_icon_console_markup.replace("❩", "[u]❩[/u]")
|
# question_icon_console_markup = question_icon_console_markup.replace("❩", "[u]❩[/u]")
|
||||||
get_question_icon = lambda: Static(question_icon_console_markup, classes="question_icon message_box_icon")
|
|
||||||
|
question_icon_console_markup_ascii = """
|
||||||
|
[rgb(0,0,0) on rgb(128,128,128)] [rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)] [rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)]_[rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)]_[rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)]_[rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)]_[rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)]_[rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)] [rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)] [/rgb(0,0,0) on rgb(128,128,128)]
|
||||||
|
[rgb(0,0,0) on rgb(128,128,128)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(128,128,128)]/[rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)]\\\\[rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(255,255,255)] [/rgb(0,0,0) on rgb(128,128,128)]
|
||||||
|
[rgb(0,0,0) on rgb(255,255,255)]|[rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,255) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)]?[rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,255) on rgb(255,255,255)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)]|[/rgb(0,0,0) on rgb(255,255,255)]
|
||||||
|
[rgb(0,0,0) on rgb(128,128,128)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(128,128,128)]\\\\[rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)]_[rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)]_[rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)]_[rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)]_[rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)]/[rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(255,255,255)] [/rgb(0,0,0) on rgb(128,128,128)]
|
||||||
|
[rgb(0,0,0) on rgb(128,128,128)] [rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)] [rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)] [rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)] [rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(128,128,128)]\\\\[rgb(0,0,0) on rgb(255,255,255)][/rgb(0,0,0) on rgb(255,255,255)]|[rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(255,255,255)] [rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)] [rgb(0,0,0) on rgb(128,128,128)][/rgb(0,0,0) on rgb(128,128,128)] [/rgb(0,0,0) on rgb(128,128,128)]
|
||||||
|
"""
|
||||||
|
# make background transparent
|
||||||
|
question_icon_console_markup_ascii = question_icon_console_markup_ascii.replace(" on rgb(128,128,128)", "")
|
||||||
|
|
||||||
|
def get_question_icon() -> Static:
|
||||||
|
markup = question_icon_console_markup_ascii if ascii_only else question_icon_console_markup
|
||||||
|
return Static(markup, classes="question_icon message_box_icon")
|
||||||
|
|
||||||
|
|
||||||
# NOTE: I had to manually replace "\" with "\\\\" in the markup below.
|
# NOTE: I had to manually replace "\" with "\\\\" in the markup below.
|
||||||
# One level of escaping because this is a string literal, and another level because
|
# One level of escaping because this is a string literal, and another level because
|
||||||
|
Loading…
Reference in New Issue
Block a user