mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
Judge mode (#3531)
* Judge mode * Use seperate judge icon * Fix clang init ordering complaint * Create gavel.svg * Add judge level * Adjust judge permissions. * - Tag events caused by judges - Allow judges access to card right click menus. * Allow judges to change phase / turn. * Remove gavel from pawn * Make judge action text black. * Create scales * Rename scales to scales.svg * Use scales * remove gavel * - Address PR feedback - Fix sort order * Zach * add option to servatrice.ini
This commit is contained in:
parent
9d27b36704
commit
ea8201af5c
42 changed files with 375 additions and 105 deletions
|
|
@ -121,9 +121,11 @@ MessageLogWidget::getFromStr(CardZone *zone, QString cardName, int position, boo
|
|||
|
||||
void MessageLogWidget::containerProcessingDone()
|
||||
{
|
||||
|
||||
if (currentContext == MessageContext_MoveCard) {
|
||||
for (auto &i : moveCardQueue)
|
||||
logDoMoveCard(i);
|
||||
|
||||
moveCardQueue.clear();
|
||||
moveCardTapped.clear();
|
||||
moveCardExtras.clear();
|
||||
|
|
@ -134,6 +136,7 @@ void MessageLogWidget::containerProcessingDone()
|
|||
}
|
||||
|
||||
currentContext = MessageContext_None;
|
||||
messageSuffix = messagePrefix = QString();
|
||||
}
|
||||
|
||||
void MessageLogWidget::containerProcessingStarted(const GameEventContext &context)
|
||||
|
|
@ -815,6 +818,18 @@ void MessageLogWidget::logUndoDraw(Player *player, QString cardName)
|
|||
.arg(QString("<a href=\"card://%1\">%2</a>").arg(sanitizeHtml(cardName)).arg(sanitizeHtml(cardName))));
|
||||
}
|
||||
|
||||
void MessageLogWidget::setContextJudgeName(QString name)
|
||||
{
|
||||
messagePrefix = QString("<span style=\"color:black\">");
|
||||
messageSuffix = QString("</span> [<img height=12 src=\"theme:icons/scales\"> %1]").arg(sanitizeHtml(name));
|
||||
}
|
||||
|
||||
void MessageLogWidget::appendHtmlServerMessage(const QString &html, bool optionalIsBold, QString optionalFontColor)
|
||||
{
|
||||
|
||||
ChatView::appendHtmlServerMessage(messagePrefix + html + messageSuffix, optionalIsBold, optionalFontColor);
|
||||
}
|
||||
|
||||
void MessageLogWidget::connectToPlayer(Player *player)
|
||||
{
|
||||
connect(player, SIGNAL(logSay(Player *, QString)), this, SLOT(logSay(Player *, QString)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue