Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
This commit is contained in:
parent
35d2a8cb36
commit
a47d20f8be
890 changed files with 11796 additions and 16664 deletions
35
Source/UI/Buttons/UIJobSlotButton.cpp
Normal file
35
Source/UI/Buttons/UIJobSlotButton.cpp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#include "UI/Buttons/UIJobSlotButton.h"
|
||||
|
||||
// OFFSET: 0x007BAD70
|
||||
UIJobSlotButton::UIJobSlotButton(UIWindowContext& windows, UIButtonContext& controls) : UIBitmapButton(windows, controls), selected(0) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x007BB6B0
|
||||
// FUNCTION: fn_09284
|
||||
UIJobSlotButton::~UIJobSlotButton() = default;
|
||||
|
||||
// OFFSET: 0x007BFC70
|
||||
// FUNCTION: fn_09307
|
||||
void UIJobSlotButton::Slot31(int x, int y) {
|
||||
this->UIButton::Slot31(x, y);
|
||||
this->SetSelected(this->selected == 0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x007C1C50
|
||||
// FUNCTION: fn_09318
|
||||
void UIJobSlotButton::SetSelected(unsigned char value) {
|
||||
this->selected = value;
|
||||
this->geometry.unknown_0030 = 0;
|
||||
|
||||
if (value == 1) {
|
||||
this->SetBitmap(this->selectedImage.c_str(), 0, 0);
|
||||
this->SetBitmap(this->selectedImage.c_str(), 1, 0);
|
||||
this->SetBitmap(this->unselectedImage.c_str(), 2, 0);
|
||||
} else {
|
||||
this->SetBitmap(this->unselectedImage.c_str(), 0, 0);
|
||||
this->SetBitmap(this->unselectedImage.c_str(), 1, 0);
|
||||
this->SetBitmap(this->selectedImage.c_str(), 2, 0);
|
||||
}
|
||||
|
||||
this->Invalidate();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue