Fix colour codes not being trimmed from own skin name, launcher should auto-focus to search box.

This commit is contained in:
UnknownShadow200 2015-11-20 10:44:29 +11:00
parent 83e1a9c8fc
commit e94e53f348
5 changed files with 9 additions and 7 deletions

View File

@ -113,7 +113,6 @@ namespace ClassicalSharp {
canPlace[tile] = true;
canDelete[tile] = true;
}
canPlace[(int)Block.Grass] = false;
canPlace[(int)Block.Lava] = false;
canPlace[(int)Block.Water] = false;
canPlace[(int)Block.StillLava] = false;

View File

@ -38,9 +38,9 @@ namespace ClassicalSharp {
get { return (float)GetMaxHeight( jumpVel ); }
}
public LocalPlayer( Game window ) : base( window ) {
DisplayName = window.Username;
SkinName = window.Username;
public LocalPlayer( Game game ) : base( game ) {
DisplayName = game.Username;
SkinName = game.Username;
SkinIdentifier = "skin_" + SkinName;
InitRenderingData();
}
@ -253,7 +253,6 @@ namespace ClassicalSharp {
Inventory inv = game.Inventory;
inv.CanPlace[(int)Block.Bedrock] = value == 0x64;
inv.CanDelete[(int)Block.Bedrock] = value == 0x64;
inv.CanPlace[(int)Block.Grass] = value == 0x64;
inv.CanPlace[(int)Block.Water] = value == 0x64;
inv.CanPlace[(int)Block.StillWater] = value == 0x64;

View File

@ -9,7 +9,7 @@ namespace ClassicalSharp {
int tickCount;
public NetPlayer( string displayName, string skinName, Game game ) : base( game ) {
DisplayName = displayName;
SkinName = Utils.StripColours( skinName );
SkinName = skinName;
SkinIdentifier = "skin_" + SkinName;
InitRenderingData();
}

View File

@ -255,6 +255,7 @@ namespace ClassicalSharp {
}
void AddEntity( byte entityId, string displayName, string skinName, bool readPosition ) {
skinName = Utils.StripColours( skinName );
if( entityId != 0xFF ) {
Player oldPlayer = game.Players[entityId];
if( oldPlayer != null ) {
@ -266,7 +267,7 @@ namespace ClassicalSharp {
game.AsyncDownloader.DownloadSkin( skinName );
} else {
game.LocalPlayer.SkinName = skinName;
game.LocalPlayer.SkinIdentifier = "skin_" + game.LocalPlayer.SkinName;
game.LocalPlayer.SkinIdentifier = "skin_" + skinName;
game.AsyncDownloader.DownloadSkin( skinName );
}
if( readPosition ) {

View File

@ -62,7 +62,10 @@ namespace Launcher2 {
base.Init();
game.Window.Mouse.WheelChanged += MouseWheelChanged;
game.Window.Mouse.ButtonUp += MouseButtonUp;
Resize();
selectedWidget = widgets[1];
InputClick( 0, 0 );
}
public override void Resize() {