TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

full width prompt

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help
View previous topic :: View next topic  
Author Message
dorian



Joined: 29 Jul 2012
Posts: 66

PostPosted: Sat Aug 27, 2016 4:18 pm    Post subject: full width prompt Reply with quote

Hi again
i would like to make prompt bar looks like vim airline status bar, but i have problem to set colors at full width.

this is what i did

Code:

#alias prompt {
   #var mode {NORMAL};
   #if {&time} {#nop;} {#var time {$icon[lock]}};
   #format {prompt} {%h};
   #format width {%C};
   
   #format f1 {%L} {$mode};
   #format f2 {%L} {$time};
   #math {f1} {$f1+3};
   #var f2 {10};
   #var hp $state[hp];
   #var fatigue $state[fatigue];
   #math {fatigue} {7-$fatigue};

   #math {rest} {$width-$f1-$hp-$fatigue-16};

   #format {prompt} {<ECA><aaa>  %-${f1}s <CAA><eca>$icon[arrow-right] %+${hp}s<CAB><caa>$icon[arrow-right]<cab> %+${fatigue}s<G06>$icon[arrow-right] <aaa>%+${rest}s <088>} {$mode} { } { } {$time};

   #nop echo {{%+1s} {1}} {$prompt};

}
#event {SCREEN RESIZE} {
   prompt
}


array idon contains all powerline characters, but i belive problem is with color changins, cos the contains extra invisible space. any walkaroud to do this?
Back to top
View user's profile Send private message
dorian



Joined: 29 Jul 2012
Posts: 66

PostPosted: Sun Aug 28, 2016 7:08 pm    Post subject: Reply with quote

hi problem has been located :

Code:

#format len {%L} {$icon[arrow-right]}


turns out len = 3;

any walk around?
Back to top
View user's profile Send private message
dorian



Joined: 29 Jul 2012
Posts: 66

PostPosted: Mon Aug 29, 2016 9:17 am    Post subject: Reply with quote

any progress? this is end rusults i want to archive:



but with with rpg related data Wink
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Tue Aug 30, 2016 9:48 pm    Post subject: Reply with quote

If you're using UTF-8 characters try using:

#config charset utf-8


Not sure if I should enable utf-8 by default.
Back to top
View user's profile Send private message Send e-mail
dorian



Joined: 29 Jul 2012
Posts: 66

PostPosted: Wed Aug 31, 2016 6:18 am    Post subject: Reply with quote

helpful as always, thank you very much Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group