Custom VASL Play Aids

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
I put border: 1px solid black; in the th{} and td{} and I get the thin border around each of the headers/data. But they're separated.
It's hard to divine what's happening (and what you want) without screenshots :) but it sounds like putting it in the <tr> tag might give you what you want - a single border around the entire row...?

It has to be something in VASL or, more likely, my computer.
No, it's definitely VASL - I've had problems with HTML displaying a bit funny as well. Each browser has a lot of freedom in how it renders stuff, and whatever VASL/Java is using is a bit idiosyncratic.
 

Steed

Member
Joined
Jan 28, 2007
Messages
214
Reaction score
176
Location
Naugatuck, CT
First name
Walter
Country
llUnited States
It's hard to divine what's happening (and what you want) without screenshots :) but it sounds like putting it in the <tr> tag might give you what you want - a single border around the entire row...?


No, it's definitely VASL - I've had problems with HTML displaying a bit funny as well. Each browser has a lot of freedom in how it renders stuff, and whatever VASL/Java is using is a bit idiosyncratic.

No tr didn't do it ( same separation ) and I'm glad to hear it's not my computer!
Sorry about lack of screen shots:oops:.... Here are a few...
This what I'm getting with VASL -
RusAct1-VaslBord.jpg
It's ok and usable but with border-collapse: collapse; it should be like the picture below (except the less then greater than signs) which is off the website I mentioned before (It's the same code). This is what I'm looking for.
RusAct1-CSSBord.jpg


And this is what I came up with using no border at all, table background color black... (I'm using this one)RusAct1-NoBordBGBlack.jpg

It's not a big deal but it's not doing what it's suppose to do which made me wonder if I'm doing it right, VASL is not doing it right, or it's something with my computer.

Thanks for helping.
 

von Marwitz

Forum Guru
Joined
Nov 25, 2010
Messages
14,387
Reaction score
10,291
Location
Kraut Corner
Country
llUkraine
For the heck of it here is the code with the border: 1px solid black;....... It's Russian Activation Chart for SASL.

<html>
<style>
table {
border: 1px solid black;
border-collapse: collapse;
}
th {
border: 1px solid black;
background-color: #EA9012;
text-align: center;
}
td {
border: 1px solid black;
background-color: #EDAE54;
text-align: center;
}
</style>

<table>
<thead>
<th colspan="2" color="red"><b>R1:ACTIVATION CHECK (AC) (5.1)</b></th>
<tr>
<th>FRIENDLY within</th>
<th>Final IFT DRM</th>
</tr>
</thead>
<body>
<tr>
<td>8 hexes (INF only)</td>
<td> &le -2</td>
</tr>
<tr>
<td>6 hexes (INF only)</td>
<td> &le -1</td>
</tr>
<tr>
<td>4 hexes (INF only)</td>
<td> &le 0</td>
</tr>
<tr>
<td>3 hexes (INF, UnArm Veh)</td>
<td> &le 1</td>
</tr>
<tr>
<td>2 hexes (INF, UnArm Veh, CE_AFV)</td>
<td> &le 2</td>
</tr>
<tr>
<td>Adjacent</td>
<td>Automatic</td>
</tr>
</body>
</table>
</html>
In the near future, I will do a VASL setup that includes a table for some forces that can be "bought" as part of the at start OoB. I was already a bit reluctant for the sake of doing tables is more "work" to be done compared to my regular setups.

I'll look into your template and adjust it to my needs. Likely, you have saved me some work. :hellyes:

von Marwitz
 

Rooster2k

Member
Joined
Mar 26, 2018
Messages
128
Reaction score
46
Location
Buffalo NY
First name
Mike
Country
llUnited States
I just tried your suggestions.

The <table border=1> puts a "raised" border around the table and by making the table background color black the border is black.

The <table style="border: 1px solid black;"> ( I actually put it in the table{} in the <style>....</style> section ) does put a border around the table, not the headers/data. I put border: 1px solid black; in the th{} and td{} and I get the thin border around each of the headers/data. But they're separated. I put border-collapse: collapse; in the table{} but they stay separated. I've gone online to
https://www.w3schools.com/cssref/pr_border-collapse.asp
to make sure I'm doing it correctly. I've copied/pasted my code into they're example (the "try it yourself") and it works perfectly! Nice thin borders around everything and they are collapsed. But in VASL's labels they are seperated... It has to be something in VASL or, more likely, my computer.

Thanks for helping.
VASL has some problems with the coding. I have found it ejects some colors and commands so it might just be Vasl doing it's own thing.
 

Rooster2k

Member
Joined
Mar 26, 2018
Messages
128
Reaction score
46
Location
Buffalo NY
First name
Mike
Country
llUnited States
No tr didn't do it ( same separation ) and I'm glad to hear it's not my computer!
Sorry about lack of screen shots:oops:.... Here are a few...
This what I'm getting with VASL -
View attachment 4653
It's ok and usable but with border-collapse: collapse; it should be like the picture below (except the less then greater than signs) which is off the website I mentioned before (It's the same code). This is what I'm looking for.
View attachment 4654


And this is what I came up with using no border at all, table background color black... (I'm using this one)View attachment 4655

It's not a big deal but it's not doing what it's suppose to do which made me wonder if I'm doing it right, VASL is not doing it right, or it's something with my computer.

Thanks for helping.
I wonder if by putting the border on it you were getting a double border. each cell bordered then a full border?
 

von Marwitz

Forum Guru
Joined
Nov 25, 2010
Messages
14,387
Reaction score
10,291
Location
Kraut Corner
Country
llUkraine
VASL has some problems with the coding. I have found it ejects some colors and commands so it might just be Vasl doing it's own thing.
I don't know much about HTML. But I have noticed, that the VASL Draggable Overlay Labels do support some of it but not all of it.

A couple of years ago, I wanted to create (as a little piece of pychological warfare... :D) a draggable OBA FFE-overlay with animated .gif files featuring explosions and billowing smoke. Alas, not supported. At least, I could not make it work.

von Marwitz
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,998
Reaction score
6,207
Location
Teutoburger Wald
Country
llIceland
It's not a big deal but it's not doing what it's suppose to do which made me wonder if I'm doing it right, VASL is not doing it right, or it's something with my computer.
As best I understand the code, vasl does not directly support HTML of any kind. The vasl label uses a Java Swing (a Java graphics library) component, and whatever html that Java Swing component supports, that is what you get in vasl. As far as I understand it, Java Swing supports a very old version of HTML, and occasionally supports it not very well. This may have a workaround: https://stackoverflow.com/questions/3355469/1-pixel-table-border-in-jtextpane-using-html.

<html>
<head>
<style type="text/css">
table { width: 100% }
td, th { background-color: #999999 }
</style>
</head>
<body>
HTML table test:
<div style="background-color: black">
<table border="0" cellpadding="2" cellspacing="1">
<tr> <td> cell1 </td> <td> cell2 </td> </tr>
<tr> <td> cell3 </td> <td> cell4 </td> </tr>
</div>
</body>
</html>
JR
 

Steed

Member
Joined
Jan 28, 2007
Messages
214
Reaction score
176
Location
Naugatuck, CT
First name
Walter
Country
llUnited States
In the near future, I will do a VASL setup that includes a table for some forces that can be "bought" as part of the at start OoB. I was already a bit reluctant for the sake of doing tables is more "work" to be done compared to my regular setups.

I'll look into your template and adjust it to my needs. Likely, you have saved me some work. :hellyes:

von Marwitz

Glad to help.
 

Steed

Member
Joined
Jan 28, 2007
Messages
214
Reaction score
176
Location
Naugatuck, CT
First name
Walter
Country
llUnited States
VASL has some problems with the coding. I have found it ejects some colors and commands so it might just be Vasl doing it's own thing.
This and what others are saying makes sense. I've noticed sometimes some colors didn't work, border styles, etc.
At first I thought I was doing something wrong.
 

Steed

Member
Joined
Jan 28, 2007
Messages
214
Reaction score
176
Location
Naugatuck, CT
First name
Walter
Country
llUnited States
As best I understand the code, vasl does not directly support HTML of any kind. The vasl label uses a Java Swing (a Java graphics library) component, and whatever html that Java Swing component supports, that is what you get in vasl. As far as I understand it, Java Swing supports a very old version of HTML, and occasionally supports it not very well. This may have a workaround: https://stackoverflow.com/questions/3355469/1-pixel-table-border-in-jtextpane-using-html.



JR

Thanks, I'll take a look at that and see if it helps.
 

Steed

Member
Joined
Jan 28, 2007
Messages
214
Reaction score
176
Location
Naugatuck, CT
First name
Walter
Country
llUnited States
Here's the A2 : ENEMY action Table

<html>
<style>
table {
width: 250px;
background-color: black;
}
th {
padding: 5px;
background-color: white;
text-align: center;
text-weight: bold;
}
td {
padding: 5px;
background-color: #EDAE54;
text-align: center;
}
div {
width: 250px;
font-size: 90%;
border: 2px solid black;
background-color: black;
}
p {
padding: 5px;
background-color: white;
text-align: left;
}
</style>

<table>
<thead>
<th colspan="4" color="red" style="font-size: 110%">A2: ENEMY Action Tables (6.2)</th>
<tr>
<th colspan="2" color="green">A2a: Advance Attitude</th>
<th colspan="2" color="#D59233">A2b: Hold Attitude</th>
</tr>
<tr>
<th style="font-weight: bold">DR</th>
<th style="font-weight: bold">Action</th>
<th style="font-weight: bold">DR</th>
<th style="font-weight: bold">Action</th>
</thead>

<tbody>
<tr>
<td style="font-weight: bold">doubles</td>
<td>Panic<sup>1</td>
<td style="font-weight: bold">doubles</td>
<td>Panic<sup>1</td>
</tr>
<tr>
<td style="font-weight: bold; background-color: white">2-7</td>
<td style="background-color: white">Move<sup>2</td>
<td style="font-weight: bold; background-color: white">2-4</td>
<td style="background-color: white">Move<sup>2</td>
</tr>
<tr>
<td style="font-weight: bold">8-10</td>
<td>Fire<sup>3</td>
<td style="font-weight: bold">5-9</td>
<td>Fire<sup>4</td>
</tr>
<tr>
<td style="font-weight: bold; background-color: white">11</td>
<td style="background-color: white">Entrench<sup>5</td>
<td style="font-weight: bold; background-color: white">10-11</td>
<td style="background-color: white">Entrench<sup>6</td>
</tr>
</tbody>
</table>

<div>
<p style="font-weight: bold; padding: 0px;">Footnotes:</p>
<p><b><sup>1</sup></b> Elite on doubles DR of &ge 10; 1st Line on doubles DR &ge 6; 2nd Line/Partisan on each doubles DR of &ge 4;
Conscript/Green <b>all</b> doubles DR (6.21-.213).</p>
<p><b><sup>2</sup></b> An Immobile <b>armed</b> vehicle, with a Target, Fires; otherwise it does nothing (6.22-.222).</p>
<p><b><sup>3</sup></b> Move if the unit has no Target (6.23).</p>
<p><b><sup>4</sup></b> If no Target - non-Immobile <b>armed</b> vehicle Moves or an Inf MMC attempts to Entrench
(if in eligible Location and not Entrenched already). Otherwise it does nothing (6.23).</p>
<p><sup>5</sup> A non-Immobile <b>armed</b> vehicle Moves; an Inf MMC with a Target Fires if already Entrenched, or Moves
if not in an Eligible Location or if no Target exists (6.24).</p>
<p><sup>6</sup> A non-Immobile <b>armed</b> vehicle Fires; an Inf MMC with a Target Fires if already Entrenched, or Moves
if not in an Eligible Location or if no Target exists (6.24).</p>
</div>

</html>

I'm new to all this so feel free to point out anything amiss...
 

Steed

Member
Joined
Jan 28, 2007
Messages
214
Reaction score
176
Location
Naugatuck, CT
First name
Walter
Country
llUnited States
And A1: Enemy Activation Table for SASL.....

<HTML>
<style>
table {
text-align: center;
background-color: black;
}
th {
padding: 5px;
background-color:white;
color:black;
font-weight: 900;
}
td {
padding: 5px;
text-align: center;
background-color: #63ABE9;
}
</style>
<table>
<thead>
<tr>
<th colspan="3" color="red">A1: ENEMY Activation Table (5.6)</th>
</tr>
<tr>
<th>Final DR</th>
<th>Item(s) Activated</th>
<th rowspan="3">
Cumulative DRM:<br>
-1 if S? was in Advance Attitude<br>
± y as per MSR
</th>
</tr>
</thead>
<tbody>
<tr>
<td>&le 1</td>
<td>AFV<sup>1</sup>, S<sup>2</sup></td>
</tr>
<tr>
<td style="background-color:white;">2</td>
<td style="background-color:white;">AFV<sup>1</sup></td>
</tr>
<tr>
<td>3</td>
<td>S, S, L, F<sup>6</sup>, SW</td>
<td style="background-color:white;" rowspan="12">
<b>Footnotes:</b><br>
<sup>1</sup> SPG {x6a} on subsequent dr of &le two [EXC:<br>
ENEMY nationality has no SPG table]. See<br>
5.61 if Activated in Prohibited Location<br>
<br>
<sup>2</sup> Squad is a Rider if possible (depending on<br>
date, nationality and final vehicle type, D6.2)<br>
<br>
<sup>3</sup> Squad if ENEMY nationality may not Deploy<br>
<br>
<sup>4</sup> Consider this as a Gun result {x5} if the re-<br>
spective ENEMY nationality has no SPG Table<br>
{x6a}<br>
<br>
<sup>5</sup> See 5.761 if being Activated in a building Lo-<br>
cation, see 5.61 if Activated in Prohibited Lo-<br>
cation.<br>
<br>
<sup>6</sup> SMOKE if in MPh of Advance Attitude S?<br>
(5.74), otherwise NE<br>
</td>
</tr>
<tr>
<td style="background-color:white;">4</td>
<td style="background-color:white;">S, L, F<sup>6</sup>, SW</td>
</tr>
<tr>
<td>5</td>
<td>S, L, SW</td>
</tr>
<tr>
<td style="background-color:white;">6</td>
<td style="background-color:white;">S</td>
</tr>
<tr>
<td>7</td>
<td>-</td>
</tr>
<tr>
<td style="background-color:white;">8</td>
<td style="background-color:white;">HS<sup>3</sup>, SW</td>
</tr>
<tr><td>9</td>
<td>S</td>
</tr>
<tr><td style="background-color:white;">10</td>
<td style="background-color:white;">S, S, L</td>
</tr>
<tr>
<td>11</td>
<td>S, HS<sup>3</sup></td>
</tr>
<tr>
<td style="background-color:white;">12</td>
<td style="background-color:white;">HS<sup>3</sup>, Gun<sup>5</sup></td>
</tr>
<tr>
<td>13</td>
<td>SPG<sup>4</sup></td>
</tr>
<tr>
<td style="background-color:white;">14</td>
<td style="background-color:white;">S, F<sup>6</sup>, Gun<sup>5</sup></td>
</tr>
</tbody>
</table>
</HTML>
 

von Marwitz

Forum Guru
Joined
Nov 25, 2010
Messages
14,387
Reaction score
10,291
Location
Kraut Corner
Country
llUkraine
In the near future, I will do a VASL setup that includes a table for some forces that can be "bought" as part of the at start OoB. I was already a bit reluctant for the sake of doing tables is more "work" to be done compared to my regular setups.

I'll look into your template and adjust it to my needs. Likely, you have saved me some work. :hellyes:

von Marwitz
This worked quite well - here's the result:

J193 Raff's Rules Scenario Archive.jpg



von Marwitz
 

Sean Deller

Member
Joined
Oct 17, 2004
Messages
198
Reaction score
151
Location
Waxhaw, NC
Country
llUnited States
I can't view the attachments from the early part of this thread (getting an error message).

Is this a "setting" issue I can fix, or is it a website issue?
 

Rooster2k

Member
Joined
Mar 26, 2018
Messages
128
Reaction score
46
Location
Buffalo NY
First name
Mike
Country
llUnited States
I can't view the attachments from the early part of this thread (getting an error message).

Is this a "setting" issue I can fix, or is it a website issue?
Which one? Some are so old the links are no good anymore.
 

von Marwitz

Forum Guru
Joined
Nov 25, 2010
Messages
14,387
Reaction score
10,291
Location
Kraut Corner
Country
llUkraine
I can't view the attachments from the early part of this thread (getting an error message).

Is this a "setting" issue I can fix, or is it a website issue?
The early attachements were all lost in the next to last big forum software update.
But if you copy/paste the contents into a draggable overlay label, you can test/view the results.

Cheers,
von Marwitz
 

Sean Deller

Member
Joined
Oct 17, 2004
Messages
198
Reaction score
151
Location
Waxhaw, NC
Country
llUnited States
Post #1 had some attachments, but I understand they're gone. I was curious because I thought they were images. I'm not going to do any coding, so if that's what those attachments were then no worries.

Thanks,
Sean
 
Top