1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-24 16:07:25 +08:00
Commit Graph

5820 Commits

Author SHA1 Message Date
FreezyLemon
6b0b518fd2 *ahem* REVERTED the changes to GetUserRequest because they're not needed (yet) 2017-12-07 16:58:16 +01:00
FreezyLemon
ce9b003e9a Reverted GetUserRequest because spectating is not implemented yet, and thus the additions are not needed (yet) 2017-12-07 16:52:43 +01:00
FreezyLemon
772bba27be Small style changes 2017-12-07 16:41:46 +01:00
FreezyLemon
2ceb073b5d Renamed OnClick to OnLinkClicked to (what should be) obvious reasons 2017-12-07 16:30:15 +01:00
FreezyLemon
d90eb2cdce Moved "Does this channel exist" check to ChatLine so that if a #name does not exist as a channel, it does not get added as a link (and does not contain a URL or anything else to prevent jankiness) 2017-12-07 16:26:28 +01:00
FreezyLemon
18eabd35f6 Set an empty list as default for AvailableChannels (mostly so that tests don't break, but also so that if no connection exists, the links don't break) 2017-12-07 16:25:30 +01:00
FreezyLemon
2129d6cede Renamed the "on click" method to OnClick() and moved most of the implementation to ChatLink.
Also fixed the tooltip text up
2017-12-07 16:23:43 +01:00
FreezyLemon
ca40db2b97 Fixed a bug where the hover wouldn't work correctly due to OsuLinkSpriteText assigning Action to a private property. 2017-12-07 13:57:29 +01:00
FreezyLemon
5ded6e877c Added some tooltip text handling.
Also fixed a bug caused by SameLinkSprites where "this" is actually supposed to be included by just adding a manual function call.
2017-12-07 13:49:44 +01:00
FreezyLemon
8ba66015f4 Implemented the new IHasHoverSounds interface in a private "ChatHoverContainer" class which is now used for ChatLink instances.
Also moved the overhead for finding all sprites in the same line that reference the same URL to the LoadComplete (used to be every hover, now only once).
2017-12-07 13:17:40 +01:00
FreezyLemon
a8599a1b75 Implemented new interface which allows parent containers to decide on whether a "OnHover" sound should be played. 2017-12-07 13:12:36 +01:00
FreezyLemon
f4f1291919 Removed "wiki:" prefix from wiki links (links are visible on tooltips so this is unnecessary now) 2017-12-07 11:23:31 +01:00
FreezyLemon
8a88040ef5 Added tooltip to links 2017-12-07 11:12:21 +01:00
FreezyLemon
bd11124e6d Removed unnecessary copy (pass-by-reference anyways) 2017-12-07 11:12:12 +01:00
FreezyLemon
1b971c01e6 Fixed a bug where links would be out of order in their List which would cause the game to crash 2017-12-07 10:31:44 +01:00
FreezyLemon
ec8b5c2465 Permitted nulls in ChatOverlay.load() so that in testing, no "OsuGame" instance is required. Also added null checks to the links' on click actions 2017-12-07 10:31:02 +01:00
FreezyLemon
541c25e995 Renamed ChatLinkSpriteText to ChatLink for convenience 2017-12-07 10:28:12 +01:00
FreezyLemon
7bf25bdd4d Changed it so the ":" character does not appear after usernames when the displayed message is an action (e.g. /np). Just makes more sense imo 2017-12-07 10:23:57 +01:00
FreezyLemon
94eb853d3d Added centralised handling for some chat links 2017-12-06 16:41:57 +01:00
FreezyLemon
b04ddba2a0 Added basic "on click" actions to the in-chat links 2017-12-06 10:27:30 +01:00
FreezyLemon
63a6a8b669 Fixed messages sent by yourself not being formatted 2017-12-04 19:31:48 +01:00
FreezyLemon
bb138ccaf7 Added licence header and removed unnecessary whitespace 2017-12-04 13:55:57 +01:00
FreezyLemon
9b866d2248 Made it so the link ID is always added before loading the SpriteTexts (fixed weird bug where some sprites would be white instead of blue). Also improved XML doc on TextColour 2017-12-04 13:46:07 +01:00
FreezyLemon
fd13bacf4a Made default link ID -1 (if no link is present) because linkId is currently being set to link.index which can be 0. 2017-12-04 13:34:16 +01:00
FreezyLemon
cf96323980 Added new OsuLinkSpriteText.TextColour property that sets the internal content (OsuHoverContainer)'s colour instead of the whole container, so that text colour is always changed through that (e.g. link colouring, link hover fade).
Implemented it to be used when adding text to an OsuLinkTextFlowContainer.
2017-12-04 13:33:42 +01:00
FreezyLemon
319f43e209 Added "getIdFromUrl" call back to content.action because performance impact is small and no unnecessary id calculations are done 2017-12-04 13:29:56 +01:00
FreezyLemon
bf97f8b1b1 Added osu.ppy.sh/ss (screenshot) URL handling and calculate ID at assignment so it's not on click anymore 2017-12-03 23:55:34 +01:00
FreezyLemon
a839d0e91d LoadComponent before assigning URL to ensure dependency loading 2017-12-03 23:55:00 +01:00
FreezyLemon
3f336b8e61 Made the style a bit better, fixed a bug or two 2017-12-03 21:02:05 +01:00
FreezyLemon
2d270a1cfe Added ability to open other channels from chat links. 2017-12-03 20:45:30 +01:00
FreezyLemon
c574cc4308 Removed unnecessary "using" statements 2017-12-03 11:16:34 +01:00
FreezyLemon
735dbddd17 Changed URL detection to be more reliable and generally work better 2017-12-03 06:52:57 +01:00
FreezyLemon
efe6245e53 Fixed a bug where Drawable.Width could potentially be set to NaN (0/0) by checking if last variable > 0. 2017-12-02 10:42:38 +01:00
FreezyLemon
6d9dcc6691 Added all files to the .csproj and also introduced basic action filtering when you set the URL on an OsuLinkSpriteText object 2017-12-02 09:48:55 +01:00
FreezyLemon
0aced85908 Changed the LinkID to the link's own Index instead of the previous one (just makes more sense imo) 2017-12-02 09:47:59 +01:00
FreezyLemon
d22a9df140 Added new request for getting the beatmapset from only a difficulty map ID 2017-12-02 09:47:20 +01:00
FreezyLemon
ade7311c15 Updated implementation to be based around a "LinkId" (atm the position of the link, anything unique to a link inside its message will be fine), which does not allow matching (OnHover related) between different links 2017-12-01 21:31:12 +01:00
FreezyLemon
7699a3bb38 Merge branch 'master' of https://github.com/ppy/osu into url-parsing-support 2017-12-01 21:07:31 +01:00
FreezyLemon
7f1f886406 implemented method formatting into chat. Also added all necessary files to the .csproj 2017-12-01 21:04:24 +01:00
FreezyLemon
78ff5d81d3 Fixed casting 2017-12-01 21:03:41 +01:00
FreezyLemon
152eb83c42 Added new class for chat lines, that colour the messages after formatting. URLs will become blue, and on hover (also defined here) be turned yellow-ish 2017-12-01 20:33:27 +01:00
FreezyLemon
86302716a6 Also moved LinkText to its own file so the chat could reuse it (ProfileHeader's private class ProfileLink also still inherits from this, though) 2017-12-01 20:32:08 +01:00
FreezyLemon
1f1c7dd70f Moved LinkFlowContainer out of ProfileHeader to make it available for other uses too (e.g. chat) and renamed it to LinkTextFlowContainer bc it can contain both links and text, not only one 2017-12-01 20:26:51 +01:00
FreezyLemon
f5f287bed5 Rolled back the idea that there should be a separate class for formatted messages 2017-12-01 20:25:02 +01:00
gtensha
de94082b1e Fix filename casing to compile on Linux 2017-12-01 18:10:39 +01:00
Dean Herbert
70b29b8b62
Merge branch 'master' into fix-set-hidden-crash 2017-12-01 23:35:48 +09:00
Dean Herbert
7532795935 Lock during validity checks 2017-12-01 22:43:49 +09:00
Dean Herbert
87b6181a19 Merge remote-tracking branch 'upstream/master' into fix-track-disposal 2017-12-01 22:36:20 +09:00
FreezyLemon
01bea3bada Re-implemented message formatting (mostly taken from osu-stable code) 2017-12-01 10:56:48 +01:00
smoogipoo
5be00cb0ec Add todo 2017-12-01 18:40:55 +09:00