This commit is contained in:
watrabi
2025-09-18 17:55:52 -04:00
commit 977f1ff4b8
15030 changed files with 17324420 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
#include "stdafx.h"
#include "V8DataModel/ImageButton.h"
namespace RBX {
const char* const sGuiImageButton = "ImageButton";
GuiImageButton::GuiImageButton()
: DescribedCreatable<GuiImageButton,GuiButton,sGuiImageButton>("ImageButton")
, GuiImageMixin()
, imageState(GuiDrawImage::ALL)
{}
GuiImageButton::GuiImageButton(Verb* theVerb) : DescribedCreatable<GuiImageButton,GuiButton,sGuiImageButton>("ImageButton")
, GuiImageMixin()
, imageState(GuiDrawImage::ALL)
{
verb = theVerb;
}
IMPLEMENT_GUI_IMAGE_MIXIN(GuiImageButton);
void GuiImageButton::render2d(Adorn* adorn)
{
//Render the background
Rect2D rect;
render2dButtonImpl(adorn, rect);
Gui::WidgetState oldGuiState = guiState;
if (verb && verb->isSelected())
{
guiState = Gui::DOWN_OVER;
active = verb->isEnabled();
}
renderImage(adorn);
guiState = oldGuiState;
}
}