mirror of
https://github.com/Maschell/hid_to_vpad.git
synced 2024-11-21 22:19:16 +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
|
BUILD_DBG := $(TARGET)_dbg
|
||||||
SOURCES := src \
|
SOURCES := src \
|
||||||
src/common \
|
src/common \
|
||||||
src/mygui \
|
src/custom/gui \
|
||||||
src/language \
|
src/language \
|
||||||
src/menu \
|
src/menu \
|
||||||
src/menu/tv \
|
src/menu/tv \
|
||||||
|
@ -14,13 +14,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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)
|
DefaultGuiSelectBox::DefaultGuiSelectBox(std::string caption, GuiFrame *parent)
|
||||||
: GuiSelectBox(caption,parent)
|
: GuiSelectBox(NULL,caption)
|
||||||
,topBackgroundImg_imgdata(Resources::GetImageData("gameSettingsButton.png"))
|
,topBackgroundImg_imgdata(Resources::GetImageData("gameSettingsButton.png"))
|
||||||
,topBackgroundImg_img(topBackgroundImg_imgdata)
|
,topBackgroundImg_img(topBackgroundImg_imgdata)
|
||||||
,topHighlightedImg_imgdata(Resources::GetImageData("gameSettingsButtonSelected.png"))
|
,topHighlightedImg_imgdata(Resources::GetImageData("gameSettingsButtonSelected.png"))
|
||||||
@ -39,9 +39,9 @@ DefaultSelectBox::DefaultSelectBox(std::string caption, GuiFrame *parent)
|
|||||||
this->setSoundClick(buttonClickSound);
|
this->setSoundClick(buttonClickSound);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Destructor for the DefaultSelectBox class.
|
* Destructor for the DefaultGuiSelectBox class.
|
||||||
*/
|
*/
|
||||||
DefaultSelectBox::~DefaultSelectBox()
|
DefaultGuiSelectBox::~DefaultGuiSelectBox()
|
||||||
{
|
{
|
||||||
Resources::RemoveImageData(topBackgroundImg_imgdata);
|
Resources::RemoveImageData(topBackgroundImg_imgdata);
|
||||||
Resources::RemoveImageData(topHighlightedImg_imgdata);
|
Resources::RemoveImageData(topHighlightedImg_imgdata);
|
@ -20,13 +20,13 @@
|
|||||||
#include <gui/GuiSelectBox.h>
|
#include <gui/GuiSelectBox.h>
|
||||||
|
|
||||||
//!A simple select box with default values.
|
//!A simple select box with default values.
|
||||||
class DefaultSelectBox : public GuiSelectBox{
|
class DefaultGuiSelectBox : public GuiSelectBox{
|
||||||
public:
|
public:
|
||||||
//!Constructor
|
//!Constructor
|
||||||
//!\param checked Checked
|
//!\param checked Checked
|
||||||
DefaultSelectBox(std::string caption, GuiFrame *parent = NULL);
|
DefaultGuiSelectBox(std::string caption, GuiFrame *parent = NULL);
|
||||||
//!Destructor
|
//!Destructor
|
||||||
virtual ~DefaultSelectBox();
|
virtual ~DefaultGuiSelectBox();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
GuiImageData * topBackgroundImg_imgdata;
|
GuiImageData * topBackgroundImg_imgdata;
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
DefaultGuiSwitch::DefaultGuiSwitch(bool checked)
|
DefaultGuiSwitch::DefaultGuiSwitch(bool checked)
|
||||||
: GuiSwitch(checked)
|
: GuiSwitch(NULL,checked)
|
||||||
,switchbase_imgdata(Resources::GetImageData("switchIconBase.png"))
|
,switchbase_imgdata(Resources::GetImageData("switchIconBase.png"))
|
||||||
,switchbase_img(switchbase_imgdata)
|
,switchbase_img(switchbase_imgdata)
|
||||||
,switchbase_highlighted_imgdata(Resources::GetImageData("switchIconBaseHighlighted.png"))
|
,switchbase_highlighted_imgdata(Resources::GetImageData("switchIconBaseHighlighted.png"))
|
@ -20,8 +20,7 @@
|
|||||||
#include <gui/GuiSwitch.h>
|
#include <gui/GuiSwitch.h>
|
||||||
|
|
||||||
//!A simple switch
|
//!A simple switch
|
||||||
class DefaultGuiSwitch : public GuiSwitch
|
class DefaultGuiSwitch : public GuiSwitch{
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
//!Constructor
|
//!Constructor
|
||||||
//!\param checked Checked
|
//!\param checked Checked
|
||||||
@ -30,16 +29,16 @@ class DefaultGuiSwitch : public GuiSwitch
|
|||||||
virtual ~DefaultGuiSwitch();
|
virtual ~DefaultGuiSwitch();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
GuiImageData * switchbase_imgdata;
|
GuiImageData * switchbase_imgdata = NULL;
|
||||||
GuiImage switchbase_img;
|
GuiImage switchbase_img;
|
||||||
|
|
||||||
GuiImageData * switchbase_highlighted_imgdata;
|
GuiImageData * switchbase_highlighted_imgdata = NULL;
|
||||||
GuiImage switchbase_highlighted_img;
|
GuiImage switchbase_highlighted_img;
|
||||||
|
|
||||||
GuiImageData * switchOn_imgdata;
|
GuiImageData * switchOn_imgdata = NULL;
|
||||||
GuiImage switchOn_img;
|
GuiImage switchOn_img;
|
||||||
|
|
||||||
GuiImageData * switchOff_imgdata;
|
GuiImageData * switchOff_imgdata = NULL;
|
||||||
GuiImage switchOff_img;
|
GuiImage switchOff_img;
|
||||||
};
|
};
|
||||||
|
|
@ -20,8 +20,7 @@
|
|||||||
#include <gui/Gui.h>
|
#include <gui/Gui.h>
|
||||||
#include <gui/sigslot.h>
|
#include <gui/sigslot.h>
|
||||||
|
|
||||||
class GuiConfigurationScreen : public GuiFrame
|
class GuiConfigurationScreen : public GuiFrame{
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
GuiConfigurationScreen(s32 w, s32 h) : GuiFrame(w, h) {}
|
GuiConfigurationScreen(s32 w, s32 h) : GuiFrame(w, h) {}
|
||||||
virtual ~GuiConfigurationScreen() {}
|
virtual ~GuiConfigurationScreen() {}
|
@ -22,7 +22,7 @@
|
|||||||
#include <gui/Gui.h>
|
#include <gui/Gui.h>
|
||||||
#include <system/CMutex.h>
|
#include <system/CMutex.h>
|
||||||
#include <controller_patcher/ControllerPatcherDefs.h>
|
#include <controller_patcher/ControllerPatcherDefs.h>
|
||||||
#include "mygui/GuiConfigurationScreen.h"
|
#include "custom/gui/GuiConfigurationScreen.h"
|
||||||
#include "InputGetterMenu.h"
|
#include "InputGetterMenu.h"
|
||||||
|
|
||||||
class CVideo;
|
class CVideo;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "MainWindowDRC.h"
|
#include "MainWindowDRC.h"
|
||||||
#include "../../version.h"
|
#include "../../version.h"
|
||||||
#include "mygui/GuiControllerInputDisplay.h"
|
#include "custom/gui/GuiControllerInputDisplay.h"
|
||||||
|
|
||||||
extern u32 hostIpAddress;
|
extern u32 hostIpAddress;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <gui/Gui.h>
|
#include <gui/Gui.h>
|
||||||
#include <language/gettext.h>
|
#include <language/gettext.h>
|
||||||
|
|
||||||
#include "mygui/GuiConfigurationScreen.h"
|
#include "custom/gui/GuiConfigurationScreen.h"
|
||||||
#include "MenuListDRC.h"
|
#include "MenuListDRC.h"
|
||||||
#include "menu/MainWindow.h"
|
#include "menu/MainWindow.h"
|
||||||
#include "MainWindowContent.h"
|
#include "MainWindowContent.h"
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "ContentTemplate.h"
|
#include "ContentTemplate.h"
|
||||||
#include "menu/drc/MenuElementController.h"
|
#include "menu/drc/MenuElementController.h"
|
||||||
#include "menu/InputGetterMenu.h"
|
#include "menu/InputGetterMenu.h"
|
||||||
#include "mygui/GuiControllerInputDisplay.h"
|
#include "custom/gui/GuiControllerInputDisplay.h"
|
||||||
|
|
||||||
class ContentController : public ContentTemplate{
|
class ContentController : public ContentTemplate{
|
||||||
public:
|
public:
|
||||||
|
@ -22,9 +22,8 @@
|
|||||||
#include <gui/Gui.h>
|
#include <gui/Gui.h>
|
||||||
#include <language/gettext.h>
|
#include <language/gettext.h>
|
||||||
|
|
||||||
#include "mygui/DefaultGuiCheckBox.h"
|
#include "custom/gui/DefaultGuiSwitch.h"
|
||||||
#include "mygui/DefaultGuiSwitch.h"
|
#include "custom/gui/DefaultGuiSelectBox.h"
|
||||||
#include "mygui/DefaultSelectBox.h"
|
|
||||||
#include "ContentTemplate.h"
|
#include "ContentTemplate.h"
|
||||||
|
|
||||||
class ContentSettings : public ContentTemplate{
|
class ContentSettings : public ContentTemplate{
|
||||||
@ -35,7 +34,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
GuiTrigger touchTrigger;
|
GuiTrigger touchTrigger;
|
||||||
GuiTrigger wpadTouchTrigger;
|
GuiTrigger wpadTouchTrigger;
|
||||||
DefaultSelectBox languageSelectBox;
|
DefaultGuiSelectBox languageSelectBox;
|
||||||
|
|
||||||
std::map<std::string,std::string> languagesNames;
|
std::map<std::string,std::string> languagesNames;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <gui/Gui.h>
|
#include <gui/Gui.h>
|
||||||
#include "mygui/GuiConfigurationScreen.h"
|
#include "custom/gui/GuiConfigurationScreen.h"
|
||||||
|
|
||||||
#include "TVControllerBanner.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