mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
fix
This commit is contained in:
parent
532c10dcc8
commit
d0209a8dac
1 changed files with 8 additions and 4 deletions
|
@ -19,8 +19,9 @@ Cd(__DIR__);;
|
|||
#include "TelnetHelpers"
|
||||
|
||||
// If you're using a custom palette, the colors might not seem right.
|
||||
// PaletteSet("DarkTemple");
|
||||
CBGR24 original_palette[COLORS_NUM];
|
||||
Bool dark_mode = FALSE;
|
||||
Bool original_colors = FALSE;
|
||||
Bool force_disconnect = FALSE;
|
||||
|
||||
I64 TelnetOpen(U8 *host, U16 port) {
|
||||
|
@ -649,6 +650,8 @@ U0 Telnet(U8 *host=NULL, U16 port=TELNET_PORT) {
|
|||
term.waiting_for_input = TRUE;
|
||||
term.sock_ready = 0;
|
||||
I64 art_path = "Art/TelnetSplash.ans";
|
||||
I64 message_code, arg1, arg2;
|
||||
GrPaletteGet(original_palette);
|
||||
|
||||
SettingsPush;
|
||||
MenuPush(
|
||||
|
@ -737,6 +740,7 @@ init_connection:
|
|||
{
|
||||
while (!force_disconnect) {
|
||||
U8 key = KeyGet(&sc);
|
||||
// fix the bug of holding Ctrl triggers all the CH_CTRL, needs to be handled like in Demo/Graphics/FontEd.ZC:104
|
||||
switch (key)
|
||||
{
|
||||
case 0:
|
||||
|
@ -820,11 +824,11 @@ init_connection:
|
|||
dark_mode = !dark_mode;
|
||||
if (dark_mode) Fs->text_attr = WHITE << 4 + BLACK;
|
||||
else Fs->text_attr = BLACK << 4 + WHITE;
|
||||
DocRecalc(doc);
|
||||
DocRecalc(term.doc);
|
||||
break;
|
||||
case CH_CTRLT:
|
||||
PaletteSet("DarkTemple");
|
||||
original_colors = !original_colors;
|
||||
if (original_colors) = GrPaletteSetStd;
|
||||
else GrPaletteSet(original_palette);
|
||||
break;
|
||||
case CH_CTRLL:
|
||||
PopUpOk("\n\n Not all BBS will work perfectly (yet). \n\n You can load ANSi artwork with Ctrl+O","\n\n\n\t\tMade by y4my4m\n\n");
|
||||
|
|
Loading…
Reference in a new issue