mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
Fix up key in chat, fix table being resized to 20 pixels when minimising then reopening.
This commit is contained in:
parent
bab357300e
commit
b9ab4df820
@ -25,6 +25,7 @@ namespace ClassicalSharp {
|
||||
public int FontSize = 12;
|
||||
|
||||
public void Send( string text, bool partial ) {
|
||||
text = text.TrimEnd( trimChars );
|
||||
if( String.IsNullOrEmpty( text ) ) return;
|
||||
InputLog.Add( text );
|
||||
|
||||
@ -35,6 +36,7 @@ namespace ClassicalSharp {
|
||||
game.Network.SendChat( text, partial );
|
||||
}
|
||||
|
||||
static char[] trimChars = new [] { ' ', '\0' };
|
||||
public void Add( string text ) {
|
||||
Log.Add( text );
|
||||
LogChatToFile( text );
|
||||
|
@ -215,6 +215,7 @@ namespace ClassicalSharp.Network {
|
||||
req.ReadWriteTimeout = 15 * 1000;
|
||||
req.Timeout = 15 * 1000;
|
||||
req.Proxy = null;
|
||||
req.UserAgent = Program.AppName;
|
||||
|
||||
if( request.LastModified != DateTime.MinValue )
|
||||
req.IfModifiedSince = request.LastModified;
|
||||
|
@ -57,6 +57,7 @@ namespace Launcher2 {
|
||||
if( DraggingWidth ) {
|
||||
ColumnWidths[0] += deltaX;
|
||||
Utils.Clamp( ref ColumnWidths[0], 20, Window.Width - 20 );
|
||||
DesiredColumnWidths[0] = ColumnWidths[0];
|
||||
NeedRedraw();
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ namespace Launcher2 {
|
||||
|
||||
public int CurrentIndex, Count;
|
||||
public int[] ColumnWidths = { 350, 100 };
|
||||
public int[] DesiredColumnWidths = { 350, 100 };
|
||||
|
||||
struct TableEntry {
|
||||
public string Hash, Name, Players;
|
||||
@ -68,8 +69,10 @@ namespace Launcher2 {
|
||||
static FastColour backCol = new FastColour( 120, 85, 151 ), foreCol = new FastColour( 160, 133, 186 );
|
||||
static FastColour scrollCol = new FastColour( 200, 184, 216 );
|
||||
public void Redraw( IDrawer2D drawer, Font font, Font titleFont, Font boldFont ) {
|
||||
ColumnWidths[0] = DesiredColumnWidths[0];
|
||||
Utils.Clamp( ref ColumnWidths[0], 20, Window.Width - 20 );
|
||||
int x = X + 5;
|
||||
|
||||
DrawGrid( drawer, font, titleFont );
|
||||
x += DrawColumn( drawer, true, font, titleFont, boldFont, "Name", ColumnWidths[0], x, e => e.Name ) + 5;
|
||||
x += DrawColumn( drawer, false, font, titleFont, boldFont, "Players", ColumnWidths[1], x, e => e.Players ) + 5;
|
||||
|
@ -4,7 +4,7 @@
|
||||
<ProjectGuid>{3E84ACC1-27B4-401B-A359-6AAE4DF6C9B5}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Launcher2</RootNamespace>
|
||||
<AssemblyName>Launcher2</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
|
Loading…
x
Reference in New Issue
Block a user