mirror of
https://github.com/Maschell/hid_to_vpad.git
synced 2024-11-19 05:19:15 +01:00
Changes to be compatible to the newest libgui
This commit is contained in:
parent
ead67f3a14
commit
3041cc7103
2
Makefile
2
Makefile
@ -35,7 +35,7 @@ BUILD := build
|
||||
BUILD_DBG := $(TARGET)_dbg
|
||||
SOURCES := src \
|
||||
src/common \
|
||||
src/mygui \
|
||||
src/custom/gui \
|
||||
src/language \
|
||||
src/menu \
|
||||
src/menu/tv \
|
||||
|
@ -14,13 +14,13 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include "DefaultSelectBox.h"
|
||||
#include "DefaultGuiSelectBox.h"
|
||||
/**
|
||||
* Constructor for the DefaultSelectBox class.
|
||||
* Constructor for the DefaultGuiSelectBox class.
|
||||
*/
|
||||
|
||||
DefaultSelectBox::DefaultSelectBox(std::string caption, GuiFrame *parent)
|
||||
: GuiSelectBox(caption,parent)
|
||||
DefaultGuiSelectBox::DefaultGuiSelectBox(std::string caption, GuiFrame *parent)
|
||||
: GuiSelectBox(NULL,caption)
|
||||
,topBackgroundImg_imgdata(Resources::GetImageData("gameSettingsButton.png"))
|
||||
,topBackgroundImg_img(topBackgroundImg_imgdata)
|
||||
,topHighlightedImg_imgdata(Resources::GetImageData("gameSettingsButtonSelected.png"))
|
||||
@ -39,9 +39,9 @@ DefaultSelectBox::DefaultSelectBox(std::string caption, GuiFrame *parent)
|
||||
this->setSoundClick(buttonClickSound);
|
||||
}
|
||||
/**
|
||||
* Destructor for the DefaultSelectBox class.
|
||||
* Destructor for the DefaultGuiSelectBox class.
|
||||
*/
|
||||
DefaultSelectBox::~DefaultSelectBox()
|
||||
DefaultGuiSelectBox::~DefaultGuiSelectBox()
|
||||
{
|
||||
Resources::RemoveImageData(topBackgroundImg_imgdata);
|
||||
Resources::RemoveImageData(topHighlightedImg_imgdata);
|
@ -20,13 +20,13 @@
|
||||
#include <gui/GuiSelectBox.h>
|
||||
|
||||
//!A simple select box with default values.
|
||||
class DefaultSelectBox : public GuiSelectBox{
|
||||
class DefaultGuiSelectBox : public GuiSelectBox{
|
||||
public:
|
||||
//!Constructor
|
||||
//!\param checked Checked
|
||||
DefaultSelectBox(std::string caption, GuiFrame *parent = NULL);
|
||||
DefaultGuiSelectBox(std::string caption, GuiFrame *parent = NULL);
|
||||
//!Destructor
|
||||
virtual ~DefaultSelectBox();
|
||||
virtual ~DefaultGuiSelectBox();
|
||||
|
||||
protected:
|
||||
GuiImageData * topBackgroundImg_imgdata;
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
DefaultGuiSwitch::DefaultGuiSwitch(bool checked)
|
||||
: GuiSwitch(checked)
|
||||
: GuiSwitch(NULL,checked)
|
||||
,switchbase_imgdata(Resources::GetImageData("switchIconBase.png"))
|
||||
,switchbase_img(switchbase_imgdata)
|
||||
,switchbase_highlighted_imgdata(Resources::GetImageData("switchIconBaseHighlighted.png"))
|
@ -20,8 +20,7 @@
|
||||
#include <gui/GuiSwitch.h>
|
||||
|
||||
//!A simple switch
|
||||
class DefaultGuiSwitch : public GuiSwitch
|
||||
{
|
||||
class DefaultGuiSwitch : public GuiSwitch{
|
||||
public:
|
||||
//!Constructor
|
||||
//!\param checked Checked
|
||||
@ -30,16 +29,16 @@ class DefaultGuiSwitch : public GuiSwitch
|
||||
virtual ~DefaultGuiSwitch();
|
||||
|
||||
protected:
|
||||
GuiImageData * switchbase_imgdata;
|
||||
GuiImageData * switchbase_imgdata = NULL;
|
||||
GuiImage switchbase_img;
|
||||
|
||||
GuiImageData * switchbase_highlighted_imgdata;
|
||||
GuiImageData * switchbase_highlighted_imgdata = NULL;
|
||||
GuiImage switchbase_highlighted_img;
|
||||
|
||||
GuiImageData * switchOn_imgdata;
|
||||
GuiImageData * switchOn_imgdata = NULL;
|
||||
GuiImage switchOn_img;
|
||||
|
||||
GuiImageData * switchOff_imgdata;
|
||||
GuiImageData * switchOff_imgdata = NULL;
|
||||
GuiImage switchOff_img;
|
||||
};
|
||||
|
@ -20,8 +20,7 @@
|
||||
#include <gui/Gui.h>
|
||||
#include <gui/sigslot.h>
|
||||
|
||||
class GuiConfigurationScreen : public GuiFrame
|
||||
{
|
||||
class GuiConfigurationScreen : public GuiFrame{
|
||||
public:
|
||||
GuiConfigurationScreen(s32 w, s32 h) : GuiFrame(w, h) {}
|
||||
virtual ~GuiConfigurationScreen() {}
|
@ -22,7 +22,7 @@
|
||||
#include <gui/Gui.h>
|
||||
#include <system/CMutex.h>
|
||||
#include <controller_patcher/ControllerPatcherDefs.h>
|
||||
#include "mygui/GuiConfigurationScreen.h"
|
||||
#include "custom/gui/GuiConfigurationScreen.h"
|
||||
#include "InputGetterMenu.h"
|
||||
|
||||
class CVideo;
|
||||
|
@ -16,7 +16,7 @@
|
||||
****************************************************************************/
|
||||
#include "MainWindowDRC.h"
|
||||
#include "../../version.h"
|
||||
#include "mygui/GuiControllerInputDisplay.h"
|
||||
#include "custom/gui/GuiControllerInputDisplay.h"
|
||||
|
||||
extern u32 hostIpAddress;
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <gui/Gui.h>
|
||||
#include <language/gettext.h>
|
||||
|
||||
#include "mygui/GuiConfigurationScreen.h"
|
||||
#include "custom/gui/GuiConfigurationScreen.h"
|
||||
#include "MenuListDRC.h"
|
||||
#include "menu/MainWindow.h"
|
||||
#include "MainWindowContent.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "ContentTemplate.h"
|
||||
#include "menu/drc/MenuElementController.h"
|
||||
#include "menu/InputGetterMenu.h"
|
||||
#include "mygui/GuiControllerInputDisplay.h"
|
||||
#include "custom/gui/GuiControllerInputDisplay.h"
|
||||
|
||||
class ContentController : public ContentTemplate{
|
||||
public:
|
||||
|
@ -22,9 +22,8 @@
|
||||
#include <gui/Gui.h>
|
||||
#include <language/gettext.h>
|
||||
|
||||
#include "mygui/DefaultGuiCheckBox.h"
|
||||
#include "mygui/DefaultGuiSwitch.h"
|
||||
#include "mygui/DefaultSelectBox.h"
|
||||
#include "custom/gui/DefaultGuiSwitch.h"
|
||||
#include "custom/gui/DefaultGuiSelectBox.h"
|
||||
#include "ContentTemplate.h"
|
||||
|
||||
class ContentSettings : public ContentTemplate{
|
||||
@ -35,7 +34,7 @@ public:
|
||||
private:
|
||||
GuiTrigger touchTrigger;
|
||||
GuiTrigger wpadTouchTrigger;
|
||||
DefaultSelectBox languageSelectBox;
|
||||
DefaultGuiSelectBox languageSelectBox;
|
||||
|
||||
std::map<std::string,std::string> languagesNames;
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
#include <gui/Gui.h>
|
||||
#include "mygui/GuiConfigurationScreen.h"
|
||||
#include "custom/gui/GuiConfigurationScreen.h"
|
||||
|
||||
#include "TVControllerBanner.h"
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
/****************************************************************************
|
||||
* Copyright (C) 2017 Maschell
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include "DefaultGuiCheckBox.h"
|
||||
/**
|
||||
* Constructor for the DefaultGuiCheckBox class.
|
||||
*/
|
||||
|
||||
DefaultGuiCheckBox::DefaultGuiCheckBox(bool checked)
|
||||
: GuiCheckBox(checked)
|
||||
,checkbox_imgdata(Resources::GetImageData("checkbox.png"))
|
||||
,checkbox_img(checkbox_imgdata)
|
||||
,checkbox_selected_imgdata(Resources::GetImageData("checkbox_selected.png"))
|
||||
,checkbox_selected_img(checkbox_selected_imgdata)
|
||||
,highlighted_imgdata(Resources::GetImageData("checkbox_highlighted.png"))
|
||||
,highlighted_img(highlighted_imgdata)
|
||||
{
|
||||
setSize(checkbox_img.getWidth(),checkbox_img.getHeight());
|
||||
this->setImageBackground(&checkbox_img);
|
||||
this->setImageSelected(&checkbox_selected_img);
|
||||
this->setImageHighlighted(&highlighted_img);
|
||||
}
|
||||
|
||||
/**
|
||||
* Destructor for the GuiButton class.
|
||||
*/
|
||||
DefaultGuiCheckBox::~DefaultGuiCheckBox()
|
||||
{
|
||||
Resources::RemoveImageData(checkbox_imgdata);
|
||||
Resources::RemoveImageData(checkbox_selected_imgdata);
|
||||
Resources::RemoveImageData(highlighted_imgdata);
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
/****************************************************************************
|
||||
* Copyright (C) 2017 Maschell
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#ifndef DEFAULT_GUI_CHECKBOX_H_
|
||||
#define DEFAULT_GUI_CHECKBOX_H_
|
||||
|
||||
#include <gui/GuiCheckBox.h>
|
||||
|
||||
//!A simple CheckBox
|
||||
class DefaultGuiCheckBox : public GuiCheckBox{
|
||||
public:
|
||||
//!Constructor
|
||||
//!\param checked Checked
|
||||
DefaultGuiCheckBox(bool checked);
|
||||
//!Destructor
|
||||
virtual ~DefaultGuiCheckBox();
|
||||
protected:
|
||||
GuiImageData * checkbox_imgdata;
|
||||
GuiImage checkbox_img;
|
||||
|
||||
GuiImageData * checkbox_selected_imgdata;
|
||||
GuiImage checkbox_selected_img;
|
||||
|
||||
GuiImageData * highlighted_imgdata;
|
||||
GuiImage highlighted_img;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user