Ticket #2405: colist_handler_lobby_sortable_game_and_player_list_with_arrows_v2.patch

File colist_handler_lobby_sortable_game_and_player_list_with_arrows_v2.patch, 89.1 KB (added by Vladislav Belov, 9 years ago)
  • binaries/data/mods/mod/gui/common/modern/sprites.xml

     
    77
    88<sprites>
    99
    10     <!--
    11     ==========================================
    12     - Scrollbar -
    13     ==========================================
    14     -->
    15     <sprite name = "ModernScrollBack">
    16         <image backcolor="43 42 40"
    17             size="0 0 100% 100%"
    18             border="true"
    19             bordercolor="0 0 0"
    20         />
    21         <image texture = "global/modern/scrollback.png"
    22             real_texture_placement = "0 0 15 128"
    23             size = "0 0 100% 100%"
    24         />
    25     </sprite>
    26     <sprite name = "ModernScrollBar">
    27         <image texture = "global/modern/scrollbar.png"
    28             real_texture_placement = "0 0 15 15"
    29             size = "0 0 100% 100%"
    30         />
    31     </sprite>
    32     <!--
    33     ==========================================
    34     - Window -
    35     ==========================================
    36     -->
    37     <sprite name = "ModernWindow">
     10    <!--
     11    ==========================================
     12    - Scrollbar -
     13    ==========================================
     14    -->
     15    <sprite name = "ModernScrollBack">
     16        <image backcolor="43 42 40"
     17            size="0 0 100% 100%"
     18            border="true"
     19            bordercolor="0 0 0"
     20        />
     21        <image texture = "global/modern/scrollback.png"
     22            real_texture_placement = "0 0 15 128"
     23            size = "0 0 100% 100%"
     24        />
     25    </sprite>
     26    <sprite name = "ModernScrollBar">
     27        <image texture = "global/modern/scrollbar.png"
     28            real_texture_placement = "0 0 15 15"
     29            size = "0 0 100% 100%"
     30        />
     31    </sprite>
     32    <!--
     33    ==========================================
     34    - Window -
     35    ==========================================
     36    -->
     37    <sprite name = "ModernWindow">
    3838
    39         <!-- background -->
    40         <image backcolor = "12 12 12"/>
    41         <image texture = "global/modern/background.png"
    42             texture_size = "0 0 1024 1024"
    43             size = "12 22 100%-12 100%-12"
    44         />
     39        <!-- background -->
     40        <image backcolor = "12 12 12"/>
     41        <image texture = "global/modern/background.png"
     42            texture_size = "0 0 1024 1024"
     43            size = "12 22 100%-12 100%-12"
     44        />
    4545
    46         <!-- shading -->
    47         <!-- we just mirror the same texture on the top and bottom -->
    48         <image texture = "global/modern/shadow-high.png"
    49             texture_size = "0 0 1024 256"
    50             size = "12 100%-268 100%-12 100%-12"
    51         />
     46        <!-- shading -->
     47        <!-- we just mirror the same texture on the top and bottom -->
     48        <image texture = "global/modern/shadow-high.png"
     49            texture_size = "0 0 1024 256"
     50            size = "12 100%-268 100%-12 100%-12"
     51        />
    5252
    53         <image texture = "global/modern/shadow-high.png"
    54             texture_size = "1024 256 0 0"
    55             size = "12 22 100%-12 268"
    56         />
     53        <image texture = "global/modern/shadow-high.png"
     54            texture_size = "1024 256 0 0"
     55            size = "12 22 100%-12 268"
     56        />
    5757
    58         <!-- top and bottom edge -->
    59         <image texture = "global/modern/border.png"
    60             real_texture_placement = "0 0 2048 8"
    61             size = "10 18 100%-10 26"
    62         />
    63         <image texture = "global/modern/border.png"
    64             real_texture_placement = "0 0 2048 8"
    65             size = "10 100%-16 100%-10 100%-8"
    66         />
     58        <!-- top and bottom edge -->
     59        <image texture = "global/modern/border.png"
     60            real_texture_placement = "0 0 2048 8"
     61            size = "10 18 100%-10 26"
     62        />
     63        <image texture = "global/modern/border.png"
     64            real_texture_placement = "0 0 2048 8"
     65            size = "10 100%-16 100%-10 100%-8"
     66        />
    6767
    68         <!-- title frame -->
    69         <image texture = "global/modern/titlebar-middle.png"
    70             real_texture_placement = "0 0 128 32"
    71             size = "50%-128 4 50%+128 37"
    72         />
    73         <image texture = "global/modern/titlebar-left.png"
    74             real_texture_placement = "0 0 32 32"
    75             size = "50%-154 4 50%-122 37"
    76         />
    77         <image texture = "global/modern/titlebar-left.png"
    78             real_texture_placement = "32 32 0 0"
    79             size = "50%+122 4 50%+154 37"
    80         />
     68        <!-- title frame -->
     69        <image texture = "global/modern/titlebar-middle.png"
     70            real_texture_placement = "0 0 128 32"
     71            size = "50%-128 4 50%+128 37"
     72        />
     73        <image texture = "global/modern/titlebar-left.png"
     74            real_texture_placement = "0 0 32 32"
     75            size = "50%-154 4 50%-122 37"
     76        />
     77        <image texture = "global/modern/titlebar-left.png"
     78            real_texture_placement = "32 32 0 0"
     79            size = "50%+122 4 50%+154 37"
     80        />
    8181
    82     </sprite>
     82    </sprite>
    8383
    84     <!--
    85     ==========================================
    86     - Dialog -
    87     ==========================================
    88     -->
    89     <sprite name="ModernDialog">
     84    <!--
     85    ==========================================
     86    - Dialog -
     87    ==========================================
     88    -->
     89    <sprite name="ModernDialog">
    9090
    91         <!-- background -->
    92         <image texture = "global/modern/background.png"
    93             texture_size = "0 0 512 512"
    94             size = "4 0 100%-4 100%-4"
    95         />
     91        <!-- background -->
     92        <image texture = "global/modern/background.png"
     93            texture_size = "0 0 512 512"
     94            size = "4 0 100%-4 100%-4"
     95        />
    9696
    97         <!-- shading -->
    98         <!-- we just mirror the same texture on the top and bottom -->
    99         <image texture = "global/modern/shadow-low.png"
    100             texture_size = "0 0 1024 128"
    101             size = "4 100%-132 100%-4 100%-4"
    102         />
     97        <!-- shading -->
     98        <!-- we just mirror the same texture on the top and bottom -->
     99        <image texture = "global/modern/shadow-low.png"
     100            texture_size = "0 0 1024 128"
     101            size = "4 100%-132 100%-4 100%-4"
     102        />
    103103
    104         <image texture = "global/modern/shadow-low.png"
    105             texture_size = "1024 128 0 0"
    106             size = "4 0 100%-4 128"
    107         />
     104        <image texture = "global/modern/shadow-low.png"
     105            texture_size = "1024 128 0 0"
     106            size = "4 0 100%-4 128"
     107        />
    108108
    109         <!-- top and bottom edge -->
    110         <image texture = "global/modern/border.png"
    111             real_texture_placement = "0 0 2048 8"
    112             size = "4 0%-4 100%-4 4"
    113         />
    114         <image texture = "global/modern/border.png"
    115             real_texture_placement = "0 0 2048 8"
    116             size = "4 100%-8 100%-4 100%"
    117         />
     109        <!-- top and bottom edge -->
     110        <image texture = "global/modern/border.png"
     111            real_texture_placement = "0 0 2048 8"
     112            size = "4 0%-4 100%-4 4"
     113        />
     114        <image texture = "global/modern/border.png"
     115            real_texture_placement = "0 0 2048 8"
     116            size = "4 100%-8 100%-4 100%"
     117        />
    118118
    119         <!-- corners -->
    120         <image texture = "global/modern/dialog-deco-top.png"
    121             real_texture_placement = "0 0 64 32"
    122             texture_size = "64 0 0 32"
    123             size = "-14 -21 50 11"
    124         />
    125         <image texture = "global/modern/dialog-deco-top.png"
    126             real_texture_placement = "0 0 64 32"
    127             texture_size = "0 0 64 32"
    128             size = "100%-50 -21 100%+14 11"
    129         />
    130         <image texture = "global/modern/dialog-deco-bottom.png"
    131             real_texture_placement = "0 0 64 32"
    132             texture_size = "64 0 0 32"
    133             size = "-31 100%-23 33 100%+9"
    134         />
    135         <image texture = "global/modern/dialog-deco-bottom.png"
    136             real_texture_placement = "0 0 64 32"
    137             texture_size = "0 0 64 32"
    138             size = "100%-31 100%-23 100%+33 100%+9"
    139         />
     119        <!-- corners -->
     120        <image texture = "global/modern/dialog-deco-top.png"
     121            real_texture_placement = "0 0 64 32"
     122            texture_size = "64 0 0 32"
     123            size = "-14 -21 50 11"
     124        />
     125        <image texture = "global/modern/dialog-deco-top.png"
     126            real_texture_placement = "0 0 64 32"
     127            texture_size = "0 0 64 32"
     128            size = "100%-50 -21 100%+14 11"
     129        />
     130        <image texture = "global/modern/dialog-deco-bottom.png"
     131            real_texture_placement = "0 0 64 32"
     132            texture_size = "64 0 0 32"
     133            size = "-31 100%-23 33 100%+9"
     134        />
     135        <image texture = "global/modern/dialog-deco-bottom.png"
     136            real_texture_placement = "0 0 64 32"
     137            texture_size = "0 0 64 32"
     138            size = "100%-31 100%-23 100%+33 100%+9"
     139        />
    140140
    141         <!-- title frame -->
    142         <image texture = "global/modern/titlebar-middle.png"
    143             real_texture_placement = "0 0 128 32"
    144             size = "50%-108 0%-18 50%+108 15"
    145         />
    146         <image texture = "global/modern/titlebar-left.png"
    147             real_texture_placement = "0 0 32 32"
    148             size = "50%-134 0%-18 50%-102 15"
    149         />
    150         <image texture = "global/modern/titlebar-left.png"
    151             real_texture_placement = "32 32 0 0"
    152             size = "50%+102 0%-18 50%+134 15"
    153         />
    154     </sprite>
     141        <!-- title frame -->
     142        <image texture = "global/modern/titlebar-middle.png"
     143            real_texture_placement = "0 0 128 32"
     144            size = "50%-108 0%-18 50%+108 15"
     145        />
     146        <image texture = "global/modern/titlebar-left.png"
     147            real_texture_placement = "0 0 32 32"
     148            size = "50%-134 0%-18 50%-102 15"
     149        />
     150        <image texture = "global/modern/titlebar-left.png"
     151            real_texture_placement = "32 32 0 0"
     152            size = "50%+102 0%-18 50%+134 15"
     153        />
     154    </sprite>
    155155
    156         <!--
    157     ==========================================
    158     - Panel -
    159     ==========================================
    160     -->
    161     <sprite name = "ModernPanel">
     156        <!--
     157    ==========================================
     158    - Panel -
     159    ==========================================
     160    -->
     161    <sprite name = "ModernPanel">
    162162
    163         <!-- background -->
    164         <image backcolor = "12 12 12"/>
    165         <image texture = "global/modern/background.png"
    166             texture_size = "0 0 1024 1024"
    167             size = "12 22 100%-12 100%-12"
    168         />
     163        <!-- background -->
     164        <image backcolor = "12 12 12"/>
     165        <image texture = "global/modern/background.png"
     166            texture_size = "0 0 1024 1024"
     167            size = "12 22 100%-12 100%-12"
     168        />
    169169
    170         <!-- shading -->
    171         <!-- we just mirror the same texture on the top and bottom -->
    172         <image texture = "global/modern/shadow-high.png"
    173             texture_size = "0 0 1024 256"
    174             size = "12 100%-268 100%-12 100%-12"
    175         />
     170        <!-- shading -->
     171        <!-- we just mirror the same texture on the top and bottom -->
     172        <image texture = "global/modern/shadow-high.png"
     173            texture_size = "0 0 1024 256"
     174            size = "12 100%-268 100%-12 100%-12"
     175        />
    176176
    177         <image texture = "global/modern/shadow-high.png"
    178             texture_size = "1024 256 0 0"
    179             size = "12 22 100%-12 268"
    180         />
    181     </sprite>
    182     <!--
    183     ==========================================
    184     - Box -
    185     ==========================================
    186     -->
    187     <sprite name="ModernDarkBoxGold">
    188         <!-- borders -->
    189         <image texture = "global/modern/gold-separator.png"
    190             real_texture_placement = "0 0 806 1"
    191             size = "0 0 100% 1"
    192         />
    193         <image texture = "global/modern/gold-separator.png"
    194             real_texture_placement = "0 0 806 1"
    195             size = "0 100%-1 100% 100%"
    196         />
    197         <!-- background -->
    198         <image backcolor = "12 12 12 100"
    199             size = "0 1 100% 100%-1"
    200         />
    201     </sprite>
    202     <sprite name="ModernDarkBoxWhite">
    203         <!-- borders -->
    204         <image texture = "global/modern/white-separator.png"
    205             real_texture_placement = "0 0 806 1"
    206             size = "0 0 100% 1"
    207         />
    208         <image texture = "global/modern/white-separator.png"
    209             real_texture_placement = "0 0 806 1"
    210             size = "0 100%-1 100% 100%"
    211         />
    212         <!-- background -->
    213         <image backcolor = "12 12 12 100"
    214             size = "0 1 100% 100%-1"
    215         />
    216     </sprite>
    217     <sprite name = "ModernDarkBoxGoldNoBottom">
    218         <image texture = "global/modern/gold-separator.png"
    219             real_texture_placement = "0 0 806 1"
    220             size = "0 0 100% 1"
    221         />
    222         <image backcolor = "12 12 12 100"
    223             size = "0 1 100% 100%"
    224         />
    225     </sprite>
    226     <sprite name = "ModernDarkBoxGoldNoTop">
    227         <image texture = "global/modern/gold-separator.png"
    228             real_texture_placement = "0 0 806 1"
    229             size = "0 100%-1 100% 100%"
    230         />
    231         <image backcolor = "12 12 12 100"
    232             size = "0 0 100% 100%-1"
    233         />
    234     </sprite>
    235     <!--
    236     ==========================================
    237     - Shading -
    238     ==========================================
    239     -->
    240     <sprite name = "ModernItemBackShadeLeft">
    241         <image texture = "global/modern/item-shading-left.png"
    242             real_texture_placement = "108 0 256 32"
    243         />
    244     </sprite>
    245     <sprite name = "ModernItemBackShadeRight">
    246         <image texture = "global/modern/item-shading-right.png"
    247             real_texture_placement = "0 0 148 32"
    248         />
    249     </sprite>
    250     <!-- A translucent black background for behind dialogs. -->
    251     <sprite name = "ModernFade">
    252         <image backcolor="0 0 0 85"
    253             size="0 0 100% 100%"
    254         />
    255     </sprite>
    256     <!--
    257     ==========================================
    258     - Lines -
    259     ==========================================
    260     -->
    261     <sprite name = "ModernGoldLine">
    262         <image texture = "global/modern/gold-separator.png"
    263             real_texture_placement = "0 0 806 1"
    264         />
    265     </sprite>
    266     <sprite name="ModernWhiteLine">
    267         <image texture = "global/modern/white-separator.png"
    268             real_texture_placement = "0 0 806 1"
    269             />
    270     </sprite>
    271     <!--
    272     ==========================================
    273     - Buttons -
    274     ==========================================
    275     -->
    276     <!-- RED -->
    277     <sprite name="ModernButtonRed">
    278         <!-- Left -->
    279         <image texture="global/modern/button/red-unselected-left-top.png"
    280             real_texture_placement="0 0 8 8"
    281             size="0 0 8 8"
    282         />
    283         <image texture="global/modern/button/red-unselected-left-center.png"
    284             real_texture_placement="0 0 8 16"
    285             texture_size="0 0 8 16"
    286             size="0 8 8 100%-8"
    287         />
    288         <image texture="global/modern/button/red-unselected-left-bottom.png"
    289             real_texture_placement="0 0 8 8"
    290             size="0 100%-8 8 100%"
    291         />
    292         <!-- Center -->
    293         <image texture="global/modern/button/red-unselected-center-top.png"
    294             real_texture_placement="0 0 128 8"
    295             texture_size="0 0 128 8"
    296             size="8 0 100%-8 8"
    297         />
    298         <image texture="global/modern/button/red-unselected-center-center.png"
    299             real_texture_placement="0 0 128 16"
    300             texture_size="0 0 128 16"
    301             size="8 8 100%-8 100%-8"
    302         />
    303         <image texture="global/modern/button/red-unselected-center-bottom.png"
    304             real_texture_placement="0 0 128 8"
    305             texture_size="0 0 128 8"
    306             size="8 100%-8 100%-8 100%"
    307         />
    308         <!-- Right -->
    309         <image texture="global/modern/button/red-unselected-right-top.png"
    310             real_texture_placement="0 0 8 8"
    311             size="100%-8 0 100% 8"
    312         />
    313         <image texture="global/modern/button/red-unselected-right-center.png"
    314             real_texture_placement="0 0 8 16"
    315             texture_size="0 0 8 16"
    316             size="100%-8 8 100% 100%-8"
    317         />
    318         <image texture="global/modern/button/red-unselected-right-bottom.png"
    319             real_texture_placement="0 0 8 8"
    320             size="100%-8 100%-8 100% 100%"
    321         />
    322     </sprite>
    323     <sprite name="ModernButtonRedOver">
    324         <effect add_color="60 42 42 0"/>
    325         <!-- Left -->
    326         <image texture="global/modern/button/red-unselected-left-top.png"
    327             real_texture_placement="0 0 8 8"
    328             size="0 0 8 8"
    329         />
    330         <image texture="global/modern/button/red-unselected-left-center.png"
    331             real_texture_placement="0 0 8 16"
    332             texture_size="0 0 8 16"
    333             size="0 8 8 100%-8"
    334         />
    335         <image texture="global/modern/button/red-unselected-left-bottom.png"
    336             real_texture_placement="0 0 8 8"
    337             size="0 100%-8 8 100%"
    338         />
    339         <!-- Center -->
    340         <image texture="global/modern/button/red-unselected-center-top.png"
    341             real_texture_placement="0 0 128 8"
    342             texture_size="0 0 128 8"
    343             size="8 0 100%-8 8"
    344         />
    345         <image texture="global/modern/button/red-unselected-center-center.png"
    346             real_texture_placement="0 0 128 16"
    347             texture_size="0 0 128 16"
    348             size="8 8 100%-8 100%-8"
    349         />
    350         <image texture="global/modern/button/red-unselected-center-bottom.png"
    351             real_texture_placement="0 0 128 8"
    352             texture_size="0 0 128 8"
    353             size="8 100%-8 100%-8 100%"
    354         />
    355         <!-- Right -->
    356         <image texture="global/modern/button/red-unselected-right-top.png"
    357             real_texture_placement="0 0 8 8"
    358             size="100%-8 0 100% 8"
    359         />
    360         <image texture="global/modern/button/red-unselected-right-center.png"
    361             real_texture_placement="0 0 8 16"
    362             texture_size="0 0 8 16"
    363             size="100%-8 8 100% 100%-8"
    364         />
    365         <image texture="global/modern/button/red-unselected-right-bottom.png"
    366             real_texture_placement="0 0 8 8"
    367             size="100%-8 100%-8 100% 100%"
    368         />
    369     </sprite>
    370     <sprite name="ModernButtonRedDisabled">
    371         <effect grayscale=""/>
    372         <!-- Left -->
    373         <image texture="global/modern/button/red-unselected-left-top.png"
    374             real_texture_placement="0 0 8 8"
    375             size="0 0 8 8"
    376         />
    377         <image texture="global/modern/button/red-unselected-left-center.png"
    378             real_texture_placement="0 0 8 16"
    379             texture_size="0 0 8 16"
    380             size="0 8 8 100%-8"
    381         />
    382         <image texture="global/modern/button/red-unselected-left-bottom.png"
    383             real_texture_placement="0 0 8 8"
    384             size="0 100%-8 8 100%"
    385         />
    386         <!-- Center -->
    387         <image texture="global/modern/button/red-unselected-center-top.png"
    388             real_texture_placement="0 0 128 8"
    389             texture_size="0 0 128 8"
    390             size="8 0 100%-8 8"
    391         />
    392         <image texture="global/modern/button/red-unselected-center-center.png"
    393             real_texture_placement="0 0 128 16"
    394             texture_size="0 0 128 16"
    395             size="8 8 100%-8 100%-8"
    396         />
    397         <image texture="global/modern/button/red-unselected-center-bottom.png"
    398             real_texture_placement="0 0 128 8"
    399             texture_size="0 0 128 8"
    400             size="8 100%-8 100%-8 100%"
    401         />
    402         <!-- Right -->
    403         <image texture="global/modern/button/red-unselected-right-top.png"
    404             real_texture_placement="0 0 8 8"
    405             size="100%-8 0 100% 8"
    406         />
    407         <image texture="global/modern/button/red-unselected-right-center.png"
    408             real_texture_placement="0 0 8 16"
    409             texture_size="0 0 8 16"
    410             size="100%-8 8 100% 100%-8"
    411         />
    412         <image texture="global/modern/button/red-unselected-right-bottom.png"
    413             real_texture_placement="0 0 8 8"
    414             size="100%-8 100%-8 100% 100%"
    415         />
    416     </sprite>
    417     <!-- YELLOW -->
    418     <sprite name="ModernButtonYellow">
    419         <!-- Left -->
    420         <image texture="global/modern/button/yellow-unselected-left-top.png"
    421             real_texture_placement="0 0 8 8"
    422             size="0 0 8 8"
    423         />
    424         <image texture="global/modern/button/yellow-unselected-left-center.png"
    425             real_texture_placement="0 0 8 16"
    426             texture_size="0 0 8 16"
    427             size="0 8 8 100%-8"
    428         />
    429         <image texture="global/modern/button/yellow-unselected-left-bottom.png"
    430             real_texture_placement="0 0 8 8"
    431             size="0 100%-8 8 100%"
    432         />
    433         <!-- Center -->
    434         <image texture="global/modern/button/yellow-unselected-center-top.png"
    435             real_texture_placement="0 0 128 8"
    436             texture_size="0 0 128 8"
    437             size="8 0 100%-8 8"
    438         />
    439         <image texture="global/modern/button/yellow-unselected-center-center.png"
    440             real_texture_placement="0 0 128 16"
    441             texture_size="0 0 128 16"
    442             size="8 8 100%-8 100%-8"
    443         />
    444         <image texture="global/modern/button/yellow-unselected-center-bottom.png"
    445             real_texture_placement="0 0 128 8"
    446             texture_size="0 0 128 8"
    447             size="8 100%-8 100%-8 100%"
    448         />
    449         <!-- Right -->
    450         <image texture="global/modern/button/yellow-unselected-right-top.png"
    451             real_texture_placement="0 0 8 8"
    452             size="100%-8 0 100% 8"
    453         />
    454         <image texture="global/modern/button/yellow-unselected-right-center.png"
    455             real_texture_placement="0 0 8 16"
    456             texture_size="0 0 8 16"
    457             size="100%-8 8 100% 100%-8"
    458         />
    459         <image texture="global/modern/button/yellow-unselected-right-bottom.png"
    460             real_texture_placement="0 0 8 8"
    461             size="100%-8 100%-8 100% 100%"
    462         />
    463     </sprite>
    464     <sprite name="ModernButtonYellowOver">
    465         <effect add_color="60 42 42 0"/>
    466         <!-- Left -->
    467         <image texture="global/modern/button/yellow-unselected-left-top.png"
    468             real_texture_placement="0 0 8 8"
    469             size="0 0 8 8"
    470         />
    471         <image texture="global/modern/button/yellow-unselected-left-center.png"
    472             real_texture_placement="0 0 8 16"
    473             texture_size="0 0 8 16"
    474             size="0 8 8 100%-8"
    475         />
    476         <image texture="global/modern/button/yellow-unselected-left-bottom.png"
    477             real_texture_placement="0 0 8 8"
    478             size="0 100%-8 8 100%"
    479         />
    480         <!-- Center -->
    481         <image texture="global/modern/button/yellow-unselected-center-top.png"
    482             real_texture_placement="0 0 128 8"
    483             texture_size="0 0 128 8"
    484             size="8 0 100%-8 8"
    485         />
    486         <image texture="global/modern/button/yellow-unselected-center-center.png"
    487             real_texture_placement="0 0 128 16"
    488             texture_size="0 0 128 16"
    489             size="8 8 100%-8 100%-8"
    490         />
    491         <image texture="global/modern/button/yellow-unselected-center-bottom.png"
    492             real_texture_placement="0 0 128 8"
    493             texture_size="0 0 128 8"
    494             size="8 100%-8 100%-8 100%"
    495         />
    496         <!-- Right -->
    497         <image texture="global/modern/button/yellow-unselected-right-top.png"
    498             real_texture_placement="0 0 8 8"
    499             size="100%-8 0 100% 8"
    500         />
    501         <image texture="global/modern/button/yellow-unselected-right-center.png"
    502             real_texture_placement="0 0 8 16"
    503             texture_size="0 0 8 16"
    504             size="100%-8 8 100% 100%-8"
    505         />
    506         <image texture="global/modern/button/yellow-unselected-right-bottom.png"
    507             real_texture_placement="0 0 8 8"
    508             size="100%-8 100%-8 100% 100%"
    509         />
    510     </sprite>
    511     <sprite name="ModernButtonYellowDisabled">
    512         <effect grayscale=""/>
    513         <!-- Left -->
    514         <image texture="global/modern/button/yellow-unselected-left-top.png"
    515             real_texture_placement="0 0 8 8"
    516             size="0 0 8 8"
    517         />
    518         <image texture="global/modern/button/yellow-unselected-left-center.png"
    519             real_texture_placement="0 0 8 16"
    520             texture_size="0 0 8 16"
    521             size="0 8 8 100%-8"
    522         />
    523         <image texture="global/modern/button/yellow-unselected-left-bottom.png"
    524             real_texture_placement="0 0 8 8"
    525             size="0 100%-8 8 100%"
    526         />
    527         <!-- Center -->
    528         <image texture="global/modern/button/yellow-unselected-center-top.png"
    529             real_texture_placement="0 0 128 8"
    530             texture_size="0 0 128 8"
    531             size="8 0 100%-8 8"
    532         />
    533         <image texture="global/modern/button/yellow-unselected-center-center.png"
    534             real_texture_placement="0 0 128 16"
    535             texture_size="0 0 128 16"
    536             size="8 8 100%-8 100%-8"
    537         />
    538         <image texture="global/modern/button/yellow-unselected-center-bottom.png"
    539             real_texture_placement="0 0 128 8"
    540             texture_size="0 0 128 8"
    541             size="8 100%-8 100%-8 100%"
    542         />
    543         <!-- Right -->
    544         <image texture="global/modern/button/yellow-unselected-right-top.png"
    545             real_texture_placement="0 0 8 8"
    546             size="100%-8 0 100% 8"
    547         />
    548         <image texture="global/modern/button/yellow-unselected-right-center.png"
    549             real_texture_placement="0 0 8 16"
    550             texture_size="0 0 8 16"
    551             size="100%-8 8 100% 100%-8"
    552         />
    553         <image texture="global/modern/button/yellow-unselected-right-bottom.png"
    554             real_texture_placement="0 0 8 8"
    555             size="100%-8 100%-8 100% 100%"
    556         />
    557     </sprite>
    558     <!--
    559     ==========================================
    560     - Basic. -
    561     ==========================================
    562     -->
    563     <sprite name="logo">
    564         <image texture="pregame/shell/logo/0ad_logo.png"
    565             real_texture_placement="0 0 256 128"
    566             size="0 -5% 100% 105%"
    567         />
    568     </sprite>
    569     <sprite name="BlackBorderOnGray">
    570         <image backcolor="darkgray"
    571             size="0 0 100% 100%"
    572             border="true"
    573             bordercolor="black"
    574         />
    575     </sprite>
    576     <!--
    577     ==========================================
    578     - Misc. -
    579     ==========================================
    580     -->
    581     <sprite name = "ModernDropDownArrow">
    582         <image texture = "global/modern/dropdown-arrow.png"
    583             real_texture_placement = "0 0 16 16"
    584             texture_size="0 0 16 16"
    585             size="0 6 16 22"
    586         />
    587     </sprite>
    588     <sprite name = "ModernDropDownArrowHighlight">
    589         <image texture = "global/modern/dropdown-arrow.png"
    590             real_texture_placement = "0 0 16 16"
    591             texture_size="0 0 16 16"
    592             size="0 6 16 22"
    593         />
    594     </sprite>
    595     <sprite name="ModernTickOn">
    596         <image texture="global/modern/tick-on.png"
    597             real_texture_placement="0 0 27 27"
    598             size="0 0 22 22"
    599         />
    600     </sprite>
    601     <sprite name="ModernTickOff">
    602         <image texture="global/modern/tick-off.png"
    603             real_texture_placement="0 0 27 27"
    604             size="0 0 22 22"
    605         />
    606     </sprite>
    607     <sprite name="ModernTickDisabled">
    608         <effect grayscale=""/>
    609         <image texture="global/modern/tick-on.png"
    610             real_texture_placement="0 0 27 27"
    611             size="0 0 22 22"
    612         />
    613     </sprite>
    614     <sprite name="ModernGear">
    615         <image texture="global/modern/gear.png"
    616             texture_size="0 0 24 24"
    617         />
    618     </sprite>
    619     <sprite name="ModernGearHover">
    620         <image texture="global/modern/gear-hover.png"
    621             texture_size="0 0 24 24"
    622         />
    623     </sprite>
    624     <sprite name="ModernGearPressed">
    625         <image texture="global/modern/gear-press.png"
    626             texture_size="0 0 24 24"
    627         />
    628     </sprite>
     177        <image texture = "global/modern/shadow-high.png"
     178            texture_size = "1024 256 0 0"
     179            size = "12 22 100%-12 268"
     180        />
     181    </sprite>
     182    <!--
     183    ==========================================
     184    - Box -
     185    ==========================================
     186    -->
     187    <sprite name="ModernDarkBoxGold">
     188        <!-- borders -->
     189        <image texture = "global/modern/gold-separator.png"
     190            real_texture_placement = "0 0 806 1"
     191            size = "0 0 100% 1"
     192        />
     193        <image texture = "global/modern/gold-separator.png"
     194            real_texture_placement = "0 0 806 1"
     195            size = "0 100%-1 100% 100%"
     196        />
     197        <!-- background -->
     198        <image backcolor = "12 12 12 100"
     199            size = "0 1 100% 100%-1"
     200        />
     201    </sprite>
     202    <sprite name="ModernDarkBoxWhite">
     203        <!-- borders -->
     204        <image texture = "global/modern/white-separator.png"
     205            real_texture_placement = "0 0 806 1"
     206            size = "0 0 100% 1"
     207        />
     208        <image texture = "global/modern/white-separator.png"
     209            real_texture_placement = "0 0 806 1"
     210            size = "0 100%-1 100% 100%"
     211        />
     212        <!-- background -->
     213        <image backcolor = "12 12 12 100"
     214            size = "0 1 100% 100%-1"
     215        />
     216    </sprite>
     217    <sprite name = "ModernDarkBoxGoldNoBottom">
     218        <image texture = "global/modern/gold-separator.png"
     219            real_texture_placement = "0 0 806 1"
     220            size = "0 0 100% 1"
     221        />
     222        <image backcolor = "12 12 12 100"
     223            size = "0 1 100% 100%"
     224        />
     225    </sprite>
     226    <sprite name = "ModernDarkBoxGoldNoTop">
     227        <image texture = "global/modern/gold-separator.png"
     228            real_texture_placement = "0 0 806 1"
     229            size = "0 100%-1 100% 100%"
     230        />
     231        <image backcolor = "12 12 12 100"
     232            size = "0 0 100% 100%-1"
     233        />
     234    </sprite>
     235    <!--
     236    ==========================================
     237    - Shading -
     238    ==========================================
     239    -->
     240    <sprite name = "ModernItemBackShadeLeft">
     241        <image texture = "global/modern/item-shading-left.png"
     242            real_texture_placement = "108 0 256 32"
     243        />
     244    </sprite>
     245    <sprite name = "ModernItemBackShadeRight">
     246        <image texture = "global/modern/item-shading-right.png"
     247            real_texture_placement = "0 0 148 32"
     248        />
     249    </sprite>
     250    <!-- A translucent black background for behind dialogs. -->
     251    <sprite name = "ModernFade">
     252        <image backcolor="0 0 0 85"
     253            size="0 0 100% 100%"
     254        />
     255    </sprite>
     256    <!--
     257    ==========================================
     258    - Lines -
     259    ==========================================
     260    -->
     261    <sprite name = "ModernGoldLine">
     262        <image texture = "global/modern/gold-separator.png"
     263            real_texture_placement = "0 0 806 1"
     264        />
     265    </sprite>
     266    <sprite name="ModernWhiteLine">
     267        <image texture = "global/modern/white-separator.png"
     268            real_texture_placement = "0 0 806 1"
     269            />
     270    </sprite>
     271    <!--
     272    ==========================================
     273    - Buttons -
     274    ==========================================
     275    -->
     276    <!-- RED -->
     277    <sprite name="ModernButtonRed">
     278        <!-- Left -->
     279        <image texture="global/modern/button/red-unselected-left-top.png"
     280            real_texture_placement="0 0 8 8"
     281            size="0 0 8 8"
     282        />
     283        <image texture="global/modern/button/red-unselected-left-center.png"
     284            real_texture_placement="0 0 8 16"
     285            texture_size="0 0 8 16"
     286            size="0 8 8 100%-8"
     287        />
     288        <image texture="global/modern/button/red-unselected-left-bottom.png"
     289            real_texture_placement="0 0 8 8"
     290            size="0 100%-8 8 100%"
     291        />
     292        <!-- Center -->
     293        <image texture="global/modern/button/red-unselected-center-top.png"
     294            real_texture_placement="0 0 128 8"
     295            texture_size="0 0 128 8"
     296            size="8 0 100%-8 8"
     297        />
     298        <image texture="global/modern/button/red-unselected-center-center.png"
     299            real_texture_placement="0 0 128 16"
     300            texture_size="0 0 128 16"
     301            size="8 8 100%-8 100%-8"
     302        />
     303        <image texture="global/modern/button/red-unselected-center-bottom.png"
     304            real_texture_placement="0 0 128 8"
     305            texture_size="0 0 128 8"
     306            size="8 100%-8 100%-8 100%"
     307        />
     308        <!-- Right -->
     309        <image texture="global/modern/button/red-unselected-right-top.png"
     310            real_texture_placement="0 0 8 8"
     311            size="100%-8 0 100% 8"
     312        />
     313        <image texture="global/modern/button/red-unselected-right-center.png"
     314            real_texture_placement="0 0 8 16"
     315            texture_size="0 0 8 16"
     316            size="100%-8 8 100% 100%-8"
     317        />
     318        <image texture="global/modern/button/red-unselected-right-bottom.png"
     319            real_texture_placement="0 0 8 8"
     320            size="100%-8 100%-8 100% 100%"
     321        />
     322    </sprite>
     323    <sprite name="ModernButtonRedOver">
     324        <effect add_color="60 42 42 0"/>
     325        <!-- Left -->
     326        <image texture="global/modern/button/red-unselected-left-top.png"
     327            real_texture_placement="0 0 8 8"
     328            size="0 0 8 8"
     329        />
     330        <image texture="global/modern/button/red-unselected-left-center.png"
     331            real_texture_placement="0 0 8 16"
     332            texture_size="0 0 8 16"
     333            size="0 8 8 100%-8"
     334        />
     335        <image texture="global/modern/button/red-unselected-left-bottom.png"
     336            real_texture_placement="0 0 8 8"
     337            size="0 100%-8 8 100%"
     338        />
     339        <!-- Center -->
     340        <image texture="global/modern/button/red-unselected-center-top.png"
     341            real_texture_placement="0 0 128 8"
     342            texture_size="0 0 128 8"
     343            size="8 0 100%-8 8"
     344        />
     345        <image texture="global/modern/button/red-unselected-center-center.png"
     346            real_texture_placement="0 0 128 16"
     347            texture_size="0 0 128 16"
     348            size="8 8 100%-8 100%-8"
     349        />
     350        <image texture="global/modern/button/red-unselected-center-bottom.png"
     351            real_texture_placement="0 0 128 8"
     352            texture_size="0 0 128 8"
     353            size="8 100%-8 100%-8 100%"
     354        />
     355        <!-- Right -->
     356        <image texture="global/modern/button/red-unselected-right-top.png"
     357            real_texture_placement="0 0 8 8"
     358            size="100%-8 0 100% 8"
     359        />
     360        <image texture="global/modern/button/red-unselected-right-center.png"
     361            real_texture_placement="0 0 8 16"
     362            texture_size="0 0 8 16"
     363            size="100%-8 8 100% 100%-8"
     364        />
     365        <image texture="global/modern/button/red-unselected-right-bottom.png"
     366            real_texture_placement="0 0 8 8"
     367            size="100%-8 100%-8 100% 100%"
     368        />
     369    </sprite>
     370    <sprite name="ModernButtonRedDisabled">
     371        <effect grayscale=""/>
     372        <!-- Left -->
     373        <image texture="global/modern/button/red-unselected-left-top.png"
     374            real_texture_placement="0 0 8 8"
     375            size="0 0 8 8"
     376        />
     377        <image texture="global/modern/button/red-unselected-left-center.png"
     378            real_texture_placement="0 0 8 16"
     379            texture_size="0 0 8 16"
     380            size="0 8 8 100%-8"
     381        />
     382        <image texture="global/modern/button/red-unselected-left-bottom.png"
     383            real_texture_placement="0 0 8 8"
     384            size="0 100%-8 8 100%"
     385        />
     386        <!-- Center -->
     387        <image texture="global/modern/button/red-unselected-center-top.png"
     388            real_texture_placement="0 0 128 8"
     389            texture_size="0 0 128 8"
     390            size="8 0 100%-8 8"
     391        />
     392        <image texture="global/modern/button/red-unselected-center-center.png"
     393            real_texture_placement="0 0 128 16"
     394            texture_size="0 0 128 16"
     395            size="8 8 100%-8 100%-8"
     396        />
     397        <image texture="global/modern/button/red-unselected-center-bottom.png"
     398            real_texture_placement="0 0 128 8"
     399            texture_size="0 0 128 8"
     400            size="8 100%-8 100%-8 100%"
     401        />
     402        <!-- Right -->
     403        <image texture="global/modern/button/red-unselected-right-top.png"
     404            real_texture_placement="0 0 8 8"
     405            size="100%-8 0 100% 8"
     406        />
     407        <image texture="global/modern/button/red-unselected-right-center.png"
     408            real_texture_placement="0 0 8 16"
     409            texture_size="0 0 8 16"
     410            size="100%-8 8 100% 100%-8"
     411        />
     412        <image texture="global/modern/button/red-unselected-right-bottom.png"
     413            real_texture_placement="0 0 8 8"
     414            size="100%-8 100%-8 100% 100%"
     415        />
     416    </sprite>
     417    <!-- YELLOW -->
     418    <sprite name="ModernButtonYellow">
     419        <!-- Left -->
     420        <image texture="global/modern/button/yellow-unselected-left-top.png"
     421            real_texture_placement="0 0 8 8"
     422            size="0 0 8 8"
     423        />
     424        <image texture="global/modern/button/yellow-unselected-left-center.png"
     425            real_texture_placement="0 0 8 16"
     426            texture_size="0 0 8 16"
     427            size="0 8 8 100%-8"
     428        />
     429        <image texture="global/modern/button/yellow-unselected-left-bottom.png"
     430            real_texture_placement="0 0 8 8"
     431            size="0 100%-8 8 100%"
     432        />
     433        <!-- Center -->
     434        <image texture="global/modern/button/yellow-unselected-center-top.png"
     435            real_texture_placement="0 0 128 8"
     436            texture_size="0 0 128 8"
     437            size="8 0 100%-8 8"
     438        />
     439        <image texture="global/modern/button/yellow-unselected-center-center.png"
     440            real_texture_placement="0 0 128 16"
     441            texture_size="0 0 128 16"
     442            size="8 8 100%-8 100%-8"
     443        />
     444        <image texture="global/modern/button/yellow-unselected-center-bottom.png"
     445            real_texture_placement="0 0 128 8"
     446            texture_size="0 0 128 8"
     447            size="8 100%-8 100%-8 100%"
     448        />
     449        <!-- Right -->
     450        <image texture="global/modern/button/yellow-unselected-right-top.png"
     451            real_texture_placement="0 0 8 8"
     452            size="100%-8 0 100% 8"
     453        />
     454        <image texture="global/modern/button/yellow-unselected-right-center.png"
     455            real_texture_placement="0 0 8 16"
     456            texture_size="0 0 8 16"
     457            size="100%-8 8 100% 100%-8"
     458        />
     459        <image texture="global/modern/button/yellow-unselected-right-bottom.png"
     460            real_texture_placement="0 0 8 8"
     461            size="100%-8 100%-8 100% 100%"
     462        />
     463    </sprite>
     464    <sprite name="ModernButtonYellowOver">
     465        <effect add_color="60 42 42 0"/>
     466        <!-- Left -->
     467        <image texture="global/modern/button/yellow-unselected-left-top.png"
     468            real_texture_placement="0 0 8 8"
     469            size="0 0 8 8"
     470        />
     471        <image texture="global/modern/button/yellow-unselected-left-center.png"
     472            real_texture_placement="0 0 8 16"
     473            texture_size="0 0 8 16"
     474            size="0 8 8 100%-8"
     475        />
     476        <image texture="global/modern/button/yellow-unselected-left-bottom.png"
     477            real_texture_placement="0 0 8 8"
     478            size="0 100%-8 8 100%"
     479        />
     480        <!-- Center -->
     481        <image texture="global/modern/button/yellow-unselected-center-top.png"
     482            real_texture_placement="0 0 128 8"
     483            texture_size="0 0 128 8"
     484            size="8 0 100%-8 8"
     485        />
     486        <image texture="global/modern/button/yellow-unselected-center-center.png"
     487            real_texture_placement="0 0 128 16"
     488            texture_size="0 0 128 16"
     489            size="8 8 100%-8 100%-8"
     490        />
     491        <image texture="global/modern/button/yellow-unselected-center-bottom.png"
     492            real_texture_placement="0 0 128 8"
     493            texture_size="0 0 128 8"
     494            size="8 100%-8 100%-8 100%"
     495        />
     496        <!-- Right -->
     497        <image texture="global/modern/button/yellow-unselected-right-top.png"
     498            real_texture_placement="0 0 8 8"
     499            size="100%-8 0 100% 8"
     500        />
     501        <image texture="global/modern/button/yellow-unselected-right-center.png"
     502            real_texture_placement="0 0 8 16"
     503            texture_size="0 0 8 16"
     504            size="100%-8 8 100% 100%-8"
     505        />
     506        <image texture="global/modern/button/yellow-unselected-right-bottom.png"
     507            real_texture_placement="0 0 8 8"
     508            size="100%-8 100%-8 100% 100%"
     509        />
     510    </sprite>
     511    <sprite name="ModernButtonYellowDisabled">
     512        <effect grayscale=""/>
     513        <!-- Left -->
     514        <image texture="global/modern/button/yellow-unselected-left-top.png"
     515            real_texture_placement="0 0 8 8"
     516            size="0 0 8 8"
     517        />
     518        <image texture="global/modern/button/yellow-unselected-left-center.png"
     519            real_texture_placement="0 0 8 16"
     520            texture_size="0 0 8 16"
     521            size="0 8 8 100%-8"
     522        />
     523        <image texture="global/modern/button/yellow-unselected-left-bottom.png"
     524            real_texture_placement="0 0 8 8"
     525            size="0 100%-8 8 100%"
     526        />
     527        <!-- Center -->
     528        <image texture="global/modern/button/yellow-unselected-center-top.png"
     529            real_texture_placement="0 0 128 8"
     530            texture_size="0 0 128 8"
     531            size="8 0 100%-8 8"
     532        />
     533        <image texture="global/modern/button/yellow-unselected-center-center.png"
     534            real_texture_placement="0 0 128 16"
     535            texture_size="0 0 128 16"
     536            size="8 8 100%-8 100%-8"
     537        />
     538        <image texture="global/modern/button/yellow-unselected-center-bottom.png"
     539            real_texture_placement="0 0 128 8"
     540            texture_size="0 0 128 8"
     541            size="8 100%-8 100%-8 100%"
     542        />
     543        <!-- Right -->
     544        <image texture="global/modern/button/yellow-unselected-right-top.png"
     545            real_texture_placement="0 0 8 8"
     546            size="100%-8 0 100% 8"
     547        />
     548        <image texture="global/modern/button/yellow-unselected-right-center.png"
     549            real_texture_placement="0 0 8 16"
     550            texture_size="0 0 8 16"
     551            size="100%-8 8 100% 100%-8"
     552        />
     553        <image texture="global/modern/button/yellow-unselected-right-bottom.png"
     554            real_texture_placement="0 0 8 8"
     555            size="100%-8 100%-8 100% 100%"
     556        />
     557    </sprite>
     558    <!--
     559    ==========================================
     560    - Basic. -
     561    ==========================================
     562    -->
     563    <sprite name="logo">
     564        <image texture="pregame/shell/logo/0ad_logo.png"
     565            real_texture_placement="0 0 256 128"
     566            size="0 -5% 100% 105%"
     567        />
     568    </sprite>
     569    <sprite name="BlackBorderOnGray">
     570        <image backcolor="darkgray"
     571            size="0 0 100% 100%"
     572            border="true"
     573            bordercolor="black"
     574        />
     575    </sprite>
     576    <!--
     577    ==========================================
     578    - Misc. -
     579    ==========================================
     580    -->
     581    <sprite name = "ModernDropDownArrow">
     582        <image texture = "global/modern/dropdown-arrow.png"
     583            real_texture_placement = "0 0 16 16"
     584            texture_size="0 0 16 16"
     585            size="0 6 16 22"
     586        />
     587    </sprite>
     588    <sprite name = "ModernDropUpArrow">
     589        <image texture = "global/modern/dropup-arrow.png"
     590            real_texture_placement = "0 0 16 16"
     591            texture_size="0 0 16 16"
     592            size="0 6 16 22"
     593        />
     594    </sprite>
     595    <sprite name = "ModernDropDownArrowHighlight">
     596        <image texture = "global/modern/dropdown-arrow.png"
     597            real_texture_placement = "0 0 16 16"
     598            texture_size="0 0 16 16"
     599            size="0 6 16 22"
     600        />
     601    </sprite>
     602    <sprite name="ModernTickOn">
     603        <image texture="global/modern/tick-on.png"
     604            real_texture_placement="0 0 27 27"
     605            size="0 0 22 22"
     606        />
     607    </sprite>
     608    <sprite name="ModernTickOff">
     609        <image texture="global/modern/tick-off.png"
     610            real_texture_placement="0 0 27 27"
     611            size="0 0 22 22"
     612        />
     613    </sprite>
     614    <sprite name="ModernTickDisabled">
     615        <effect grayscale=""/>
     616        <image texture="global/modern/tick-on.png"
     617            real_texture_placement="0 0 27 27"
     618            size="0 0 22 22"
     619        />
     620    </sprite>
     621    <sprite name="ModernGear">
     622        <image texture="global/modern/gear.png"
     623            texture_size="0 0 24 24"
     624        />
     625    </sprite>
     626    <sprite name="ModernGearHover">
     627        <image texture="global/modern/gear-hover.png"
     628            texture_size="0 0 24 24"
     629        />
     630    </sprite>
     631    <sprite name="ModernGearPressed">
     632        <image texture="global/modern/gear-press.png"
     633            texture_size="0 0 24 24"
     634        />
     635    </sprite>
    629636</sprites>
  • binaries/data/mods/public/gui/lobby/lobby.js

     
    11var g_ChatMessages = [];
    22var g_Name = "unknown";
    33var g_GameList = {};
     4var g_GameListSortBy = "name";
     5var g_PlayerListSortBy = "name";
     6var g_GameListOrder = 1; // 1 for ascending sort, and -1 for descending
     7var g_PlayerListOrder = 1;
    48var g_specialKey = Math.random();
    59// This object looks like {"name":[numMessagesSinceReset, lastReset, timeBlocked]} when in use.
    610var g_spamMonitor = {};
     
    7478// Update functions
    7579////////////////////////////////////////////////////////////////////////////////////////////////
    7680
     81function updateGameListOrderSelection()
     82{
     83    g_GameListSortBy = Engine.GetGUIObjectByName("gamesBox").selected_column;
     84    g_GameListOrder = Engine.GetGUIObjectByName("gamesBox").selected_column_order;
     85
     86    applyFilters();
     87}
     88
     89function updatePlayerListOrderSelection()
     90{
     91    g_PlayerListSortBy = Engine.GetGUIObjectByName("playersBox").selected_column;
     92    g_PlayerListOrder = Engine.GetGUIObjectByName("playersBox").selected_column_order;
     93
     94    updatePlayerList();
     95}
     96
    7797function resetFilters()
    7898{
    7999    // Reset states of gui objects
     
    82102    Engine.GetGUIObjectByName("mapTypeFilter").selected = 0;
    83103    Engine.GetGUIObjectByName("showFullFilter").checked = false;
    84104
    85     // Update the list of games
    86     updateGameList();
    87 
    88     // Update info box about the game currently selected
    89     updateGameSelection();
     105    applyFilters();
    90106}
    91107
    92108function applyFilters()
     
    149165}
    150166
    151167/**
    152  * Do a full update of the player listing, including ratings from C++.
     168 * Do a full update of the player listing, including ratings from cached C++ information.
    153169 *
    154170 * @return Array containing the player, presence, nickname, and rating listings.
    155171 */
     
    164180    // Sort the player list, ignoring case.
    165181    cleanPlayerList.sort(function(a,b)
    166182    {
    167         var aName = a.name.toLowerCase();
    168         var bName = b.name.toLowerCase();
    169         return ((aName > bName) ? 1 : (bName > aName) ? -1 : 0);
    170     } );
     183        switch (g_PlayerListSortBy)
     184        {
     185        case 'rating':
     186            if (a.rating < b.rating)
     187                return -g_PlayerListOrder;
     188            else if (a.rating > b.rating)
     189                return g_PlayerListOrder;
     190            return 0;
     191        case 'status':
     192            let order = ["available", "away", "playing", "gone", "offline"];
     193            let presenceA = order.indexOf(a.presence);
     194            let presenceB = order.indexOf(b.presence);
     195            if (presenceA < presenceB)
     196                return -g_PlayerListOrder;
     197            else if (presenceA > presenceB)
     198                return g_PlayerListOrder;
     199            return 0;
     200        default:
     201            var aName = a.name.toLowerCase();
     202            var bName = b.name.toLowerCase();
     203            if (aName < bName)
     204                return -g_PlayerListOrder;
     205            else if (aName > bName)
     206                return g_PlayerListOrder;
     207            return 0;
     208        }
     209    });
    171210    for (var i = 0; i < cleanPlayerList.length; i++)
    172211    {
    173212        // Identify current user's rating.
     
    365404    // Sort the list of games to that games 'waiting' are displayed at the top, followed by 'init', followed by 'running'.
    366405    var gameStatuses = ['waiting', 'init', 'running'];
    367406    g_GameList.sort(function (a,b) {
    368         if (gameStatuses.indexOf(a.state) < gameStatuses.indexOf(b.state))
    369             return -1;
    370         else if (gameStatuses.indexOf(a.state) > gameStatuses.indexOf(b.state))
    371             return 1;
     407        switch (g_GameListSortBy)
     408        {
     409        case 'name':
     410            if (a.name < b.name)
     411                return -g_GameListOrder;
     412            else if (a.name > b.name)
     413                return g_GameListOrder;
     414            return 0;
     415        case 'mapName':
     416            if (translate(a.niceMapName) < translate(b.niceMapName))
     417                return -g_GameListOrder;
     418            else if (translate(a.niceMapName) > translate(b.niceMapName))
     419                return g_GameListOrder;
     420            return 0;
     421        case 'mapSize':
     422            // mapSize contains the number of tiles for random maps
     423            // scenario maps always display default size
     424            if (a.mapSize < b.mapSize)
     425                return -g_GameListOrder;
     426            else if (a.mapSize > b.mapSize)
     427                return g_GameListOrder;
     428            return 0;
     429        case 'mapType':
     430            if (a.mapType < b.mapType)
     431                return -g_GameListOrder;
     432            else if (a.mapType > b.mapType)
     433                return g_GameListOrder;
     434            return 0;
     435        case 'nPlayers':
     436            // Numerical comparison of player count ratio.
     437            if (a.nbp * b.tnbp < b.nbp * a.tnbp) // ratio a = a.nbp / a.tnbp, ratio b = b.nbp / b.tnbp
     438                return -g_GameListOrder;
     439            else if (a.nbp * b.tnbp > b.nbp * a.tnbp)
     440                return g_GameListOrder;
     441            return 0;
     442        default:
     443            if (gameStatuses.indexOf(a.state) < gameStatuses.indexOf(b.state))
     444                return -1;
     445            else if (gameStatuses.indexOf(a.state) > gameStatuses.indexOf(b.state))
     446                return 1;
    372447
    373         // Alphabetical comparison of names as tiebreaker.
    374         if (a.name < b.name)
    375             return -1;
    376         else if (a.name > b.name)
    377             return 1;
    378         return 0;
     448            // Alphabetical comparison of names as tiebreaker.
     449            if (a.name < b.name)
     450                return -1;
     451            else if (a.name > b.name)
     452                return 1;
     453            return 0;
     454        }
    379455    });
    380456
    381457    var list_name = [];
  • binaries/data/mods/public/gui/lobby/lobby.xml

     
    11<?xml version="1.0" encoding="utf-8"?>
    22
    33<objects>
    4     <script file="gui/common/functions_global_object.js"/>
    5     <script file="gui/common/functions_utility.js"/>
    6     <script file="gui/common/timer.js"/>
    7     <script file="gui/common/music.js"/>
     4    <script file="gui/common/functions_global_object.js"/>
     5    <script file="gui/common/functions_utility.js"/>
     6    <script file="gui/common/timer.js"/>
     7    <script file="gui/common/music.js"/>
    88
    9     <script file="gui/lobby/lobby.js"/>
     9    <script file="gui/lobby/lobby.js"/>
    1010
    11     <object type="image" style="ModernWindow" size="0 0 100% 100%" name="lobbyWindow">
     11    <object type="image" style="ModernWindow" size="0 0 100% 100%" name="lobbyWindow">
    1212
    13         <object style="ModernLabelText" type="text" size="50%-128 0%+4 50%+128 36">
    14             <translatableAttribute id="caption">Multiplayer Lobby</translatableAttribute>
    15         </object>
     13        <object style="ModernLabelText" type="text" size="50%-128 0%+4 50%+128 36">
     14            <translatableAttribute id="caption">Multiplayer Lobby</translatableAttribute>
     15        </object>
    1616
    17         <action on="Tick">
    18             onTick();
    19         </action>
     17        <action on="Tick">
     18            onTick();
     19        </action>
    2020
    21         <!-- Left panel: Player list. -->
    22         <object name="leftPanel" size="20 30 20% 100%-280">
    23             <object name="playersBox" style="ModernList" type="olist" size="0 0 100% 100%" font="sans-bold-stroke-13">
    24                 <def id="status" width="26%">
    25                     <translatableAttribute id="heading">Status</translatableAttribute>
    26                 </def>
    27                 <def id="name" width="50%">
    28                     <translatableAttribute id="heading">Name</translatableAttribute>
    29                 </def>
    30                 <def id="rating" width="24%">
    31                     <translatableAttribute id="heading">Rating</translatableAttribute>
    32                 </def>
    33                 <action on="SelectionChange">
    34                     displayProfile("lobbylist");
    35                 </action>
    36             </object>
    37         </object>
     21        <!-- Left panel: Player list. -->
     22        <object name="leftPanel" size="20 30 20% 100%-280">
     23            <object name="playersBox" style="ModernList" sprite_asc="ModernDropDownArrow" default_column="name" sprite_desc="ModernDropUpArrow" type="olist" sortable="true" size="0 0 100% 100%" font="sans-bold-stroke-13">
     24                <def id="status" width="26%">
     25                    <translatableAttribute id="heading">Status</translatableAttribute>
     26                </def>
     27                <def id="name" width="48%">
     28                    <translatableAttribute id="heading">Name</translatableAttribute>
     29                </def>
     30                <def id="rating" width="26%">
     31                    <translatableAttribute id="heading">Rating</translatableAttribute>
     32                </def>
     33                <action on="SelectionChange">
     34                    displayProfile("lobbylist");
     35                </action>
     36                <action on="SelectionColumnChange">
     37                    updatePlayerListOrderSelection();
     38                </action>
     39            </object>
     40        </object>
    3841
    39         <object name="profilePanel" size="20 100%-275 20% 100%-80">
    40             <object name="profileBox" type="image" sprite="ModernDarkBoxGold" size="0 0 100% 100%">
    41                 <object name="profileArea" size="0 0 100% 100%" hidden="true">
    42                     <object name="usernameText" size="0 0 100% 45" type="text" style="ModernLabelText" text_align="center" font="sans-bold-16" />
    43                     <object name="roleText" size="0 45 100% 70" type="text" style="ModernLabelText" text_align="center" font="sans-bold-stroke-12" />
    44                     <object size="0 70 40%+40 90" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    45                         <translatableAttribute id="caption">Current Rank:</translatableAttribute>
    46                     </object>
    47                     <object name="rankText" size="40%+45 70 100% 90" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    48                     <object size="0 90 40%+40 110" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    49                         <translatableAttribute id="caption">Highest Rating:</translatableAttribute>
    50                     </object>
    51                     <object name="highestRatingText" size="40%+45 90 100% 110" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    52                     <object size="0 110 40%+40 130" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    53                         <translatableAttribute id="caption">Total Games:</translatableAttribute>
    54                     </object>
    55                     <object name="totalGamesText" size="40%+45 110 100% 130" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    56                     <object size="0 130 40%+40 150" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    57                         <translatableAttribute id="caption">Wins:</translatableAttribute>
    58                     </object>
    59                     <object name="winsText" size="40%+45 130 100% 150" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    60                     <object size="0 150 40%+40 170" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    61                         <translatableAttribute id="caption">Losses:</translatableAttribute>
    62                     </object>
    63                     <object name="lossesText" size="40%+45 150 100% 170" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    64                     <object size="0 170 40%+40 190" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    65                         <translatableAttribute id="caption">Win Rate:</translatableAttribute>
    66                     </object>
    67                     <object name="ratioText" size="40%+45 170 100% 190" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    68                 </object>
    69             </object>
    70         </object>
     42        <object name="profilePanel" size="20 100%-275 20% 100%-80">
     43            <object name="profileBox" type="image" sprite="ModernDarkBoxGold" size="0 0 100% 100%">
     44                <object name="profileArea" size="0 0 100% 100%" hidden="true">
     45                    <object name="usernameText" size="0 0 100% 45" type="text" style="ModernLabelText" text_align="center" font="sans-bold-16" />
     46                    <object name="roleText" size="0 45 100% 70" type="text" style="ModernLabelText" text_align="center" font="sans-bold-stroke-12" />
     47                    <object size="0 70 40%+40 90" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     48                        <translatableAttribute id="caption">Current Rank:</translatableAttribute>
     49                    </object>
     50                    <object name="rankText" size="40%+45 70 100% 90" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     51                    <object size="0 90 40%+40 110" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     52                        <translatableAttribute id="caption">Highest Rating:</translatableAttribute>
     53                    </object>
     54                    <object name="highestRatingText" size="40%+45 90 100% 110" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     55                    <object size="0 110 40%+40 130" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     56                        <translatableAttribute id="caption">Total Games:</translatableAttribute>
     57                    </object>
     58                    <object name="totalGamesText" size="40%+45 110 100% 130" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     59                    <object size="0 130 40%+40 150" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     60                        <translatableAttribute id="caption">Wins:</translatableAttribute>
     61                    </object>
     62                    <object name="winsText" size="40%+45 130 100% 150" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     63                    <object size="0 150 40%+40 170" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     64                        <translatableAttribute id="caption">Losses:</translatableAttribute>
     65                    </object>
     66                    <object name="lossesText" size="40%+45 150 100% 170" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     67                    <object size="0 170 40%+40 190" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     68                        <translatableAttribute id="caption">Win Rate:</translatableAttribute>
     69                    </object>
     70                    <object name="ratioText" size="40%+45 170 100% 190" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     71                </object>
     72            </object>
     73        </object>
    7174
    72         <object name="leftButtonPanel" size="20 100%-75 20% 100%-20">
    73             <object type="button" style="ModernButtonRed" size="0 0 100% 25">
    74                 <translatableAttribute id="caption">Leaderboard</translatableAttribute>
    75                 <action on="Press">
    76                     Engine.GetGUIObjectByName("leaderboard").hidden = false;
    77                     Engine.GetGUIObjectByName("fade").hidden = false;
    78                     displayProfile("leaderboard");
    79                 </action>
    80             </object>
    81             <object type="button" style="ModernButtonRed" size="0 30 100% 100%">
    82                 <translatableAttribute id="caption">User Profile Lookup</translatableAttribute>
    83                 <action on="Press">
    84                     Engine.GetGUIObjectByName("profileFetch").hidden = false;
    85                     Engine.GetGUIObjectByName("fade").hidden = false;
    86                 </action>
    87             </object>
    88         </object>
     75        <object name="leftButtonPanel" size="20 100%-75 20% 100%-20">
     76            <object type="button" style="ModernButtonRed" size="0 0 100% 25">
     77                <translatableAttribute id="caption">Leaderboard</translatableAttribute>
     78                <action on="Press">
     79                    Engine.GetGUIObjectByName("leaderboard").hidden = false;
     80                    Engine.GetGUIObjectByName("fade").hidden = false;
     81                    displayProfile("leaderboard");
     82                </action>
     83            </object>
     84            <object type="button" style="ModernButtonRed" size="0 30 100% 100%">
     85                <translatableAttribute id="caption">User Profile Lookup</translatableAttribute>
     86                <action on="Press">
     87                    Engine.GetGUIObjectByName("profileFetch").hidden = false;
     88                    Engine.GetGUIObjectByName("fade").hidden = false;
     89                </action>
     90            </object>
     91        </object>
    8992
    90         <!-- Right panel: Game details. -->
    91         <object name="rightPanel" size="100%-250 30 100%-20 100%-20" >
    92             <object name="gameInfoEmpty" size="0 0 100% 100%-60" type="image" sprite="ModernDarkBoxGold" hidden="false">
    93                 <object name="logo" size="50%-110 40 50%+110 140" type="image" sprite="logo"/>
    94                 <object name="subjectBox" type="image" sprite="ModernDarkBoxWhite" size="3% 180 97% 99%">
    95                     <object name="subject" size="5 5 100%-5 100%-5" type="text" style="ModernText" text_align="center"/>
    96                 </object>
    97             </object>
    98             <object name="gameInfo" size="0 0 100% 100%-90" type="image" sprite="ModernDarkBoxGold" hidden="true">
     93        <!-- Right panel: Game details. -->
     94        <object name="rightPanel" size="100%-250 30 100%-20 100%-20" >
     95            <object name="gameInfoEmpty" size="0 0 100% 100%-60" type="image" sprite="ModernDarkBoxGold" hidden="false">
     96                <object name="logo" size="50%-110 40 50%+110 140" type="image" sprite="logo"/>
     97                <object name="subjectBox" type="image" sprite="ModernDarkBoxWhite" size="3% 180 97% 99%">
     98                    <object name="subject" size="5 5 100%-5 100%-5" type="text" style="ModernText" text_align="center"/>
     99                </object>
     100            </object>
     101            <object name="gameInfo" size="0 0 100% 100%-90" type="image" sprite="ModernDarkBoxGold" hidden="true">
    99102
    100                 <!-- Map Name -->
    101                 <object name="sgMapName" size="0 5 100% 20" type="text" style="ModernLabelText"/>
     103                <!-- Map Name -->
     104                <object name="sgMapName" size="0 5 100% 20" type="text" style="ModernLabelText"/>
    102105
    103                 <!-- Map Preview -->
    104                 <object name="sgMapPreview" size="5 25 100%-5 190"  type="image" sprite=""/>
     106                <!-- Map Preview -->
     107                <object name="sgMapPreview" size="5 25 100%-5 190"  type="image" sprite=""/>
    105108
    106                 <object size="5 194 100%-5 195" type="image" sprite="ModernWhiteLine" z="25"/>
     109                <object size="5 194 100%-5 195" type="image" sprite="ModernWhiteLine" z="25"/>
    107110
    108                 <!-- Map Type -->
    109                 <object size="5 195 50% 240" type="image" sprite="ModernItemBackShadeLeft">
    110                     <object size="0 0 100%-10 100%" type="text" style="ModernLabelText" text_align="right">
    111                         <translatableAttribute id="caption">Map Type:</translatableAttribute>
    112                     </object>
    113                 </object>
    114                 <object size="50% 195 100%-5 240" type="image" sprite="ModernItemBackShadeRight">
    115                     <object name="sgMapType" size="0 0 100% 100%" type="text" style="ModernLabelText" text_align="left"/>
    116                 </object>
     111                <!-- Map Type -->
     112                <object size="5 195 50% 240" type="image" sprite="ModernItemBackShadeLeft">
     113                    <object size="0 0 100%-10 100%" type="text" style="ModernLabelText" text_align="right">
     114                        <translatableAttribute id="caption">Map Type:</translatableAttribute>
     115                    </object>
     116                </object>
     117                <object size="50% 195 100%-5 240" type="image" sprite="ModernItemBackShadeRight">
     118                    <object name="sgMapType" size="0 0 100% 100%" type="text" style="ModernLabelText" text_align="left"/>
     119                </object>
    117120
    118                 <object size="5 239 100%-5 240" type="image" sprite="ModernWhiteLine" z="25"/>
     121                <object size="5 239 100%-5 240" type="image" sprite="ModernWhiteLine" z="25"/>
    119122
    120                 <!-- Map Size -->
    121                 <object size="5 240 50% 285" type="image" sprite="ModernItemBackShadeLeft">
    122                     <object size="0 0 100%-10 100%" type="text" style="ModernLabelText" text_align="right">
    123                         <translatableAttribute id="caption">Map Size:</translatableAttribute>
    124                     </object>
    125                 </object>
    126                 <object size="50% 240 100%-5 285" type="image" sprite="ModernItemBackShadeRight">
    127                     <object name="sgMapSize" size="0 0 100% 100%" type="text" style="ModernLabelText" text_align="left"/>
    128                 </object>
     123                <!-- Map Size -->
     124                <object size="5 240 50% 285" type="image" sprite="ModernItemBackShadeLeft">
     125                    <object size="0 0 100%-10 100%" type="text" style="ModernLabelText" text_align="right">
     126                        <translatableAttribute id="caption">Map Size:</translatableAttribute>
     127                    </object>
     128                </object>
     129                <object size="50% 240 100%-5 285" type="image" sprite="ModernItemBackShadeRight">
     130                    <object name="sgMapSize" size="0 0 100% 100%" type="text" style="ModernLabelText" text_align="left"/>
     131                </object>
    129132
    130                 <object size="5 284 100%-5 285" type="image" sprite="ModernWhiteLine" z="25"/>
     133                <object size="5 284 100%-5 285" type="image" sprite="ModernWhiteLine" z="25"/>
    131134
    132                 <!-- Map Description -->
    133                 <object type="image" sprite="ModernDarkBoxWhite" size="3% 290 97% 75%">
    134                     <object name="sgMapDescription" size="0 0 100% 100%" type="text" style="ModernText" font="sans-12"/>
    135                 </object>
     135                <!-- Map Description -->
     136                <object type="image" sprite="ModernDarkBoxWhite" size="3% 290 97% 75%">
     137                    <object name="sgMapDescription" size="0 0 100% 100%" type="text" style="ModernText" font="sans-12"/>
     138                </object>
    136139
    137                 <object type="image" sprite="ModernDarkBoxWhite" size="3% 75%+5 97% 99%">
    138                     <!-- Number of Players -->
    139                     <object size="0% 3% 57% 12%" type="text" style="ModernRightLabelText">
    140                         <translatableAttribute id="caption">Players:</translatableAttribute>
    141                     </object>
    142                     <object name="sgNbPlayers" size="58% 3% 70% 12%" type="text" style="ModernLeftLabelText" text_align="left"/>
     140                <object type="image" sprite="ModernDarkBoxWhite" size="3% 75%+5 97% 99%">
     141                    <!-- Number of Players -->
     142                    <object size="0% 3% 57% 12%" type="text" style="ModernRightLabelText">
     143                        <translatableAttribute id="caption">Players:</translatableAttribute>
     144                    </object>
     145                    <object name="sgNbPlayers" size="58% 3% 70% 12%" type="text" style="ModernLeftLabelText" text_align="left"/>
    143146
    144                     <!-- Player Names -->
    145                     <object name="sgPlayersNames" size="0 15% 100% 100%" type="text" style="MapPlayerList"/>
    146                 </object>
    147             </object>
    148             <object name="joinGameButton" type="button" style="ModernButtonRed" size="0 100%-85 100% 100%-60" hidden="true">
    149                 <translatableAttribute id="caption" comment="Join the game currently selected in the list.">Join Game</translatableAttribute>
    150                 <action on="Press">
    151                     joinSelectedGame();
    152                 </action>
    153             </object>
    154             <object name="hostButton" type="button" style="ModernButtonRed" size="0 100%-55 100% 100%-30">
    155                 <translatableAttribute id="caption">Host Game</translatableAttribute>
    156                 <action on="Press">
    157                     hostGame();
    158                 </action>
    159             </object>
     147                    <!-- Player Names -->
     148                    <object name="sgPlayersNames" size="0 15% 100% 100%" type="text" style="MapPlayerList"/>
     149                </object>
     150            </object>
     151            <object name="joinGameButton" type="button" style="ModernButtonRed" size="0 100%-85 100% 100%-60" hidden="true">
     152                <translatableAttribute id="caption" comment="Join the game currently selected in the list.">Join Game</translatableAttribute>
     153                <action on="Press">
     154                    joinSelectedGame();
     155                </action>
     156            </object>
     157            <object name="hostButton" type="button" style="ModernButtonRed" size="0 100%-55 100% 100%-30">
     158                <translatableAttribute id="caption">Host Game</translatableAttribute>
     159                <action on="Press">
     160                    hostGame();
     161                </action>
     162            </object>
    160163
    161             <object type="button" style="ModernButtonRed" size="0 100%-25 100% 100%">
    162                 <translatableAttribute id="caption">Main Menu</translatableAttribute>
    163                 <action on="Press">
    164                     lobbyStop();
    165                     Engine.SwitchGuiPage("page_pregame.xml");
    166                 </action>
    167             </object>
    168         </object>
     164            <object type="button" style="ModernButtonRed" size="0 100%-25 100% 100%">
     165                <translatableAttribute id="caption">Main Menu</translatableAttribute>
     166                <action on="Press">
     167                    lobbyStop();
     168                    Engine.SwitchGuiPage("page_pregame.xml");
     169                </action>
     170            </object>
     171        </object>
    169172
    170         <!-- Middle panel: Filters, game list, chat box. -->
    171         <object name="middlePanel" size="20%+5 5% 100%-255 97.2%">
    172             <object name="gamesBox" style="ModernList" type="olist" size="0 25 100% 48%" font="sans-stroke-13">
    173                 <action on="SelectionChange">updateGameSelection();</action>
    174                 <def id="name" color="0 60 0" width="27%">
    175                     <translatableAttribute id="heading">Name</translatableAttribute>
    176                 </def>
    177                 <!--<def id="ip" heading="IP" color="0 128 128" width="170"/>-->
    178                 <def id="mapName" color="128 128 128" width="25%">
    179                     <translatableAttribute id="heading">Map Name</translatableAttribute>
    180                 </def>
    181                 <def id="mapSize" color="128 128 128" width="16%">
    182                     <translatableAttribute id="heading" context="map">Size</translatableAttribute>
    183                 </def>
    184                 <def id="mapType" color="0 128 128" width="16%">
    185                     <translatableAttribute id="heading" context="map">Type</translatableAttribute>
    186                 </def>
    187                 <def id="nPlayers" color="0 128 128" width="16%">
    188                     <translatableAttribute id="heading">Players</translatableAttribute>
    189                 </def>
    190             </object>
     173        <!-- Middle panel: Filters, game list, chat box. -->
     174        <object name="middlePanel" size="20%+5 5% 100%-255 97.2%">
     175            <object name="gamesBox" style="ModernList" sprite_asc="ModernDropDownArrow" default_column="name" sprite_desc="ModernDropUpArrow" type="olist" sortable="true" size="0 25 100% 48%" font="sans-stroke-13">
     176                <action on="SelectionChange">updateGameSelection();</action>
     177                <action on="SelectionColumnChange">updateGameListOrderSelection();</action>
     178                <def id="name" color="0 60 0" width="27%">
     179                    <translatableAttribute id="heading">Name</translatableAttribute>
     180                </def>
     181                <!--<def id="ip" heading="IP" color="0 128 128" width="170"/>-->
     182                <def id="mapName" color="128 128 128" width="25%">
     183                    <translatableAttribute id="heading">Map Name</translatableAttribute>
     184                </def>
     185                <def id="mapSize" color="128 128 128" width="16%">
     186                    <translatableAttribute id="heading" context="map">Size</translatableAttribute>
     187                </def>
     188                <def id="mapType" color="0 128 128" width="16%">
     189                    <translatableAttribute id="heading" context="map">Type</translatableAttribute>
     190                </def>
     191                <def id="nPlayers" color="0 128 128" width="16%">
     192                    <translatableAttribute id="heading">Players</translatableAttribute>
     193                </def>
     194            </object>
    191195
    192             <object name="filterPanel" size="0 0 100% 24">
    193                 <object name="mapSizeFilter"
    194                     type="dropdown"
    195                     style="ModernDropDown"
    196                     size="52%-5 0 68%-10 100%"
    197                     font="sans-bold-13">
    198                     <action on="SelectionChange">applyFilters();</action>
    199                 </object>
     196            <object name="filterPanel" size="0 0 100% 24">
     197                <object name="mapSizeFilter"
     198                    type="dropdown"
     199                    style="ModernDropDown"
     200                    size="52%-5 0 68%-10 100%"
     201                    font="sans-bold-13">
     202                    <action on="SelectionChange">applyFilters();</action>
     203                </object>
    200204
    201                 <object name="mapTypeFilter"
    202                     type="dropdown"
    203                     style="ModernDropDown"
    204                     size="68%-5 0 84%-10 100%"
    205                     font="sans-bold-13">
    206                     <action on="SelectionChange">applyFilters();</action>
    207                 </object>
     205                <object name="mapTypeFilter"
     206                    type="dropdown"
     207                    style="ModernDropDown"
     208                    size="68%-5 0 84%-10 100%"
     209                    font="sans-bold-13">
     210                    <action on="SelectionChange">applyFilters();</action>
     211                </object>
    208212
    209                 <object name="playersNumberFilter"
    210                     type="dropdown"
    211                     style="ModernDropDown"
    212                     size="84%-5 0 100% 100%"
    213                     font="sans-bold-13">
    214                     <action on="SelectionChange">applyFilters();</action>
    215                 </object>
     213                <object name="playersNumberFilter"
     214                    type="dropdown"
     215                    style="ModernDropDown"
     216                    size="84%-5 0 100% 100%"
     217                    font="sans-bold-13">
     218                    <action on="SelectionChange">applyFilters();</action>
     219                </object>
    216220
    217                 <object type="text" size="22 0 52%-10 100%" text_align="left" textcolor="white">
    218                     <translatableAttribute id="caption">Show full games</translatableAttribute>
    219                 </object>
    220                 <object name="showFullFilter"
    221                     type="checkbox"
    222                     checked="false"
    223                     style="ModernTickBox"
    224                     size="0 0 20 20"
    225                     font="sans-bold-13">
    226                     <action on="Press">applyFilters();</action>
    227                 </object>
    228             </object>
     221                <object type="text" size="22 0 52%-10 100%" text_align="left" textcolor="white">
     222                    <translatableAttribute id="caption">Show full games</translatableAttribute>
     223                </object>
     224                <object name="showFullFilter"
     225                    type="checkbox"
     226                    checked="false"
     227                    style="ModernTickBox"
     228                    size="0 0 20 20"
     229                    font="sans-bold-13">
     230                    <action on="Press">applyFilters();</action>
     231                </object>
     232            </object>
    229233
    230             <object name="chatPanel" size="0 49% 100% 100%" type="image" sprite="ModernDarkBoxGold">
    231                 <object name="chatText" size="0 0 100% 94%" type="text" style="ChatPanel" font="sans-13"/>
    232                 <object name="chatInput" size="0 94% 100% 100%" type="input" style="ModernInput" font="sans-13">
    233                     <action on="Press">submitChatInput();</action>
    234                     <action on="Tab">autoCompleteNick("chatInput", Engine.GetPlayerList());</action>
    235                 </object>
    236             </object>
    237         </object>
     234            <object name="chatPanel" size="0 49% 100% 100%" type="image" sprite="ModernDarkBoxGold">
     235                <object name="chatText" size="0 0 100% 94%" type="text" style="ChatPanel" font="sans-13"/>
     236                <object name="chatInput" size="0 94% 100% 100%" type="input" style="ModernInput" font="sans-13">
     237                    <action on="Press">submitChatInput();</action>
     238                    <action on="Tab">autoCompleteNick("chatInput", Engine.GetPlayerList());</action>
     239                </object>
     240            </object>
     241        </object>
    238242
    239         <!-- START Window for leaderboard stats -->
    240         <!-- Add a translucent black background to fade out the menu page -->
    241         <object hidden="true" name="fade" type="image" z="100" sprite="ModernFade"/>
    242         <object hidden="true" name="leaderboard" type="image" style="ModernDialog" size="50%-224 50%-160 50%+224 50%+160" z="101">
    243             <object style="ModernLabelText" type="text" size="50%-128 -18 50%+128 14">
    244                 <translatableAttribute id="caption">Leaderboard</translatableAttribute>
    245             </object>
    246             <object name="leaderboardBox"
    247                 style="ModernList"
    248                 type="olist"
    249                 size="19 19 100%-19 100%-62">
    250                 <def id="rank" color="255 255 255" width="15%">
    251                     <translatableAttribute id="heading">Rank</translatableAttribute>
    252                 </def>
    253                 <def id="name" color="255 255 255" width="55%">
    254                     <translatableAttribute id="heading">Name</translatableAttribute>
    255                 </def>
    256                 <def id="rating" color="255 255 255" width="30%">
    257                     <translatableAttribute id="heading">Rating</translatableAttribute>
    258                 </def>
    259                 <action on="SelectionChange">
    260                     displayProfile("leaderboard");
    261                 </action>
    262             </object>
    263             <object type="button" style="ModernButtonRed" size="50%-133 100%-45 50%-5 100%-17">
    264                 <translatableAttribute id="caption">Back</translatableAttribute>
    265                 <action on="Press">
    266                     Engine.GetGUIObjectByName("leaderboard").hidden = true;
    267                     Engine.GetGUIObjectByName("fade").hidden = true;
    268                     displayProfile("lobbylist");
    269                 </action>
    270             </object>
    271             <object type="button" style="ModernButtonRed" size="50%+5 100%-45 50%+133 100%-17">
    272                 <translatableAttribute id="caption">Update</translatableAttribute>
    273                 <action on="Press">Engine.SendGetBoardList();</action>
    274             </object>
    275         </object>
    276         <!-- END Window for leaderboard stats -->
    277         <object hidden="true" name="profileFetch" type="image" style="ModernDialog" size="50%-224 50%-160 50%+224 50%+160" z="102">
    278             <object style="ModernLabelText" type="text" size="50%-128 -18 50%+128 14">
    279                 <translatableAttribute id="caption">User Profile Lookup</translatableAttribute>
    280             </object>
    281             <object type="text" size="15 25 40% 50" text_align="right" textcolor="white">
    282                     <translatableAttribute id="caption">Enter username:</translatableAttribute>
    283             </object>
    284             <object name="fetchInput" size="40%+10 25 100%-25 50" type="input" style="ModernInput" font="sans-13">
    285                 <action on="Press">displayProfile("fetch");</action>
    286             </object>
    287             <object type="button" style="ModernButtonRed" size="50%-64 60 50%+64 85">
    288                 <translatableAttribute id="caption">View Profile</translatableAttribute>
    289                 <action on="Press">displayProfile("fetch");</action>
    290             </object>
    291             <object name="profileWindowPanel" size="25 95 100%-25 100%-60">
    292             <object name="profileWindowBox" type="image" sprite="ModernDarkBoxGold" size="0 0 100% 100%">
    293                 <object name="profileWindowArea" size="0 0 100% 100%" hidden="false">
    294                     <object name="profileUsernameText" size="0 0 100% 25" type="text" style="ModernLabelText" text_align="center" font="sans-bold-16" />
    295                     <object size="0 30 40%+40 50" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    296                         <translatableAttribute id="caption">Current Rank:</translatableAttribute>
    297                     </object>
    298                     <object name="profileRankText" size="40%+45 30 100% 50" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    299                     <object size="0 50 40%+40 70" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    300                         <translatableAttribute id="caption">Highest Rating:</translatableAttribute>
    301                     </object>
    302                     <object name="profileHighestRatingText" size="40%+45 50 100% 70" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    303                     <object size="0 70 40%+40 90" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    304                         <translatableAttribute id="caption">Total Games:</translatableAttribute>
    305                     </object>
    306                     <object name="profileTotalGamesText" size="40%+45 70 100% 90" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    307                     <object size="0 90 40%+40 110" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    308                         <translatableAttribute id="caption">Wins:</translatableAttribute>
    309                     </object>
    310                     <object name="profileWinsText" size="40%+45 90 100% 110" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    311                     <object size="0 110 40%+40 130" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    312                         <translatableAttribute id="caption">Losses:</translatableAttribute>
    313                     </object>
    314                     <object name="profileLossesText" size="40%+45 110 100% 130" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    315                     <object size="0 130 40%+40 150" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
    316                         <translatableAttribute id="caption">Win Rate:</translatableAttribute>
    317                     </object>
    318                     <object name="profileRatioText" size="40%+45 130 100% 150" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
    319                 </object>
    320                 <object name="profileErrorText" size="25% 25% 75% 75%" type="text" style="ModernLabelText" text_align="center" font="sans-bold-stroke-13" hidden="true">
    321                     <translatableAttribute id="caption">Player not found.</translatableAttribute>
    322                 </object>
    323             </object>           
    324             </object>
    325             <object type="button" style="ModernButtonRed" size="50%-64 100%-50 50%+64 100%-25">
    326                 <translatableAttribute id="caption">Back</translatableAttribute>
    327                 <action on="Press">
    328                     Engine.GetGUIObjectByName("profileFetch").hidden = true;
    329                     Engine.GetGUIObjectByName("fade").hidden = true;
    330                 </action>
    331             </object>
    332         </object>
    333     </object>
     243        <!-- START Window for leaderboard stats -->
     244        <!-- Add a translucent black background to fade out the menu page -->
     245        <object hidden="true" name="fade" type="image" z="100" sprite="ModernFade"/>
     246        <object hidden="true" name="leaderboard" type="image" style="ModernDialog" size="50%-224 50%-160 50%+224 50%+160" z="101">
     247            <object style="ModernLabelText" type="text" size="50%-128 -18 50%+128 14">
     248                <translatableAttribute id="caption">Leaderboard</translatableAttribute>
     249            </object>
     250            <object name="leaderboardBox"
     251                style="ModernList"
     252                type="olist"
     253                size="19 19 100%-19 100%-62">
     254                <def id="rank" color="255 255 255" width="15%">
     255                    <translatableAttribute id="heading">Rank</translatableAttribute>
     256                </def>
     257                <def id="name" color="255 255 255" width="55%">
     258                    <translatableAttribute id="heading">Name</translatableAttribute>
     259                </def>
     260                <def id="rating" color="255 255 255" width="30%">
     261                    <translatableAttribute id="heading">Rating</translatableAttribute>
     262                </def>
     263                <action on="SelectionChange">
     264                    displayProfile("leaderboard");
     265                </action>
     266            </object>
     267            <object type="button" style="ModernButtonRed" size="50%-133 100%-45 50%-5 100%-17">
     268                <translatableAttribute id="caption">Back</translatableAttribute>
     269                <action on="Press">
     270                    Engine.GetGUIObjectByName("leaderboard").hidden = true;
     271                    Engine.GetGUIObjectByName("fade").hidden = true;
     272                    displayProfile("lobbylist");
     273                </action>
     274            </object>
     275            <object type="button" style="ModernButtonRed" size="50%+5 100%-45 50%+133 100%-17">
     276                <translatableAttribute id="caption">Update</translatableAttribute>
     277                <action on="Press">Engine.SendGetBoardList();</action>
     278            </object>
     279        </object>
     280        <!-- END Window for leaderboard stats -->
     281        <object hidden="true" name="profileFetch" type="image" style="ModernDialog" size="50%-224 50%-160 50%+224 50%+160" z="102">
     282            <object style="ModernLabelText" type="text" size="50%-128 -18 50%+128 14">
     283                <translatableAttribute id="caption">User Profile Lookup</translatableAttribute>
     284            </object>
     285            <object type="text" size="15 25 40% 50" text_align="right" textcolor="white">
     286                    <translatableAttribute id="caption">Enter username:</translatableAttribute>
     287            </object>
     288            <object name="fetchInput" size="40%+10 25 100%-25 50" type="input" style="ModernInput" font="sans-13">
     289                <action on="Press">displayProfile("fetch");</action>
     290            </object>
     291            <object type="button" style="ModernButtonRed" size="50%-64 60 50%+64 85">
     292                <translatableAttribute id="caption">View Profile</translatableAttribute>
     293                <action on="Press">displayProfile("fetch");</action>
     294            </object>
     295            <object name="profileWindowPanel" size="25 95 100%-25 100%-60">
     296            <object name="profileWindowBox" type="image" sprite="ModernDarkBoxGold" size="0 0 100% 100%">
     297                <object name="profileWindowArea" size="0 0 100% 100%" hidden="false">
     298                    <object name="profileUsernameText" size="0 0 100% 25" type="text" style="ModernLabelText" text_align="center" font="sans-bold-16" />
     299                    <object size="0 30 40%+40 50" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     300                        <translatableAttribute id="caption">Current Rank:</translatableAttribute>
     301                    </object>
     302                    <object name="profileRankText" size="40%+45 30 100% 50" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     303                    <object size="0 50 40%+40 70" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     304                        <translatableAttribute id="caption">Highest Rating:</translatableAttribute>
     305                    </object>
     306                    <object name="profileHighestRatingText" size="40%+45 50 100% 70" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     307                    <object size="0 70 40%+40 90" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     308                        <translatableAttribute id="caption">Total Games:</translatableAttribute>
     309                    </object>
     310                    <object name="profileTotalGamesText" size="40%+45 70 100% 90" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     311                    <object size="0 90 40%+40 110" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     312                        <translatableAttribute id="caption">Wins:</translatableAttribute>
     313                    </object>
     314                    <object name="profileWinsText" size="40%+45 90 100% 110" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     315                    <object size="0 110 40%+40 130" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     316                        <translatableAttribute id="caption">Losses:</translatableAttribute>
     317                    </object>
     318                    <object name="profileLossesText" size="40%+45 110 100% 130" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     319                    <object size="0 130 40%+40 150" type="text" style="ModernLabelText" text_align="right" font="sans-bold-stroke-13">
     320                        <translatableAttribute id="caption">Win Rate:</translatableAttribute>
     321                    </object>
     322                    <object name="profileRatioText" size="40%+45 130 100% 150" type="text" style="ModernLabelText" text_align="left" font="sans-bold-stroke-12" />
     323                </object>
     324                <object name="profileErrorText" size="25% 25% 75% 75%" type="text" style="ModernLabelText" text_align="center" font="sans-bold-stroke-13" hidden="true">
     325                    <translatableAttribute id="caption">Player not found.</translatableAttribute>
     326                </object>
     327            </object>           
     328            </object>
     329            <object type="button" style="ModernButtonRed" size="50%-64 100%-50 50%+64 100%-25">
     330                <translatableAttribute id="caption">Back</translatableAttribute>
     331                <action on="Press">
     332                    Engine.GetGUIObjectByName("profileFetch").hidden = true;
     333                    Engine.GetGUIObjectByName("fade").hidden = true;
     334                </action>
     335            </object>
     336        </object>
     337    </object>
    334338</objects>
  • source/gui/COList.cpp

     
    1919#include "i18n/L10n.h"
    2020
    2121#include "ps/CLogger.h"
     22#include "soundmanager/ISoundManager.h"
    2223
    23 COList::COList() : CList(),m_HeadingHeight(30.f)
     24COList::COList() : CList(),m_HeadingHeight(30.f),m_SelectedDef(-1),m_SelectedColumnOrder(1)
    2425{
    2526    AddSetting(GUIST_CGUISpriteInstance,    "sprite_heading");
     27    AddSetting(GUIST_bool,                  "sortable"); // The actual sorting is done in JS for more versatility
     28    AddSetting(GUIST_CStr,                  "selected_column");
     29    AddSetting(GUIST_int,                   "selected_column_order");
     30    AddSetting(GUIST_CStr,                  "default_column");
     31    AddSetting(GUIST_int,                   "selected_def");
     32    AddSetting(GUIST_CGUISpriteInstance,    "sprite_asc");  // Show the order of sorting
     33    AddSetting(GUIST_CGUISpriteInstance,    "sprite_desc");
     34
     35    // Nothing is selected by default.
     36    GUI<CStr>::SetSetting(this, "selected_column", "");
     37    GUI<int>::SetSetting(this, "selected_column_order", 1);
     38    GUI<int>::SetSetting(this, "selected_def", -1);
    2639}
    2740
    2841void COList::SetupText()
     
    6679    float buffer_zone=0.f;
    6780    GUI<float>::GetSetting(this, "buffer_zone", buffer_zone);
    6881
     82    CStr defaultColumn;
     83    GUI<CStr>::GetSetting(this, "default_column", defaultColumn);
     84    defaultColumn = "list_" + defaultColumn;
    6985
    7086    for (unsigned int c=0; c<m_ObjectsDefs.size(); ++c)
    7187    {
     
    7490        gui_string.SetValue(m_ObjectsDefs[c].m_Heading);
    7591        *text = GetGUI()->GenerateText(gui_string, font, width, buffer_zone, this);
    7692        AddText(text);
     93
     94        if (m_SelectedDef == -1 && defaultColumn == m_ObjectsDefs[c].m_Id)
     95            m_SelectedDef = c;
    7796    }
    7897
    7998
     
    119138void COList::HandleMessage(SGUIMessage &Message)
    120139{
    121140    CList::HandleMessage(Message);
     141
     142    switch (Message.type)
     143    {
     144    // If somebody clicks on the column heading
     145    case GUIM_MOUSE_PRESS_LEFT:
     146    {
     147        bool sortable;
     148        GUI<bool>::GetSetting(this, "sortable", sortable);
     149        if (!sortable)
     150            return;
     151
     152        CPos mouse = GetMousePos();
     153        if (!m_CachedActualSize.PointInside(mouse))
     154            return;
     155       
     156        float xpos = 0;
     157        for (unsigned int def = 0; def < m_ObjectsDefs.size(); ++def)
     158        {
     159            float width = m_ObjectsDefs[def].m_Width;
     160            // Check if it's a decimal value, and if so, assume relative positioning.
     161            if (m_ObjectsDefs[def].m_Width < 1 && m_ObjectsDefs[def].m_Width > 0)
     162                width *= m_TotalAvalibleColumnWidth;
     163            CPos leftTopCorner = m_CachedActualSize.TopLeft() + CPos(xpos, 4);
     164            if (mouse.x >= leftTopCorner.x &&
     165                mouse.x < leftTopCorner.x + width &&
     166                mouse.y < leftTopCorner.y + m_HeadingHeight)
     167            {
     168                if (static_cast<int> (def) != m_SelectedDef)
     169                {
     170                    m_SelectedColumnOrder = 1;
     171                    m_SelectedDef = def;
     172                }
     173                else
     174                    m_SelectedColumnOrder = -m_SelectedColumnOrder;
     175                GUI<CStr>::SetSetting(this, "selected_column", m_ObjectsDefs[def].m_Id.substr(5));
     176                GUI<int>::SetSetting(this, "selected_column_order", m_SelectedColumnOrder);
     177                GUI<int>::SetSetting(this, "selected_def", def);
     178                ScriptEvent("selectioncolumnchange");
     179
     180                CStrW soundPath;
     181                if (g_SoundManager && GUI<CStrW>::GetSetting(this, "sound_selected", soundPath) == PSRETURN_OK && !soundPath.empty())
     182                    g_SoundManager->PlayAsUI(soundPath.c_str(), false);
     183
     184                return;
     185            }
     186            xpos += width;
     187        }
     188        return;
     189    }
     190    default:
     191        return;
     192    }
    122193}
    123194
    124195bool COList::HandleAdditionalChildren(const XMBElement& child, CXeromyces* pFile)
     
    307378        CRect rect_head(m_CachedActualSize.left, m_CachedActualSize.top, m_CachedActualSize.right,
    308379                                        m_CachedActualSize.top + m_HeadingHeight);
    309380        GetGUI()->DrawSprite(*sprite_heading, cell_id, bz, rect_head);
     381       
     382        CGUISpriteInstance *sprite_order;
     383        if (m_SelectedColumnOrder != -1)
     384            GUI<CGUISpriteInstance>::GetSettingPointer(this, "sprite_asc", sprite_order);
     385        else
     386            GUI<CGUISpriteInstance>::GetSettingPointer(this, "sprite_desc", sprite_order);
    310387
    311388        float xpos = 0;
    312389        for (unsigned int def=0; def< m_ObjectsDefs.size(); ++def)
    313390        {
    314             DrawText(def, color, m_CachedActualSize.TopLeft() + CPos(xpos, 4), bz+0.1f, rect_head);
    315391            // Check if it's a decimal value, and if so, assume relative positioning.
     392            float width = m_ObjectsDefs[def].m_Width;
    316393            if (m_ObjectsDefs[def].m_Width < 1 && m_ObjectsDefs[def].m_Width > 0)
    317                 xpos += m_ObjectsDefs[def].m_Width * m_TotalAvalibleColumnWidth;
    318             else
    319                 xpos += m_ObjectsDefs[def].m_Width;
     394                width *= m_TotalAvalibleColumnWidth;
     395
     396            CPos leftTopCorner = m_CachedActualSize.TopLeft() + CPos(xpos, 0);
     397            // If the list sorted by current column
     398            if (m_SelectedDef == static_cast<int> (def))
     399                GetGUI()->DrawSprite(*sprite_order, cell_id, bz + 0.1f, CRect(leftTopCorner + CPos(width - 16, 0), leftTopCorner + CPos(width, 16)));
     400
     401            DrawText(def, color, leftTopCorner + CPos(0, 4), bz + 0.1f, rect_head);
     402            xpos += width;
    320403        }
    321404
    322405        for (int i=0; i<(int)pList->m_Items.size(); ++i)
  • source/gui/COList.h

     
    1 /* Copyright (C) 2014 Wildfire Games.
     1/* Copyright (C) 2015 Wildfire Games.
    22 * This file is part of 0 A.D.
    33 *
    44 * 0 A.D. is free software: you can redistribute it and/or modify
     
    7070    virtual CRect GetListRect() const;
    7171
    7272    std::vector<ObjectDef> m_ObjectsDefs;
     73    int m_SelectedDef;
     74    int m_SelectedColumnOrder;
    7375
    7476private:
    7577    float m_HeadingHeight;