Commit Graph

3416 Commits

Author SHA1 Message Date
Guangcong Luo
535ec50b1a Merge pull request #583 from urkerab/spread-move-effectiveness
Properly display effectiveness of spread moves
2015-12-20 21:55:09 +00:00
Guangcong Luo
ee72a96c1a Merge pull request #582 from Teremiare/Teremiare-patch-1
Change the tournament autostart off message
2015-12-20 21:47:27 +00:00
Teremiare
c27eb3abe3 Change "timeout" in the tournament messages 2015-12-20 12:45:00 +01:00
Guangcong Luo
d980ea78e6 Fix various style issues 2015-12-20 04:41:20 -05:00
Guangcong Luo
94f62e4ee4 Fix popups disappearing when resizing windows
This fixes issue #581
2015-12-20 04:28:15 -05:00
Guangcong Luo
11e3863aa7 Improve utilichart/search code
The utilichart-relevant code has been overhauled for simplicity.

Utilichart results and headers are now both 33 pixels tall, total.

Headers are slightly larger, to make them fill the space better. The
larger font size makes them more header-like, anyway.

Results are two pixels taller than before, giving them enough room for
gen 6 pokemon icons (not enabled in this commit), and in general
aiding performance slightly (fewer result rows on the screen at a
time).

Making them both 33 pixels allows height to be computed precisely
as 33*rows, which is relevant for result rows to be inserted into
the DOM on-demand.

On-demand DOM insertion has previously been implemented in pokedex.js,
but the new on-demand DOM code in search.js works slightly differently.
It makes stronger assumptions (that the only bottleneck is DOM
insertion speed, and that ctrl+f without scrolling to the bottom
doesn't need to be supported, and that result rows and result
headers are always 33 pixels tall), which makes for much simpler
code, and is presumably slightly faster because of this.

The new on-demand DOM code is surfaced by an "All results" button
in the pokedex (pokemonshowdown.com/dex/), for basic testing, but
the long-term plan is for it to be used in the teambuilder for
pokemon/etc selection, to massively increase performance.

Nearly two years after I wrote search.js to be a better utilichart
API than utilichart.js, we'll soon finally start using it in place of
utilichart.js in the main sim teambuilder!
2015-12-20 04:28:15 -05:00
Guangcong Luo
dd08a6fd43 Minor improvement to teambuilder greeting
Rock-paper-scissors scores now cycle, so you'll see every possible
score before they repeat.
2015-12-20 04:27:10 -05:00
Guangcong Luo
fd092edff9 Tools.getPokemonIcon
This introduces a new function to get an icon from an icon sheet
for gen 6 icons. The old gen 5 style icons are still available
in Tools.getIcon, allowing us to slowly convert icon styles over
at our leisure, without needing to convert everything at once.

This commit only introduces the function; it's not used anywhere
yet.
2015-12-20 04:27:10 -05:00
urkerab
581f10a404 Properly display effectiveness of spread moves 2015-12-20 00:44:32 +00:00
Guangcong Luo
4c35825c3e Merge pull request #580 from urkerab/padding-border-width-hover
Avoid changing border width or padding on hover
2015-12-19 21:27:19 +00:00
urkerab
30e0324f7c Don't reset the whole border on hover 2015-12-19 19:12:53 +00:00
urkerab
b6597621e7 Avoid changing border width or padding on hover 2015-12-18 10:46:50 +00:00
Guangcong Luo
4b21e3f125 Add a playable R-P-S game to Teambuilder greeting 2015-12-17 06:40:55 -05:00
Guangcong Luo
31d805f894 Minor style tweaks
- Separator line in teambuilder was appearing inconsistently
- We now give a default size for button, button big, and button small
2015-12-17 06:40:55 -05:00
Guangcong Luo
3fc38bb2c9 Support dragging teams from desktop to folder 2015-12-17 06:40:55 -05:00
Guangcong Luo
920e224fc3 Add Hide button to + room
The Hide button now hides the side panel until the next time you
open a room. The main use case is just so you can see more of your
(presumably lovely) main menu background, without having to leave
all the rooms you're in.
2015-12-17 06:40:55 -05:00
Guangcong Luo
dc7210c1c5 Remove the X-Frame-Options header
It didn't seem to be helping with the problems the user with weird
header rewriting had, so it didn't serve its intended purpose.
Removing the header saves a negligible amount of bandwidth and
more importantly suppresses an error message in Chrome which
doesn't support it.
2015-12-17 06:40:55 -05:00
Guangcong Luo
42ddd81c68 Teambuilder folder feature
In addition to format folders, we now support regular folders that
behave as you'd expect. These folders even map to actual
directories in the downloadable client!

Folders are delimited by `/` in team names in all storage formats
(including export, and packed saving), and are stored in the
`.folder` field of team objects.

Because of this, `/` is no longer an acceptable character in team
names. This improves interoperability with teams and filesystems,
so we should probably have done this anyway.

I also added back a friendly message to the top of the teambuilder.
2015-12-17 06:40:55 -05:00
Guangcong Luo
486a272417 Fix detection of teambuilder formats
Challenge-only formats are now considered teambuilder formats - the
main exception being Custom Game formats.
2015-12-17 06:40:55 -05:00
Guangcong Luo
c9febae91e Fix some bugs in recent teambuilder changes
- 'uncategorized' was sometimes in the wrong place
- Firefox Windows button alignment
- crash when creating new format folder
- gen 2 and gen 3 were mixed up
2015-12-17 06:40:54 -05:00
Marty-D
2090efe2df Mark and animate item-obtaining Abilities 2015-12-16 11:58:17 -05:00
Guangcong Luo
367314c81a Fix HTTPS support in IE11
Apparently IE11 doesn't support location.origin. I assumed it had
wider support than it actually had.
2015-12-16 01:25:07 -05:00
Guangcong Luo
69cb27b596 Keep newly opened format folders visible
Normally, when navigating away from an empty format folder, it'll
disappear from the folder list. This keeps the folder visible if you
just opened it from a team selector or the 'New format folder'
button, so you can drag teams from other folders to that folder.
2015-12-16 01:23:39 -05:00
Guangcong Luo
c00e4088d7 Teambuilder: Support dragging teams onto folders
This was ridiculous, or, in other words, par for the course when
you're dealing with HTML5 drag-and-drop.

Folders are now clickable divs instead of buttons. This turned out
not to be necessary as it was a different issue that was causing
drag-and-drop to fail, but I'd already changed everything over when
I discovered the real bug. Oh well, some things are slightly nicer
this way.
2015-12-16 01:23:39 -05:00
Guangcong Luo
e1f3ac0001 Use the Format dropdown for teambuilder formats
You can now add formats to the teambuilder folderbar and select
teambuilder formats using the same Formats dropdown previously
used for challenges and searches.

It is no longer to move a team back to Uncategorized. A future
update will fix this.
2015-12-16 01:23:39 -05:00
Guangcong Luo
a8c3b54006 Tweak some button appearances 2015-12-16 01:23:39 -05:00
Guangcong Luo
e2ea9e5267 Tweak teambuilder appearance 2015-12-15 21:51:35 -05:00
Guangcong Luo
d2f7327c74 Choose default team using teambuilderFormat
Before, 'UU (suspect test)' was treated differently from 'UU' when
choosing the default team in the dropdown. It no longer is.
2015-12-15 20:20:20 -05:00
Guangcong Luo
04246a51fb Redesign teambuilder folders
This didn't come out looking nearly as perfect as I hoped, but
honestly it looks pretty good and I don't know how to make it
better.
2015-12-15 20:01:05 -05:00
Guangcong Luo
b5647d409a Improve team selector
The team selector now hides teams that aren't for the format, by
default. Other teams can still be selected with a 'more' button.

There's now a Teambuilder button to be taken straight to making
or editing teams for that format.
2015-12-15 18:37:01 -05:00
Guangcong Luo
1858de3c1b Default to no team if user has no team for format
Before, we used to default to the first team if the user had no team
explicitly for a format. Now, it defaults to no team.
2015-12-15 17:40:09 -05:00
Guangcong Luo
3a41c51c37 Basic teambuilder 'folders'
The folders are really just format filter views, but in theory, this
should be all people need.

This implementation is very basic but I'm pretty sure I've gotten all
the bugs out. On small screens, the folders simply don't appear, on
the assumption that this will only happen on mobile, where people
shouldn't be creating enough teams to need folders, anyway. (I'll
fully support mobile later.)

Third-party servers may need to re-style the Edit and Delete buttons,
since they're black on transparent, which may interact poorly with
certain edgy background styles.
2015-12-15 17:34:53 -05:00
Ivo Julca
0309413762 Fix crashing Resume button showing in rejoined battles 2015-12-15 09:40:35 -05:00
Guangcong Luo
3b87789736 Fix style error in replay-embed.js 2015-12-15 07:39:04 -05:00
Guangcong Luo
1cbd514343 Set X-Frame-Options header for crossprotocol.html
There apparently exist very bad security software that MitMs HTTPS
connections to set X-Frame-Options when I didn't want that at all
and actually crossprotocol.html is intended for embedding in an
iframe.

Hopefully this header will allow aforementioned software to take
the hint.
2015-12-15 05:49:44 -05:00
Guangcong Luo
d9faf3e7e6 Update crossdomain.php to support main server
This is a job currently done by crossprotocol.html, but this is in
case we add an update for which a static file isn't enough.
2015-12-15 05:49:44 -05:00
Guangcong Luo
cecc1b641e Center custom backgrounds
Default backgrounds are still left-aligned, mainly for Horizon and
Waterfall which are designed for their left side to be visible, but
custom backgrounds are now centered on the assumption that that's
what most users want.
2015-12-15 05:49:44 -05:00
Guangcong Luo
525f422d11 Fix sound settings not appearing in replays
Sound Manager really doesn't make it easy to do something when it
loads, so this is a kind-of-complicated workaround.
2015-12-15 05:49:44 -05:00
Marty-D
c401d8303a Fix Struggle's display with -ate Abilities 2015-12-14 10:23:10 -05:00
Guangcong Luo
59f0eb7395 Merge pull request #578 from bumbadadabum/images
Run optipng on fx/
2015-12-14 08:44:44 +00:00
Bär Halberkamp
6612e7037f Run optipng on fx/ 2015-12-14 07:20:04 +01:00
Guangcong Luo
10fe888d59 Merge pull request #577 from bumbadadabum/images
Add a missing image for the gallows and run optipng
2015-12-14 06:07:03 +00:00
Bär Halberkamp
622866dbe3 Run optipng on crobat's sprites 2015-12-14 06:58:46 +01:00
Bär Halberkamp
be37e69dab Add the gallows for hangman 2015-12-14 06:46:32 +01:00
Guangcong Luo
b9c92bae92 Wrap localStorage calls in try blocks 2015-12-13 13:29:00 -05:00
Guangcong Luo
db416b7d52 Make the random background button bigger
(Some people didn't notice the previous one.)
2015-12-13 13:28:46 -05:00
Guangcong Luo
c33cfdfece Rewrite protocol-relative images to http: if necessary
This makes protocol-relative images in sanitized HTML work in
testclient, by manually setting the protocol to http:
2015-12-13 13:27:04 -05:00
Guangcong Luo
1bcc75e750 Use relative URIs in CSS where possible
This replaces the previous protocol-relative URIs, which should allow
testclient to work much better.
2015-12-13 13:25:41 -05:00
Guangcong Luo
ec05062525 Make sure disabled buttons stay light gray 2015-12-12 23:09:43 -05:00
Guangcong Luo
6924cf98d6 Make the main menu footer easier to see
It was kind of hard to make out on certain backgrounds.
2015-12-12 23:09:15 -05:00