本文整理汇总了C++中rect::getHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ rect::getHeight方法的具体用法?C++ rect::getHeight怎么用?C++ rect::getHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rect
的用法示例。
在下文中一共展示了rect::getHeight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadButtonTexture
void TouchScreenGUI::loadButtonTexture(button_info* btn, const char* path, rect<s32> button_rect)
{
unsigned int tid;
video::ITexture *texture = guiScalingImageButton(m_device->getVideoDriver(),
m_texturesource->getTexture(path, &tid), button_rect.getWidth(), button_rect.getHeight());
if (texture) {
btn->guibutton->setUseAlphaChannel(true);
if (g_settings->getBool("gui_scaling_filter")) {
rect<s32> txr_rect = rect<s32>(0, 0, button_rect.getWidth(), button_rect.getHeight());
btn->guibutton->setImage(texture, txr_rect);
btn->guibutton->setPressedImage(texture, txr_rect);
btn->guibutton->setScaleImage(false);
} else {
btn->guibutton->setImage(texture);
btn->guibutton->setPressedImage(texture);
btn->guibutton->setScaleImage(true);
}
btn->guibutton->setDrawBorder(false);
btn->guibutton->setText(L"");
}
}
示例2: load_button_texture
static void load_button_texture(button_info* btn, const char* path,
rect<s32> button_rect, ISimpleTextureSource* tsrc, video::IVideoDriver *driver)
{
unsigned int tid;
video::ITexture *texture = guiScalingImageButton(driver,
tsrc->getTexture(path, &tid), button_rect.getWidth(),
button_rect.getHeight());
if (texture) {
btn->guibutton->setUseAlphaChannel(true);
if (g_settings->getBool("gui_scaling_filter")) {
rect<s32> txr_rect = rect<s32>(0, 0, button_rect.getWidth(), button_rect.getHeight());
btn->guibutton->setImage(texture, txr_rect);
btn->guibutton->setPressedImage(texture, txr_rect);
btn->guibutton->setScaleImage(false);
} else {
btn->guibutton->setImage(texture);
btn->guibutton->setPressedImage(texture);
btn->guibutton->setScaleImage(true);
}
btn->guibutton->setDrawBorder(false);
btn->guibutton->setText(L"");
}
}