Author Topic: Player Ranking Screen Help  (Read 3961 times)

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Player Ranking Screen Help
« on: October 11, 2010, 01:48:24 PM »
After doing some looking on topics, I created a screen to take the place of the default player rankings screen so that I can scroll the screen as I wish, instead of the auto-scroll that happens with it. My question is if it's possible to keep the column headers visible, much like one can do with Excel. If not, no big deal, as I know the columns for the list inside and out, and would be wanting it more so for the benefit of the players.

If it's not possible, is it something that can be implemented? Below is the text that I have for the cell contents, as it's a screen with a single cell.

Thanks!
Mike

Code: [Select]
<span style="height: 500px; width: 100%; overflow: auto"><rankings showTimeOut="false" showRoundOut="false" showStillIn="true" showHitman="true" showHits="true" showWinnings="false" showPoints="true" showColumnTitles="true" max="50"></span>
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Player Ranking Screen Help
« Reply #1 on: October 11, 2010, 03:12:26 PM »
Well, it certainly *could* be done, but it isn't possible in today's TD.  That's why those screens are separate, specialized screens.  There are a number of things that have to be done to keep the column headers in place, and keep the header and footer in place if the screen is resized, etc.  Some precise pixel sizes have to be used, which is kind of the opposite of how the layout screens work.

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Player Ranking Screen Help
« Reply #2 on: October 11, 2010, 04:07:20 PM »
Here's a copy of a tournament I loaded in from last week, where my partner ran it w/o TD. I'm also including the layout, where it's going to be screen 2, if I'm not mistaken. It will be bright green text on black background, and will show the rankings separate from the specialized one. From the main screen using my custom layout, you should be able to click on the button labeled Rankings and get to the screen that I'm inquiring about. It is a set width, and one in which I would not be changing.
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Player Ranking Screen Help
« Reply #3 on: October 11, 2010, 10:35:18 PM »
So I messed around with it and here's about as close as I can get:

<tdbutton type="SelectScreen" modifier="1" text="Chage Screen" inheritFont="false" link="false"><tdbutton type="Save" inheritFont="false" link="false"><tdbutton type="AddPlayers" text="Add Player" inheritFont="false" link="false"><tdbutton type="NewPlayer" inheritFont="false" link="false"><tdbutton type="BuyIn" text="Buy In New Player" inheritFont="false" link="false"><tdbutton type="NextRound" text="+ Round" inheritFont="false" link="false"><tdbutton type="PreviousRound" text="- Round" inheritFont="false" link="false"><tdbutton type="BustOut" text="Player KO" inheritFont="false" link="false"><tdbutton type="UndoBustOut" text="Undo KO" inheritFont="false" link="false"><tdbutton type="Clock" text="Pause/Unpause" inheritFont="false" link="false"><tdbutton type="SetClock">

<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr>
<td width=100% align=center><span style="height: 30px; width: 100%; overflow: hidden"><rankings showTimeOut="false" showRoundOut="false" showStillIn="true" showHitman="true" showHits="true" showWinnings="false" showPoints="true" showColumnTitles="true" max="50"></span>
</td>
<td><span style="width: 16px"></span></td>
</tr>
</table>

<span style="height: 500px; width: 100%; overflow: auto"><rankings showTimeOut="false" showRoundOut="false" showStillIn="true" showHitman="true" showHits="true" showWinnings="false" showPoints="true" showColumnTitles="false" max="50"></span>


To get the column headers to remain fixed I used two <rankings> tokens.  The upper one is inside of a span that is only tall enough to see the header row.  Its overflow is hidden.  The lower one is 500 pixels tall and has a scrollbar to show the remaining content.  It does not have the header row.

There are two obstacles:

(1) The scrollbar on the lower section has to be accounted for on the upper section.  I did this by adding a small 16-pixel wide element next to the upper rankings.  The scrollbar on my screen is 16 pixels wide, but yours may be different, depending on your Windows settings (I have the classic theme enabled on XP).

(2) The columns will likely be different widths on the bottom than they are on the top.  This is because the lower rankings table doesn't have the header row, so it isn't accounted for when sizing the columns.  When an HTML table is rendered, every table cell is taken into account in order to determine each column's width.  And without the header row, different sizes will be computed.  Thus the columns in the header (of the upper rankings table) will likely be different widths from the columns in the lower rankings table, and they won't quite line up.

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Player Ranking Screen Help
« Reply #4 on: October 12, 2010, 10:40:33 AM »
Corey, you are a GENIUS! Using Win7 at it's max resolution (which it prefers), everything lines up near perfectly, and the scroll bar looks good enough for me too! If I were at all knowledgeable about coding these kinds of things, I probably wouldn't have half the help me posts that I have had.

Thanks a million times over!  ;D :D ;) 8)
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Player Ranking Screen Help
« Reply #5 on: October 12, 2010, 10:54:00 AM »
FYI, you can change some aspects of the scrollbar, too, using more style attributes:

scrollbar-3dlight-color
scrollbar-arrow-color
scrollbar-base-color
scrollbar-darkshadow-color
scrollbar-face-color
scrollbar-highlight-color
scrollbar-shadow-color
scrollbar-track-color


You might need to use the -ms- prefix on those:

-ms-scrollbar-3dlight-color
-ms-scrollbar-arrow-color
-ms-scrollbar-base-color
-ms-scrollbar-darkshadow-color
-ms-scrollbar-face-color
-ms-scrollbar-highlight-color
-ms-scrollbar-shadow-color
-ms-scrollbar-track-color

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Player Ranking Screen Help
« Reply #6 on: October 12, 2010, 11:25:54 AM »
I'll have to play around with it some, if time permits, prior to tonight's tournament...  :D
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Player Ranking Screen Help
« Reply #7 on: October 13, 2010, 04:58:10 PM »
Ok... I'm feeling rather stupid now...  trying to implement some of the aspects, to see what I like best, and one way I was doing it, I wasn't getting anything to work (where I place the < and > around it on its own, in the bottom portion of the table aspect), and the other thing I tried froze the program completely where I kept getting script errors (Hello, Mr. Task Manager!)...

So where/how do I put in one to try it out?

As a visual (since I know I can be confusing explaining things):
Attempt 1
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr>
<td width=100% align=center><span style="height: 30px; width: 100%; overflow: hidden"><rankings showTimeOut="false" showRoundOut="false" showStillIn="true" showHitman="true" showHits="true" showWinnings="false" showPoints="true" showColumnTitles="true" max="50"></span>
</td>
<td><span style="width: 16px"></span></td>
</tr>
</table>

<span style="height: 500px; width: 100%; overflow: auto"><rankings showTimeOut="false" showRoundOut="false" showStillIn="true" showHitman="true" showHits="true" showWinnings="false" showPoints="true" showColumnTitles="false" max="50"><scrollbar-3dlight-color></span>

Attempt 2
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr>
<td width=100% align=center><span style="height: 30px; width: 100%; overflow: hidden"><rankings showTimeOut="false" showRoundOut="false" showStillIn="true" showHitman="true" showHits="true" showWinnings="false" showPoints="true" showColumnTitles="true" max="50"></span>
</td>
<td><span style="width: 16px"></span></td>
</tr>
</table>

<span style="height: 500px; width: 100%; overflow: auto"><rankings showTimeOut="false" showRoundOut="false" showStillIn="true" showHitman="true" showHits="true" showWinnings="false" showPoints="true" showColumnTitles="false" max="50" scrollbar-3dlight-color></span>
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Player Ranking Screen Help
« Reply #8 on: October 13, 2010, 11:21:12 PM »
These are HTML/CSS style attributes (Microsoft/IE specific, but that works for the TD).

<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr>
<td width=100% align=center><span style="height: 30px; width: 100%; overflow: hidden"><rankings showTimeOut="false" showRoundOut="false" showStillIn="true" showHitman="true" showHits="true" showWinnings="false" showPoints="true" showColumnTitles="true" max="50"></span>
</td>
<td><span style="width: 16px"></span></td>
</tr>
</table>

<span style="height: 500px; width: 100%; overflow: auto; scrollbar-3dlight-color: blue"><rankings showTimeOut="false" showRoundOut="false" showStillIn="true" showHitman="true" showHits="true" showWinnings="false" showPoints="true" showColumnTitles="false" max="50"></span>

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Player Ranking Screen Help
« Reply #9 on: October 14, 2010, 11:14:01 AM »
See, I knew I was stupid.... LOL... wow, I can't believe I didn't even recognize I had to change "color" for an actual color ><

I'll have to try it out (again) after class today.  Thanks!
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!