From: <lk...@us...> - 2008-09-25 11:03:28
|
Revision: 2139 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2139&view=rev Author: lkuech Date: 2008-09-25 11:03:20 +0000 (Thu, 25 Sep 2008) Log Message: ----------- WorldMap: Fixed some positioning bug is the NewVirtualKeyboard class. This should avoid the different appearance compared to the original VirtualKeyboard. WorldMap: Fixed a potential NullException Modified Paths: -------------- trunk/plugins/WorldMap/MAPS/ThreadedDownload.cs trunk/plugins/WorldMap/NewVirtualKeyboard.cs trunk/plugins/WorldMap/Properties/AssemblyInfo.cs trunk/plugins/WorldMap/WorldmapSearch.cs Modified: trunk/plugins/WorldMap/MAPS/ThreadedDownload.cs =================================================================== --- trunk/plugins/WorldMap/MAPS/ThreadedDownload.cs 2008-09-24 17:36:51 UTC (rev 2138) +++ trunk/plugins/WorldMap/MAPS/ThreadedDownload.cs 2008-09-25 11:03:20 UTC (rev 2139) @@ -154,19 +154,20 @@ { if (QueuedImageDownloads.Count > 0) { - MapTile tmpTile = QueuedImageDownloads[0]; - QueuedImageDownloads.RemoveAt(0); - - Thread t = new Thread(new ParameterizedThreadStart(ImageThread)); - t.Priority = ThreadPriority.BelowNormal; - t.Name = "MapTileDownloader"; - t.IsBackground = true; - ImageDownloadThreads.Add(t); try { + MapTile tmpTile = QueuedImageDownloads[0]; + QueuedImageDownloads.RemoveAt(0); + + Thread t = new Thread(new ParameterizedThreadStart(ImageThread)); + t.Priority = ThreadPriority.BelowNormal; + t.Name = "MapTileDownloader"; + t.IsBackground = true; + ImageDownloadThreads.Add(t); + t.Start(tmpTile); } - catch (ThreadStartException err) + catch (Exception err) { } //if(QueuedImageDownloads.Count>0) QueuedImageDownloads.RemoveAt(0); Modified: trunk/plugins/WorldMap/NewVirtualKeyboard.cs =================================================================== --- trunk/plugins/WorldMap/NewVirtualKeyboard.cs 2008-09-24 17:36:51 UTC (rev 2138) +++ trunk/plugins/WorldMap/NewVirtualKeyboard.cs 2008-09-25 11:03:20 UTC (rev 2139) @@ -460,6 +460,7 @@ bool _password = false; GUIImage image; bool _useSearchLayout = false; + bool _locationChangedManually = false; // added by Agree int _searchKind; // 0=Starts with, 1=Contains, 2=Ends with @@ -507,6 +508,9 @@ // construct search def. _searchKind = (int)SearchKinds.SEARCH_CONTAINS; // default search Contains + Location = new MediaPortal.Drawing.Point((int)(64 * SkinRatio), 250); + _locationChangedManually = false; + if (GUIGraphicsContext.DX9Device != null) InitBoard(); } @@ -585,9 +589,18 @@ GUIGraphicsContext.ScaleHorizontal(ref width); fTEXTBOX_WIDTH = width; + Location = new MediaPortal.Drawing.Point((int)(64 * SkinRatio), 250); + _locationChangedManually = false; + InitBoard(); } + public void SetLocation(MediaPortal.Drawing.Point location) + { + Location = location; + _locationChangedManually = true; + } + public bool Password { get { return _password; } @@ -632,7 +645,7 @@ public void SelectActiveButton(float x, float y) { // Draw each row - int x1 = (int)Location.X; + int x1 = (int)(Location.X); int y1 = (int)Location.Y + 42; //int y1 = 250, x1 = 64; GUIGraphicsContext.ScalePosToScreenResolution(ref x1, ref y1); @@ -1699,8 +1712,8 @@ { //long lColor=0xaaffffff; - //GUIGraphicsContext.ScalePosToScreenResolution(ref x1, ref y1); - //GUIGraphicsContext.ScalePosToScreenResolution(ref x2, ref y2); + GUIGraphicsContext.ScalePosToScreenResolution(ref x1, ref y1); + GUIGraphicsContext.ScalePosToScreenResolution(ref x2, ref y2); x1 += GUIGraphicsContext.OffsetX; x2 += GUIGraphicsContext.OffsetX; @@ -1756,17 +1769,13 @@ void RenderKeyboardLatin(float timePassed) { // Show text and caret -// DrawTextBox(timePassed, (int)(64 * SkinRatio), 208, (int)((MODEKEY_WIDTH + GAP_WIDTH * 9 + GAP2_WIDTH + KEY_WIDTH * 10 + 67.0f) * SkinRatio), 248); //- 64.0f - 4.0f - 4.0f - 10.0f -// DrawText((int)(82 * SkinRatio), 208); - - int tmpX = (int)(Location.X); int tmpY = (int)Location.Y; - DrawTextBox(timePassed, (int)(tmpX * SkinRatio), tmpY - 10 , (int)((MODEKEY_WIDTH + GAP_WIDTH * 9 + GAP2_WIDTH + KEY_WIDTH * 10 + tmpX) * SkinRatio), tmpY + 30); - DrawText((int)(tmpX + 4 * SkinRatio), tmpY); + DrawTextBox(timePassed, (int)(tmpX), tmpY - 5, (int)(((MODEKEY_WIDTH + GAP_WIDTH * 9 + GAP2_WIDTH + KEY_WIDTH * 10) * SkinRatio) + Location.X), tmpY + 35); + DrawText((int)(tmpX + 4), tmpY); - int x1 = (int)(tmpX*SkinRatio); + int x1 = (int)(tmpX); int y1 = tmpY + 42; GUIGraphicsContext.ScalePosToScreenResolution(ref x1, ref y1); Modified: trunk/plugins/WorldMap/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/WorldMap/Properties/AssemblyInfo.cs 2008-09-24 17:36:51 UTC (rev 2138) +++ trunk/plugins/WorldMap/Properties/AssemblyInfo.cs 2008-09-25 11:03:20 UTC (rev 2139) @@ -31,5 +31,5 @@ // // Sie können alle Werte angeben oder die standardmäßigen Revisions- und Buildnummern // übernehmen, indem Sie "*" eingeben: -[assembly: AssemblyVersion("0.9.0.0")] -[assembly: AssemblyFileVersion("0.9.0.0")] +[assembly: AssemblyVersion("0.9.1.0")] +[assembly: AssemblyFileVersion("0.9.1.0")] Modified: trunk/plugins/WorldMap/WorldmapSearch.cs =================================================================== --- trunk/plugins/WorldMap/WorldmapSearch.cs 2008-09-24 17:36:51 UTC (rev 2138) +++ trunk/plugins/WorldMap/WorldmapSearch.cs 2008-09-25 11:03:20 UTC (rev 2139) @@ -200,7 +200,7 @@ keyboard.IsSearchKeyboard = false; int x = (int)tmpLabel.Location.X;// +25; int y = (int)tmpLabel.Location.Y + 5; - keyboard.Location = new MediaPortal.Drawing.Point(x, y); + keyboard.SetLocation(new MediaPortal.Drawing.Point(x, y)); keyboard.Text = tmpLabel.Label; keyboard.DoModal(GetID); // show it... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |