Skip to content

Commit

Permalink
[TASK] Add switching nick/login ability of the map by clicking it. Up…
Browse files Browse the repository at this point in the history
…date changelog.
  • Loading branch information
tomvlk committed Jun 5, 2017
1 parent df642af commit 9efcf75
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@ Core
* Bugfix: Ignore key interrupt exception trace when stopping PyPlanet while it has got a reboot in the mean time.
* Bugfix: Hide the ALT menu in shootmania, just as it should do since before 0.4.0.
* Bugfix: Fixing issue with checking for updates could result in a exception trace in the console for some installations with older setuptools.
* Bugfix: Fixing an issue that results in fetching data for widget several times while it's not needed (thinking it's per player data when it isn't). (Thanks to Chris92)


Apps
~~~~

* Improvement: Make it able to drive dedimania records on short maps made by Nadeo.
* Improvement: Make the improvement time blue like Nadeo also does in the sector times widget.
* Improvement: Always show nickname of the map author and make it switchable by clicking on it.
* Bugfix: Don't set the time of the spectator as your best time in the sector times widget.
* Bugfix: Problems that could lead to dedimania not being init currently on the map if the map was replayed.
* Bugfix: Hide dedimania if map is not supported.
* Bugfix: Fix the offset issue for the live rankings widget (in TA mode).
* Bugfix: Fix the incorrect number of spec/player count on the top left info widget.


0.4.0
Expand Down
17 changes: 17 additions & 0 deletions pyplanet/apps/contrib/info/templates/mapinfo.Script.Txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,24 @@
declare CMlLabel Author_Label <=> (Page.GetFirstChild("author_label") as CMlLabel);
declare CMlQuad Author_Flag <=> (Page.GetFirstChild("author_flag") as CMlQuad);

declare Boolean Show_Login = False;

if (Map != Null) {
Author_Label.SetText(Map.AuthorNickName);
Author_Flag.ChangeImageUrl(Map.AuthorZoneIconUrl);
}

while(True) {
foreach (Event in PendingEvents) {
if (Event.ControlId == "author_label" && Event.Type == CMlScriptEvent::Type::MouseClick && Map != Null) {
if (Show_Login) {
Show_Login = False;
Author_Label.SetText(Map.AuthorNickName);
} else {
Show_Login = True;
Author_Label.SetText(Map.AuthorLogin);
}
}
}
yield;
}
10 changes: 5 additions & 5 deletions pyplanet/apps/contrib/info/templates/mapinfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
{% block content %}
<quad pos="0 0" z-index="0" size="35 6" bgcolor="00000060"/>
<quad pos="0 0" z-index="0" size="6.5 6" bgcolor="00000060"/>
<quad pos="0.5 -0.25" z-index="1" size="5.5 5" image="file://Media/Manialinks/Common/LogoManiaPlanet.png" url="urltomx"/>
<label pos="21.5 -3.25" z-index="1" size="28 6" text="{{ map_name }}" textsize="1.6" valign="center2" halign="center" textfont="RajdhaniMono" textemboss="1"/>
<quad pos="0.5 -0.25" z-index="1" size="5.5 5" image="file://Media/Manialinks/Common/LogoManiaPlanet.png" url="."/>
<label pos="20.5 -3.25" z-index="1" size="28.5 6" text="{{ map_name }}" textsize="1.6" valign="center2" halign="center" textfont="RajdhaniMono" textemboss="1"/>

<quad pos="0 -6.5" z-index="0" size="35 6" bgcolor="00000060"/>
<quad pos="0 -6.5" z-index="0" size="6.5 6" bgcolor="00000060"/>
<quad pos="0.9 -7.35" z-index="1" size="4.80 4.25" image="file://Media/Flags/samerica.dds" id="author_flag" /> <!-- TODO: Use flag of author -->
<label pos="21.5 -9.5" z-index="1" size="28 6"
<label pos="20.5 -9.5" z-index="1" size="28.5 6"
data-login="{{ map_author }}" text="-" textsize="1.6"
valign="center2" halign="center" textfont="RajdhaniMono" textemboss="1"
id="author_label"
id="author_label" scriptevents="1"
/>

<quad pos="0 -13" z-index="0" size="40 6" bgcolor="00000060"/>
<quad pos="0 -13" z-index="0" size="6.5 6" bgcolor="00000060"/>
<label pos="1.25 -13.75" z-index="1" size="5 5" text="&#xf017;"/>
<label pos="21.5 -16.25" z-index="1" size="28 6" text="{{ map_authortime }}" textsize="1.6" valign="center2" halign="center" textfont="RajdhaniMono" textemboss="1"/>
<label pos="20.5 -16.25" z-index="1" size="28.5 6" text="{{ map_authortime }}" textsize="1.6" valign="center2" halign="center" textfont="RajdhaniMono" textemboss="1"/>

<script><!--{% include 'info/mapinfo.Script.Txt' %}--></script>
{% endblock %}

0 comments on commit 9efcf75

Please sign in to comment.