94 lines
2.2 KiB
ActionScript
94 lines
2.2 KiB
ActionScript
bool drawFolder(string&in name) {
|
|
bool click = false;
|
|
UI::drawIconCentered("folder.png", 64);
|
|
|
|
if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) {
|
|
click = true;
|
|
}
|
|
|
|
UI::textCenter(name);
|
|
UI::nextColumn();
|
|
return click;
|
|
}
|
|
|
|
bool drawIcon(string&in name, string&in iconName) {
|
|
bool click = false;
|
|
UI::drawIconCentered(iconName, 64);
|
|
|
|
if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) {
|
|
click = true;
|
|
}
|
|
|
|
UI::textCenter(name);
|
|
UI::nextColumn();
|
|
return click;
|
|
}
|
|
|
|
bool drawFile(string&in name) {
|
|
bool click = false;
|
|
UI::drawIconCentered("file.png", 64);
|
|
if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) {
|
|
click = true;
|
|
}
|
|
|
|
UI::textCenter(name);
|
|
UI::nextColumn();
|
|
return click;
|
|
}
|
|
|
|
bool drawFile(string&in name, string&in dragId, any dragData, string&in overlay) {
|
|
bool click = false;
|
|
UI::drawIconCentered("file.png", 64);
|
|
if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) {
|
|
click = true;
|
|
}
|
|
|
|
UI::dragDropSource(dragId,
|
|
dragData,
|
|
overlay);
|
|
|
|
UI::textCenter(name);
|
|
UI::nextColumn();
|
|
return click;
|
|
}
|
|
|
|
bool drawFileIcon(string&in name, string&in dragId, any dragData, string&in overlay, string&in icon, bool selected = false) {
|
|
bool click = false;
|
|
if (selected) {
|
|
UI::drawIconCenteredHighlight(icon, 64);
|
|
} else {
|
|
UI::drawIconCentered(icon, 64);
|
|
}
|
|
if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) {
|
|
click = true;
|
|
}
|
|
|
|
UI::dragDropSource(dragId,
|
|
dragData,
|
|
overlay);
|
|
|
|
UI::textCenter(name);
|
|
UI::nextColumn();
|
|
return click;
|
|
}
|
|
|
|
bool drawTextureIcon(string&in name, string&in dragId, any dragData, string&in overlay, Texture texture, bool selected = false) {
|
|
bool click = false;
|
|
if (selected) {
|
|
UI::drawIconCenteredHighlight(texture, 64);
|
|
} else {
|
|
UI::drawIconCentered(texture, 64);
|
|
}
|
|
if (UI::isItemClicked(0) and UI::isMouseDoubleClicked(0)) {
|
|
click = true;
|
|
}
|
|
|
|
UI::dragDropSource(dragId,
|
|
dragData,
|
|
overlay);
|
|
|
|
UI::textCenter(name);
|
|
UI::nextColumn();
|
|
return click;
|
|
}
|