// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/dialogs/tipodaydlg.cpp
// Function: smooth::GUI::Dialogs::TipOfTheDay::TipOfTheDay(bool*)
S::GUI::Dialogs::TipOfTheDay::TipOfTheDay(Bool *iShowTips)
{
	showTips = iShowTips;

	mode = TIP_ORDERED;
	offset = 0;

	dlgwnd		= new Window(I18n::Translator::defaultTranslator->TranslateString("Tip of the day"), Point(200, 200), Size(350, 300));

	titlebar	= new Titlebar(TB_CLOSEBUTTON);
	divbar		= new Divider(39, OR_HORZ | OR_BOTTOM);

	btn_ok		= new Button(I18n::Translator::defaultTranslator->TranslateString("OK"), Point(87, 29), Size());
	btn_ok->onAction.Connect(&TipOfTheDay::OnOK, this);
	btn_ok->SetOrientation(OR_LOWERRIGHT);

	btn_next	= new Button(I18n::Translator::defaultTranslator->TranslateString("Next tip"), Point(175, 29), Size());
	btn_next->onAction.Connect(&TipOfTheDay::OnNext, this);
	btn_next->SetOrientation(OR_LOWERRIGHT);
	btn_next->SetWidth(Math::Max(80, btn_next->GetUnscaledTextWidth() + 13));
	btn_next->SetX(btn_next->GetWidth() + 95);

	check_showtips	= new CheckBox(I18n::Translator::defaultTranslator->TranslateString("Show tips on startup"), Point(7, 27), Size(150, 0), showTips);
	check_showtips->SetOrientation(OR_LOWERLEFT);
	check_showtips->SetWidth(check_showtips->GetUnscaledTextWidth() + 21);

	Buffer<UnsignedByte> light(sizeof(Icons::Light));

	memcpy(light, Icons::Light, sizeof(Icons::Light));

	img_light	= new Image(ImageLoader::Load(light, IMAGE_FORMAT_PNG), Point(8, 3), Size(32, 32));

	txt_didyouknow	= new Text(I18n::Translator::defaultTranslator->TranslateString("Did you know..."), Point(11 + img_light->GetWidth(), 7));
	txt_didyouknow->SetFont(Font(Font::Default, 14, Font::Bold, 0, txt_didyouknow->GetFont().GetColor()));

	txt_tip		= new Cursor(Point(6, 4), Size(328, 182));
	txt_tip->SetFont(Font(Font::Default, Font::DefaultSize, Font::Normal, 0, Setup::TooltipTextColor));
	txt_tip->SetFlags(CF_MULTILINE);
	txt_tip->Deactivate();

	layer_inner	= new Layer();
	layer_inner->SetMetrics(Point(8, 39), Size(328, 182));
	layer_inner->SetBackgroundColor(Setup::TooltipColor);

	Add(dlgwnd);

	dlgwnd->Add(titlebar);
	dlgwnd->Add(divbar);

	dlgwnd->Add(btn_ok);
	dlgwnd->Add(btn_next);
	dlgwnd->Add(check_showtips);

	dlgwnd->Add(img_light);
	dlgwnd->Add(txt_didyouknow);

	dlgwnd->GetMainLayer()->Add(layer_inner);

	layer_inner->Add(txt_tip);

	dlgwnd->SetFlags(dlgwnd->GetFlags() | WF_MODAL);
	dlgwnd->onPaint.Connect(&TipOfTheDay::OnPaint, this);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x58870
movq 0xf5d70(%rip), %rax     # 0x161f60
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x640(%rbx), %r14
movq %r14, %rdi
callq 0x64972
movq %r15, 0x638(%rbx)
andq $0x0, 0x698(%rbx)
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x56700
movq %rax, %r12
movq 0xf51bf(%rip), %r13     # 0x1613e8
movq (%r13), %r15
leaq 0x7795b(%rip), %rsi     # 0xe3b8f
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x59510
movabsq $0xc8000000c8, %rcx     # imm = 0xC8000000C8
leaq 0x48(%rsp), %rdx
movq %rcx, (%rdx)
movabsq $0x12c0000015e, %rsi    # imm = 0x12C0000015E
movq %rsp, %rcx
movq %rsi, (%rcx)
movq %r12, %rdi
movq %rax, %rsi
xorl %r8d, %r8d
callq 0x581a0
movq %r12, 0x5e8(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5a588
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x56700
movq %rax, %r12
pushq $0x4
popq %rsi
movq %rax, %rdi
callq 0x57490
movq %r12, 0x5f0(%rbx)
movl $0x5f8, %edi            # imm = 0x5F8
callq 0x56700
movq %rax, %r12
pushq $0x27
popq %rsi
pushq $0x9
popq %rdx
movq %rax, %rdi
callq 0x57ce0
movq %r12, 0x5f8(%rbx)
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x56700
movq %rax, %r12
movq (%r13), %r15
leaq 0xb1bcf(%rip), %rsi     # 0x11deb4
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x59510
movabsq $0x1d00000057, %rcx     # imm = 0x1D00000057
leaq 0x48(%rsp), %rdx
movq %rcx, (%rdx)
movq %rsp, %rcx
andq $0x0, (%rcx)
movq %r12, %rdi
movq %rax, %rsi
callq 0x585b0
movq %r12, 0x600(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5a588
movl $0x478, %edi            # imm = 0x478
addq 0x600(%rbx), %rdi
movq 0xf530c(%rip), %rsi     # 0x161650
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6cf2a
movq 0x600(%rbx), %rdi
movq (%rdi), %rax
pushq $0x28
popq %rsi
callq *0x120(%rax)
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x56700
movq %rax, %r12
movq (%r13), %r15
leaq 0x77825(%rip), %rsi     # 0xe3b9e
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x59510
movabsq $0x1d000000af, %rcx     # imm = 0x1D000000AF
leaq 0x48(%rsp), %rdx
movq %rcx, (%rdx)
movq %rsp, %rcx
andq $0x0, (%rcx)
movq %r12, %rdi
movq %rax, %rsi
callq 0x585b0
movq %r12, 0x608(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5a588
movl $0x478, %edi            # imm = 0x478
addq 0x608(%rbx), %rdi
movq 0xf5650(%rip), %rsi     # 0x161a28
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6cf2a
movq 0x608(%rbx), %rdi
movq (%rdi), %rax
pushq $0x28
popq %rsi
callq *0x120(%rax)
movq 0x608(%rbx), %r15
movq (%r15), %rax
movq %r15, %rdi
callq *0xf0(%rax)
cmpl $0x44, %eax
pushq $0x43
popq %rsi
cmovgel %eax, %esi
addl $0xd, %esi
movq %r15, %rdi
callq 0x5a1f0
movq 0x608(%rbx), %rdi
movl 0xb0(%rdi), %esi
addl $0x5f, %esi
callq 0x56a40
movl $0x5d8, %edi            # imm = 0x5D8
callq 0x56700
movq %rax, %r12
movq (%r13), %r15
leaq 0x7775e(%rip), %rsi     # 0xe3ba7
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x59510
movabsq $0x1b00000007, %rcx     # imm = 0x1B00000007
leaq 0x48(%rsp), %rdx
movq %rcx, (%rdx)
movq %rsp, %rcx
movq $0x96, (%rcx)
movq 0x638(%rbx), %r8
movq %r12, %rdi
movq %rax, %rsi
callq 0x56b90
movq %r12, 0x610(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5a588
movq 0x610(%rbx), %rdi
movq (%rdi), %rax
pushq $0x18
popq %rsi
callq *0x120(%rax)
movq 0x610(%rbx), %r15
movq (%r15), %rax
movq %r15, %rdi
callq *0xf0(%rax)
addl $0x15, %eax
movq %r15, %rdi
movl %eax, %esi
callq 0x5a1f0
leaq 0x48(%rsp), %rdi
movl $0x1b27, %esi           # imm = 0x1B27
callq 0x62d56
movq 0x50(%rsp), %rax
movq (%rax), %rdi
leaq 0x77790(%rip), %rsi     # 0xe3c80
movl $0x1b27, %edx           # imm = 0x1B27
callq 0x562f0
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x56700
movq %rax, %r12
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x58fb0
movabsq $0x300000008, %rax      # imm = 0x300000008
movq %rsp, %rdx
movq %rax, (%rdx)
movabsq $0x2000000020, %rax     # imm = 0x2000000020
leaq 0x60(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x569e0
movq %r12, 0x618(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5a4c8
movl $0x5c0, %edi            # imm = 0x5C0
callq 0x56700
movq %rax, %r12
movq (%r13), %r15
leaq 0x7764b(%rip), %rsi     # 0xe3bbc
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x59510
movq 0x618(%rbx), %rcx
movl 0xb0(%rcx), %ecx
addl $0xb, %ecx
movq %rsp, %rdx
movl %ecx, (%rdx)
movl $0x7, 0x4(%rdx)
leaq 0x60(%rsp), %rcx
andq $0x0, (%rcx)
movq %r12, %rdi
movq %rax, %rsi
callq 0x56a70
movq %r12, 0x620(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5a588
movq 0x620(%rbx), %r15
movq 0xf4e71(%rip), %rax     # 0x161448
movzwl (%rax), %ebp
movq (%r15), %rax
movq %r15, %rdi
callq *0xe8(%rax)
movq %rax, %rdi
callq 0x58750
movswl %bp, %ecx
movq 0xf57c0(%rip), %rsi     # 0x161db8
leaq 0x8(%rsp), %rdi
pushq $0xe
popq %rdx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x58460
movq (%r15), %rax
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq *0xe0(%rax)
leaq 0x8(%rsp), %rdi
callq 0x57860
movl $0x768, %edi            # imm = 0x768
callq 0x56700
movq %rax, %r12
movabsq $0x400000006, %rax      # imm = 0x400000006
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movabsq $0xb600000148, %r13     # imm = 0xB600000148
movq %rsp, %rdx
movq %r13, (%rdx)
movq %r12, %rdi
callq 0x56d10
movq %r12, 0x628(%rbx)
movq 0xf582d(%rip), %rax     # 0x161e98
movswl (%rax), %edx
movq 0xf510b(%rip), %rax     # 0x161780
movswl (%rax), %ecx
movq 0xf5739(%rip), %rsi     # 0x161db8
movq 0xf520a(%rip), %r9      # 0x161890
leaq 0x8(%rsp), %rdi
xorl %r8d, %r8d
callq 0x58460
movq (%r12), %rax
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq *0xe0(%rax)
leaq 0x8(%rsp), %rdi
callq 0x57860
movq 0x628(%rbx), %rdi
movl $0x1, 0x30(%rdi)
movq (%rdi), %rax
callq *0x70(%rax)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x56700
movq %rax, %r12
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x5a180
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x57c00
movq %r12, 0x630(%rbx)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x5a588
movq 0x630(%rbx), %rdi
movabsq $0x2700000008, %rax     # imm = 0x2700000008
movq %rax, (%r15)
movq %rsp, %rdx
movq %r13, (%rdx)
movq (%rdi), %rax
leaq 0x8(%rsp), %rsi
callq *0x150(%rax)
movq 0x630(%rbx), %rdi
movq (%rdi), %rax
movq 0xf4dca(%rip), %rsi     # 0x161500
callq *0x138(%rax)
movq 0x5e8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movq 0x5e8(%rbx), %rdi
movq 0x5f0(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5e8(%rbx), %rdi
movq 0x5f8(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5e8(%rbx), %rdi
movq 0x600(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5e8(%rbx), %rdi
movq 0x608(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5e8(%rbx), %rdi
movq 0x610(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5e8(%rbx), %rdi
movq 0x618(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5e8(%rbx), %rdi
movq 0x620(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5e8(%rbx), %rax
movq 0x630(%rbx), %rsi
movq 0x620(%rax), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x628(%rbx), %rsi
movq 0x630(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5e8(%rbx), %rdi
orl $0x1, 0x30(%rdi)
addq $0x648, %rdi            # imm = 0x648
movq 0xf5108(%rip), %rsi     # 0x161928
xorl %edx, %edx
movq %rbx, %rcx
callq 0x6cf2a
leaq 0x48(%rsp), %rdi
callq 0x62d46
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6c939
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0x6c85a
movq %rax, %r15
movl $0x5b8, %esi            # imm = 0x5B8
jmp 0x6c8b6
jmp 0x6c872
jmp 0x6c939
movq %rax, %r15
movl $0x768, %esi            # imm = 0x768
jmp 0x6c8b6
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x57860
jmp 0x6c93c
jmp 0x6c886
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0x6c898
movq %rax, %r15
movl $0x5c0, %esi            # imm = 0x5C0
jmp 0x6c8b6
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x5a4c8
jmp 0x6c8b1
movq %rax, %r15
movl $0x5c8, %esi            # imm = 0x5C8
movq %r12, %rdi
callq 0x564c0
jmp 0x6c93c
jmp 0x6c934
jmp 0x6c8c4
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0x6c8d6
movq %rax, %r15
movl $0x5d8, %esi            # imm = 0x5D8
jmp 0x6c923
jmp 0x6c8e5
jmp 0x6c8e5
jmp 0x6c900
jmp 0x6c8e5
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0x6c903
jmp 0x6c900
movq %rax, %r15
movl $0x5f8, %esi            # imm = 0x5F8
jmp 0x6c923
movq %rax, %r15
movl $0x5c8, %esi            # imm = 0x5C8
jmp 0x6c923
jmp 0x6c90c
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0x6c91e
movq %rax, %r15
movl $0x6d8, %esi            # imm = 0x6D8
movq %r12, %rdi
callq 0x564c0
jmp 0x6c946
movq %rax, %r15
jmp 0x6c94e
jmp 0x6c939
movq %rax, %r15
jmp 0x6c946
movq %rax, %r15
leaq 0x48(%rsp), %rdi
callq 0x62d46
movq %r14, %rdi
callq 0x64988
movq %rbx, %rdi
callq 0x56b80
movq %r15, %rdi
callq 0x58260