Commit Graph

383 Commits

Author SHA1 Message Date
Guangcong Luo
e45256d98b Pixelate trainersprites/types on Retina screens 2018-12-16 16:16:07 -06:00
Guangcong Luo
3004f2f0b6 Add line breaks to spacers
Makes battle logs look nicer when copy/pasted as plaintext.
2018-11-23 01:40:15 -06:00
Guangcong Luo
6214e1c185 Make sure fake buttons don't wrap
The .button class now has display: inline-block, which should fix the
issue with <a> buttons wrapping.
2018-11-22 06:05:12 -05:00
Guangcong Luo
f75d85fdaf Reimplement "ignore nicknames" without CSS
Honestly, the CSS solution was really cool. It was just incompatible
with the new system. It also had enough other flaws (like, bad
accessibility) that I don't feel _too_ bad about ripping it out.

The new version is less code, anyway, although it does have the flaw of
needing to replay the battle if you turn nicknames on or off.
Fortunately, that should be a rare enough occurrence not to be a big
deal.
2018-11-15 18:52:53 -06:00
Guangcong Luo
6d80607312 Fix Play/Resume button location 2018-06-11 03:24:32 -07:00
Guangcong Luo
c590a0c370 Add new BattleScene animation engine
battle.js is probably PS's oldest code. It's received minor touch-ups:
a refactor to prototypes early on, and then a refactor to TypeScript
and classes recently, but otherwise it's had basically zero maintenance
until now.

That's probably why this refactor took me over a week.

The biggest change is that the animation engine strewn around
Pokemon, Side, and Battle has been broken out into a new class named
BattleScene.

Pokemon, Side, and Battle now only track state; all animation is now
done in BattleScene and PokemonSprite.

The fates of major classes:

battle.ts:Pokemon - animation has been moved, mostly to PokemonSprite
battle.ts:Side - animation has been moved, to PokemonSprite/BattleScene
battle.ts:Battle - animation has been moved, mostly to BattleScene

Major changes:

- Many many variables have been renamed to be much clearer about what
  they mean. For instance, `animationDelay` is now `timeOffset`, and
  `activityDelay` is now `minWait`. A few bugs relating to me mixing
  up these two variables have also been fixed. jQuery variables named
  like `fooElem` have been renamed like `$foo`.

- The unnecessarily complicated queue1/queue2/activeQueue system,
  previously used for telling the animation engine to stop after Pause
  was pressed, has been replaced with a simple `interruptionCount`
  counter.

- The entire scene can now be reconstructed from scratch, which means
  that the `fastForward` system no longer needs to touch the DOM
  outside of the battle log. "Prev turn" and "Skip to turn" should be
  faster in 1000-turn battles now.

- The animation engine now supports displaying weather and terrain
  simultaneously.

- During a replay, Team Preview is shown for a second (instead of
  immediately skipping to the battle).

- Various aspects of the animation engine should be much less brittle
  now.

- Many bugs were fixed (and new ones were introduced).
2018-06-07 02:22:36 -07:00
asgdf
420eb1db77 Fix styling of first teambuilder search result in dark mode (#1100) 2018-04-03 17:09:27 -05:00
urkerab
8994e9e704 Show userlist widget in battles (#1092) 2018-03-25 19:09:57 -05:00
HoeenHero
1ad75e9891 Make disabled select boxes readable in dark mode (#1078) 2018-01-31 18:01:53 -06:00
Guangcong Luo
32d6b14b63 Teambuilder: Adjust slider alignment 2017-12-25 01:16:14 -05:00
Guangcong Luo
5120e59f5e Drop jslider dependency
jslider was incredibly buggy, and most likely the cause of the problems
with the teambuilder on mobile, and required some pretty ridiculous
hacks, and leaked memory.

We're now using HTML5 sliders, like we are with the volume controls.

HTML5 sliders aren't supported by IE9, but they're supported by most
other browsers PS cares about. If not, well, they won't look too ugly
probably...
2017-12-21 05:05:22 -06:00
Guangcong Luo
0d17726529 Give summary elements clicky cursors 2017-12-17 03:52:11 -05:00
Jeremy Piemonte
ab1b16c1a8 Fix issues with horizontal scroll bar in Chrome (#1047)
Several users have been complaining that a horizontal scroll bar is getting in the way in chat rooms and PM boxes, this fixes that.
2017-11-21 05:08:38 -06:00
Guangcong Luo
5d363f4c44 Lighten cyan/blue usernames slightly 2017-10-21 14:51:12 -04:00
Guangcong Luo
c624235456 Add tabbar CSS to replay.css
They're used in replay searches now.
2017-10-21 13:10:58 -04:00
Guangcong Luo
be0ca58192 Remove Credits popup
The Teambuilder Credits link is now just a link to
http://pokemonshowdown.com/credits
2017-10-21 13:10:44 -04:00
Guangcong Luo
c29566cab0 Dark mode: Improve select/team button styling
Fixes #1030
2017-10-15 20:23:37 -04:00
Guangcong Luo
f2f723e40c Dark mode: Improve teambuilder results styling 2017-10-15 19:54:25 -04:00
Guangcong Luo
8c48261640 Make self-highlight slightly more visible 2017-10-15 19:54:08 -04:00
Wally
c2ad1ad8d3 Dark mode: Improve some more teambuilder colors (#1032) 2017-10-15 18:31:03 -05:00
Wally
28a9c88d41 Dark mode: Fix Notifications' color (#1026) 2017-10-15 17:38:08 -05:00
Wally
7d3f8196aa Dark mode: Fix Teambuilder hover results (#1027) 2017-10-15 06:53:33 -05:00
Wally
7ac2975808 CSS – update teambuilder folderlist in darkmode (#953) 2017-10-14 21:08:16 -05:00
Guangcong Luo
5737b81996 Redesign pokemon sidebar
Now Pokemon are only faded out if they haven't necessarily been brought
into the battle.
2017-08-02 20:44:47 -04:00
Insist
f89fe34b68 Client CSS: Beautify (#967) 2017-07-08 02:05:24 +09:00
Guangcong Luo
2eade6fdf5 Change <select> menu font to match PS
<select> menus are now Verdana like the rest of PS.

(Their font was previously controlled by the operating system)
2017-06-29 10:14:57 -04:00
Guangcong Luo
27ebc01d11 Use HTML5 range inputs for Volume sliders
Previously, both Volume sliders and EV sliders use an outdated jQuery
slider library with no mobile support or accessibility.

Volume sliders are now HTML5, which means better accessibility and
mobile support.

We unfortunately can't move EV sliders to HTML5 because they do some
magic to constrain them to 510 total EVs, but EV sliders are
fortunately still accessible because they come with a textbox as an
alternate input.

Fixes the slider part of #954
2017-06-28 09:42:47 +08:00
HoeenHero
f0c97f083f Update Font Awesome to 4.7.0 (#955) 2017-06-27 17:25:39 -07:00
Guangcong Luo
08ca2d13f7 Fix Reflect/etc text in dark mode
Fixes #952
2017-06-24 03:04:19 -04:00
Slayer95
346bf935db Refactor custom icons to a single element <psicon> and use Caja (#945)
Since real custom elements still have very limited availability, this is the most proper way to do it, and results in a more predictable HTML parsing.
Adds support for custom styles and classes.

Example: <psicon pokemon="meloetta" class="pixelated" style="opacity:0.4" />
2017-06-17 14:38:52 -07:00
Quinton Lee
5c5c57870e Tournaments: add validate button (#936) 2017-06-15 11:52:17 -05:00
Guangcong Luo
eac71a2640 Implement terrain backgrounds 2017-06-11 11:19:25 -04:00
Guangcong Luo
d22c2b4368 Refactor chat CSS 2017-05-15 05:55:08 -04:00
asgdf
3589926ca8 Fix dark mode style regressions (#902)
1. subtly notifying roomtab title turned white on mouseover
2. bold text in colored broadcast boxes turned blue in the battle chat
2017-04-25 00:57:10 -07:00
urkerab
3c0864380a Modchat messages are not battle messages (#899) 2017-04-14 14:55:46 -04:00
Guangcong Luo
7aa2412055 Add new pixelated CSS class 2017-03-09 13:54:20 -05:00
asgdf
77dcb5e5b0 Fix some dark mode visibility issues (#879) 2017-03-05 12:45:08 -05:00
Guangcong Luo
18885cb662 Dark mode: Change highlight color
The highlight color is now blue to match notifying tab colors. People
were complaining about the previous highlight color, so this should be
better.

Notifying PMs are still orange, though. I haven't been able to find a
nicer-looking blue for it.

Honestly, though, if night mode is supposed to help you sleep, you want
more orange and less blue... Maybe one day we'll be able to find a color
combination that actually looks good.
2017-03-01 01:53:20 -05:00
asgdf
b5530a6405 Fix small dark mode label color inconsistency (#852) 2017-01-21 00:32:56 -05:00
HoeenHero
c0287724a2 Make it easier to read selected teambuilder options (#850) 2017-01-10 11:44:41 -08:00
urkerab
f3a03151c7 Improve the appearance of disabled buttons in dark mode (#843) 2017-01-08 12:37:24 -08:00
Guangcong Luo
f65669168f Remove superfluous "pokemonicon" class
This commit consolidates all Pokemon icons in 'picon'.

Perhaps now we'll be able to rename picon -> pokemonicon now that the
old name is no longer used... but I guess that can be reserved for a
future commit.
2016-12-14 19:57:22 -05:00
asgdf
a2d09e8ac3 Teambuilder: Show typing in set details (#824) 2016-12-12 13:22:35 -08:00
asgdf
4f3656d386 Dark mode: Prettify notifying roomtab on hover (#825) 2016-11-29 16:38:22 -06:00
Marty-D
213beb4845 Add Aurora Veil messages and animation 2016-11-19 19:09:05 -05:00
Guangcong Luo
bea318dff2 Improve new timer appearance 2016-11-13 23:09:16 -05:00
Guangcong Luo
90b55aaa33 Update search code for Dex improvements
- introduce overrideType, overrideMoveType teambuilder tables
- support displaying search filters outside of results
2016-11-13 23:09:16 -05:00
Guangcong Luo
36b6e9b88a Redesign battle UI
The timer was always kind of ugly and text-based, which is awkward on
non-wide screens, where you couldn't see it at all without switching
into the battle log.

The new version gives the timer a home at the upper right of the battle
choice screen (where the active Pokémon's HP used to be) (the active
Pokémon's HP has been moved next to "What will [pokemon] do?").

The spectator UI has also been updated, and now supports jumping to the
beginning/end of the battle, as well as forward/backward 1 turn,
regardless of whether the battle has ended.

In addition, a lot of other button layouts/appearances have been
improved.
2016-11-08 07:17:15 -08:00
Shashwat Chandra
dbd8cdbda6 Add coloration to modified stats (#794) 2016-11-07 23:39:57 -08:00
panpawn
834327825b Fix indentation in style/client.css (#792) 2016-11-04 17:35:09 +00:00