mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Tournaments status is updated now and if tournament finished, it's moved to the lower finished matches view.
This commit is contained in:
parent
095c3c5776
commit
402f7fffd9
12 changed files with 89 additions and 24 deletions
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
|
|
@ -21,8 +21,8 @@
|
|||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="jPanel2" pref="779" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="69" max="32767" attributes="0"/>
|
||||
<Component id="jPanel2" pref="809" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="99" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
|
|
@ -32,12 +32,12 @@
|
|||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="jSplitPane1" pref="501" max="32767" attributes="0"/>
|
||||
<Component id="jSplitPane1" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="jPanel2" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="576" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="580" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
|
@ -131,7 +131,7 @@
|
|||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" pref="449" max="32767" attributes="0"/>
|
||||
<Component id="jLabel2" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="440" max="-2" attributes="0"/>
|
||||
|
|
@ -218,7 +218,7 @@
|
|||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSplitPane2" alignment="0" pref="743" max="32767" attributes="0"/>
|
||||
<Component id="jSplitPane2" alignment="0" pref="803" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
|
|
|
|||
|
|
@ -162,8 +162,10 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
session.removeTable(roomId, tableId);
|
||||
}
|
||||
} else if (state.equals("Watch")) {
|
||||
logger.info("Watching table " + tableId);
|
||||
session.watchTable(roomId, tableId);
|
||||
if (!isTournament) {
|
||||
logger.info("Watching table " + tableId);
|
||||
session.watchTable(roomId, tableId);
|
||||
}
|
||||
} else if (state.equals("Replay")) {
|
||||
logger.info("Replaying game " + gameId);
|
||||
// no replay because of memory leaks
|
||||
|
|
@ -653,7 +655,12 @@ class TableTableModel extends AbstractTableModel {
|
|||
if (session != null && owner.equals(session.getUserName())) {
|
||||
return "Remove";
|
||||
}
|
||||
return "Watch";
|
||||
if (tables[arg0].isTournament()) {
|
||||
return "None";
|
||||
} else {
|
||||
return "Watch";
|
||||
}
|
||||
|
||||
case FINISHED:
|
||||
owner = tables[arg0].getControllerName();
|
||||
if (session != null && owner.equals(session.getUserName())) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue