Files
AyuGramDesktop/Telegram/SourceFiles/ui/boxes/emoji_stake_box.h
T
2025-12-29 11:21:22 +04:00

56 lines
1.3 KiB
C++

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "ui/layers/generic_box.h"
namespace Main {
class Session;
} // namespace Main
namespace Ui {
class InputField;
class NumberInput;
class VerticalLayout;
struct StarsInputFieldArgs {
std::optional<int64> value;
int64 max = 0;
};
[[nodiscard]] not_null<NumberInput*> AddStarsInputField(
not_null<VerticalLayout*> container,
StarsInputFieldArgs &&args);
struct TonInputFieldArgs {
int64 value = 0;
};
[[nodiscard]] not_null<InputField*> AddTonInputField(
not_null<VerticalLayout*> container,
TonInputFieldArgs &&args);
void AddApproximateUsd(
not_null<QWidget*> field,
not_null<Main::Session*> session,
rpl::producer<CreditsAmount> price);
struct EmojiGameStakeArgs {
not_null<Main::Session*> session;
int64 currentStake = 0;
std::array<int, 6> milliRewards;
int jackpotMilliReward = 0;
Fn<void(int64)> submit;
};
void EmojiGameStakeBox(not_null<GenericBox*> box, EmojiGameStakeArgs &&args);
[[nodiscard]] inline object_ptr<GenericBox> MakeEmojiGameStakeBox(
EmojiGameStakeArgs &&args) {
return Box(EmojiGameStakeBox, std::move(args));
}
} // namespace Ui