CheckBoxRenderer

  • 1 Replies
  • 190 Views
CheckBoxRenderer
« on: 17 April 2020, 01:03:24 »
Does 'CheckBoxRenderer' exist in ver 0.8? (I notice it once existed in ver 0.7.)

I am attempting:
#include "header.h"

#include <TGUI/Loading/Theme.hpp>
#include <TGUI/Renderers/CheckBoxRenderer.hpp> // <-- This doesn't exist
//#include <TGUI/Renderers/RadioButtonRenderer.hpp> // <-- This doesn't help

void Implementation()
{
  auto theme{ tgui::Theme::getDefault() };
  tgui::CheckBoxRenderer widgetRenderer{ theme->getRenderer("CheckBox") }; // <-- No such thing as 'CheckBoxRenderer'
  //tgui::RadioButtonRenderer widgetRenderer{ theme->getRenderer("RadioButton") }; // <-- Doesn't affect check boxes
  widgetRenderer.setTextColor(..); // <-- I want to accomplish this
}
 

I thought perhaps it had been rolled into 'RadioButtonRenderer' but that does not appear to work.
Any help would be appreciated; thanks!

*

texus

  • *****
  • 1584
    • View Profile
    • Texus's Blog
Re: CheckBoxRenderer
« Reply #1 on: 17 April 2020, 08:08:15 »
I should probably add the class to avoid confusion, but CheckBox just uses RadioButtonRenderer right now.
tgui::RadioButtonRenderer widgetRenderer{ theme->getRenderer("CheckBox") };

EDIT: tgui::CheckBoxRenderer has been added in the latest 0.8 version.
« Last Edit: 17 April 2020, 19:11:54 by texus »