Skip to content

Commit

Permalink
Rewrite NewsManager
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingJellyfish committed Sep 1, 2024
1 parent 9f1b54d commit 1871ef1
Show file tree
Hide file tree
Showing 16 changed files with 464 additions and 140 deletions.
3 changes: 3 additions & 0 deletions data/gui/icons/licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ License: GPL-2+
Comment: From the Gnome icon set. Source: https://github.com/GNOME/adwaita-icon-theme/blob/gnome-2-30/src/emblem-default.svg License: https://github.com/GNOME/adwaita-icon-theme/blob/gnome-2-30/COPYING

Files:
news.png
news_headline.png
red_dot.png
red_x.png
search.png
Copyright: Tango Desktop Project
Expand Down
Binary file added data/gui/icons/news.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/gui/icons/news_headline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/gui/icons/red_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 16 additions & 9 deletions data/gui/screens/online/online.stkgui
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,28 @@
<stkgui>
<div x="0" y="1%" width="100%" height="98%" layout="vertical-row" >
<header text_align="center" height="8%" width="80%" align="center" text="Online"/>
<spacer height="1%" width="10"/>

<spacer height="2%" width="10"/>

<button id="user-id" width="12f" height="fit" align="center"/>

<spacer height="2%" width="10"/>

<box width="fit" height="fit" layout="horizontal-row" align="center" valign="center">
<spacer width="25"/>
<label I18N="In the networking menu" align="center"
text="Enable splitscreen or player handicaps" text_align="right"/>
<spacer width="25"/>
<checkbox id="enable-splitscreen" align="center" />
<spacer width="25"/>
<box proportion="4" width="85%" align="center" layout="horizontal-row" padding="6">
<list id="news_list" width="50%" height="100%" alternate_bg="true" word_wrap="true" />

<div width="50%" height="100%" layout="vertical-row">
<spacer height="1f" width="10"/>
<div width="90%" height="fit" layout="horizontal-row" align="center" valign="center">
<label I18N="In the networking menu" align="center" proportion="1" word_wrap="true"
text="Enable splitscreen or player handicaps" text_align="center"/>
<checkbox id="enable-splitscreen" align="center"/>
</box>
<icon id="logo" align="center" proportion="1" width="100%" icon="gui/icons/logo.png"/>
</div>
</box>

<icon id="logo" align="center" proportion="4" width="100%" icon="gui/icons/logo.png"/>
<spacer height="2%" width="10"/>

<buttonbar id="menu_toprow" proportion="3" width="90%" align="center">
<icon-button id="lan" width="128" height="128"
Expand Down
4 changes: 3 additions & 1 deletion src/addons/addons_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ void AddonsManager::init(const XMLNode *xml,
{
file_manager->removeFile(filename);
setErrorState();
NewsManager::get()->addNewsMessage(_("Failed to connect to the SuperTuxKart add-ons server."));
NewsManager::get()->addNewsMessage(
NewsManager::NTYPE_MAINMENU,
_("Failed to connect to the SuperTuxKart add-ons server."));
return;
}

Expand Down
Loading

0 comments on commit 1871ef1

Please sign in to comment.