CHANGED: #1471 CCtrlButton is now part of the NEL GUI library.

This commit is contained in:
dfighter1985 2012-06-16 00:23:20 +02:00
parent cbe2e8b1d6
commit 29c7387e2a
30 changed files with 31 additions and 40 deletions

View file

@ -26,7 +26,6 @@ namespace NLGUI
{ {
class CEventDescriptor; class CEventDescriptor;
} }
class CInterfaceManager;
/** /**
* <Class description> * <Class description>

View file

@ -16,12 +16,11 @@
// ----------------------------------------------------------------------------
#include "stdpch.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "interface_manager.h"
#include "nel/misc/xml_auto_ptr.h" #include "nel/misc/xml_auto_ptr.h"
#include "nel/gui/widget_manager.h"
#include "nel/gui/interface_group.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
using namespace std; using namespace std;
@ -106,7 +105,6 @@ void CCtrlButton::draw ()
sint32 nTxId = -1; sint32 nTxId = -1;
CRGBA color; CRGBA color;
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
CRGBA globalColor= CWidgetManager::getInstance()->getGlobalColorForContent(); CRGBA globalColor= CWidgetManager::getInstance()->getGlobalColorForContent();
@ -248,7 +246,6 @@ void CCtrlButton::updateCoords()
{ {
if (!_Scale) if (!_Scale)
{ {
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
sint32 txw, txh; sint32 txw, txh;
rVR.getTextureSizeFromId (_TextureIdNormal, txw, txh); rVR.getTextureSizeFromId (_TextureIdNormal, txw, txh);
@ -285,7 +282,6 @@ void CCtrlButton::setTextureOver(const std::string&name)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
std::string CCtrlButton::getTexture() const std::string CCtrlButton::getTexture() const
{ {
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
return rVR.getTextureNameFromId(_TextureIdNormal); return rVR.getTextureNameFromId(_TextureIdNormal);
} }
@ -293,7 +289,6 @@ std::string CCtrlButton::getTexture() const
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
std::string CCtrlButton::getTexturePushed() const std::string CCtrlButton::getTexturePushed() const
{ {
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
return rVR.getTextureNameFromId(_TextureIdPushed); return rVR.getTextureNameFromId(_TextureIdPushed);
} }
@ -301,7 +296,6 @@ std::string CCtrlButton::getTexturePushed() const
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
std::string CCtrlButton::getTextureOver() const std::string CCtrlButton::getTextureOver() const
{ {
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
return rVR.getTextureNameFromId(_TextureIdOver); return rVR.getTextureNameFromId(_TextureIdOver);
} }
@ -310,7 +304,6 @@ std::string CCtrlButton::getTextureOver() const
sint32 CCtrlButton::getMaxUsedW() const sint32 CCtrlButton::getMaxUsedW() const
{ {
sint32 txw, txh; sint32 txw, txh;
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
rVR.getTextureSizeFromId (_TextureIdNormal, txw, txh); rVR.getTextureSizeFromId (_TextureIdNormal, txw, txh);
return txw; return txw;
@ -325,7 +318,6 @@ sint32 CCtrlButton::getMinUsedW() const
// *************************************************************************** // ***************************************************************************
void CCtrlButton::fitTexture() void CCtrlButton::fitTexture()
{ {
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
sint32 w, h; sint32 w, h;
rVR.getTextureSizeFromId(_TextureIdNormal, w, h); rVR.getTextureSizeFromId(_TextureIdNormal, w, h);

View file

@ -64,7 +64,7 @@
// Interface part // Interface part
#include "interface_v3/interface_manager.h" #include "interface_v3/interface_manager.h"
#include "interface_v3/character_3d.h" #include "interface_v3/character_3d.h"
#include "interface_v3/ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "interface_v3/input_handler_manager.h" #include "interface_v3/input_handler_manager.h"
#include "interface_v3/group_editbox.h" #include "interface_v3/group_editbox.h"
#include "nel/gui/interface_expr.h" #include "nel/gui/interface_expr.h"

View file

@ -83,7 +83,7 @@
// Game Config // Game Config
#include "dbgroup_combo_box.h" #include "dbgroup_combo_box.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "../global.h" #include "../global.h"
using namespace std; using namespace std;

View file

@ -17,7 +17,7 @@
#include "action_handler_misc.h" #include "action_handler_misc.h"
#include "interface_manager.h" #include "interface_manager.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "group_container.h" #include "group_container.h"
#include "group_editbox.h" #include "group_editbox.h"
#include "people_interraction.h" #include "people_interraction.h"

View file

@ -34,7 +34,7 @@
#include "group_container.h" #include "group_container.h"
#include "sphrase_manager.h" #include "sphrase_manager.h"
#include "sbrick_manager.h" #include "sbrick_manager.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "../user_entity.h" #include "../user_entity.h"
#include "skill_manager.h" #include "skill_manager.h"
#include "inventory_manager.h" #include "inventory_manager.h"

View file

@ -23,7 +23,7 @@
#include "interface_manager.h" #include "interface_manager.h"
#include "dbctrl_sheet.h" #include "dbctrl_sheet.h"
#include "view_bitmap.h" #include "view_bitmap.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "group_editbox.h" #include "group_editbox.h"
#include "../client_cfg.h" #include "../client_cfg.h"
#include "view_text.h" #include "view_text.h"

View file

@ -21,7 +21,7 @@
#include "group_menu.h" #include "group_menu.h"
#include "nel/misc/xml_auto_ptr.h" #include "nel/misc/xml_auto_ptr.h"
#include "interface_manager.h" #include "interface_manager.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "nel/gui/action_handler.h" #include "nel/gui/action_handler.h"
#include "nel/gui/lua_ihm.h" #include "nel/gui/lua_ihm.h"

View file

@ -21,7 +21,7 @@
#include "dbgroup_list_sheet.h" #include "dbgroup_list_sheet.h"
#include "group_container.h" #include "group_container.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "nel/gui/interface_property.h" #include "nel/gui/interface_property.h"
#include "interface_manager.h" #include "interface_manager.h"
#include "nel/gui/action_handler.h" #include "nel/gui/action_handler.h"

View file

@ -22,7 +22,7 @@
#include "interface_manager.h" #include "interface_manager.h"
#include "nel/misc/xml_auto_ptr.h" #include "nel/misc/xml_auto_ptr.h"
#include "../sheet_manager.h" #include "../sheet_manager.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "view_text.h" #include "view_text.h"
#include "nel/gui/action_handler.h" #include "nel/gui/action_handler.h"
#include "../time_client.h" #include "../time_client.h"

View file

@ -22,7 +22,7 @@
#include "inventory_manager.h" #include "inventory_manager.h"
#include "nel/misc/xml_auto_ptr.h" #include "nel/misc/xml_auto_ptr.h"
#include "../sheet_manager.h" #include "../sheet_manager.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "view_text.h" #include "view_text.h"
#include "nel/gui/action_handler.h" #include "nel/gui/action_handler.h"
#include "sphrase_manager.h" #include "sphrase_manager.h"

View file

@ -23,7 +23,7 @@
#include "dbgroup_select_number.h" #include "dbgroup_select_number.h"
#include "view_text.h" #include "view_text.h"
#include "view_bitmap.h" #include "view_bitmap.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "nel/gui/interface_property.h" #include "nel/gui/interface_property.h"
#include "interface_manager.h" #include "interface_manager.h"
#include "nel/gui/action_handler.h" #include "nel/gui/action_handler.h"

View file

@ -32,7 +32,7 @@
#include "nel/gui/lua_ihm.h" #include "nel/gui/lua_ihm.h"
#include "group_list.h" #include "group_list.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "ctrl_scroll.h" #include "ctrl_scroll.h"
#include "view_text.h" #include "view_text.h"
#include "view_bitmap.h" #include "view_bitmap.h"

View file

@ -33,7 +33,7 @@ extern "C"
#include "group_container.h" #include "group_container.h"
#include "view_link.h" #include "view_link.h"
#include "ctrl_scroll.h" #include "ctrl_scroll.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "dbctrl_sheet.h" #include "dbctrl_sheet.h"
#include "ctrl_text_button.h" #include "ctrl_text_button.h"
#include "nel/gui/action_handler.h" #include "nel/gui/action_handler.h"

View file

@ -27,7 +27,7 @@
#include "nel/gui/interface_group.h" #include "nel/gui/interface_group.h"
#include "group_scrolltext.h" #include "group_scrolltext.h"
#include "group_tree.h" #include "group_tree.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "group_table.h" #include "group_table.h"
typedef std::map<std::string, std::string> TStyle; typedef std::map<std::string, std::string> TStyle;

View file

@ -24,7 +24,7 @@
#include "../continent.h" #include "../continent.h"
#include "../zone_util.h" #include "../zone_util.h"
#include "../user_entity.h" #include "../user_entity.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "group_editbox.h" #include "group_editbox.h"
#include "../string_manager_client.h" #include "../string_manager_client.h"
#include "group_container.h" #include "group_container.h"

View file

@ -26,7 +26,7 @@
#include "../client_sheets/world_sheet.h" #include "../client_sheets/world_sheet.h"
#include "nel/gui/interface_group.h" #include "nel/gui/interface_group.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "view_bitmap.h" #include "view_bitmap.h"
#include "view_text.h" #include "view_text.h"
#include "animal_position_state.h" #include "animal_position_state.h"

View file

@ -20,7 +20,7 @@
#include "group_modal_get_key.h" #include "group_modal_get_key.h"
#include "interface_manager.h" #include "interface_manager.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "nel/misc/events.h" #include "nel/misc/events.h"

View file

@ -23,7 +23,7 @@
#include "nel/gui/group_frame.h" #include "nel/gui/group_frame.h"
#include "view_text.h" #include "view_text.h"
#include "view_link.h" #include "view_link.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
class CCtrlLink : public CCtrlButton class CCtrlLink : public CCtrlButton
{ {

View file

@ -24,7 +24,7 @@
#include "group_list.h" #include "group_list.h"
#include "view_text.h" #include "view_text.h"
#include "ctrl_scroll.h" #include "ctrl_scroll.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "nel/gui/action_handler.h" #include "nel/gui/action_handler.h"
#include "../time_client.h" #include "../time_client.h"

View file

@ -23,7 +23,7 @@
#include "nel/gui/group_frame.h" #include "nel/gui/group_frame.h"
#include "view_text.h" #include "view_text.h"
#include "view_link.h" #include "view_link.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
/** /**
* This group is used to simulate HTML cells. * This group is used to simulate HTML cells.

View file

@ -21,7 +21,7 @@
#include "interface_manager.h" #include "interface_manager.h"
#include "interface_ddx.h" #include "interface_ddx.h"
#include "nel/gui/action_handler.h" #include "nel/gui/action_handler.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "nel/gui/group_modal.h" #include "nel/gui/group_modal.h"
#include "../client_cfg.h" #include "../client_cfg.h"

View file

@ -52,7 +52,7 @@
#include "view_text.h" #include "view_text.h"
// Ctrl // Ctrl
#include "ctrl_scroll.h" #include "ctrl_scroll.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "ctrl_text_button.h" #include "ctrl_text_button.h"
// DBCtrl // DBCtrl
#include "dbctrl_sheet.h" #include "dbctrl_sheet.h"

View file

@ -53,7 +53,7 @@
#include "dbview_digit.h" #include "dbview_digit.h"
// Ctrl // Ctrl
#include "ctrl_scroll.h" #include "ctrl_scroll.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "ctrl_col_pick.h" #include "ctrl_col_pick.h"
#include "ctrl_tooltip.h" #include "ctrl_tooltip.h"
#include "ctrl_text_button.h" #include "ctrl_text_button.h"

View file

@ -24,7 +24,7 @@
#include "interface_manager.h" #include "interface_manager.h"
#include "nel/gui/action_handler.h" #include "nel/gui/action_handler.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "group_editbox.h" #include "group_editbox.h"
#include "group_list.h" #include "group_list.h"
#include "dbgroup_combo_box.h" #include "dbgroup_combo_box.h"

View file

@ -25,7 +25,7 @@
#include "interface_manager.h" #include "interface_manager.h"
#include "nel/gui/action_handler.h" #include "nel/gui/action_handler.h"
#include "dbctrl_sheet.h" #include "dbctrl_sheet.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "group_editbox.h" #include "group_editbox.h"
#include "group_list.h" #include "group_list.h"
#include "dbgroup_combo_box.h" #include "dbgroup_combo_box.h"

View file

@ -31,7 +31,7 @@
#include "../client_chat_manager.h" #include "../client_chat_manager.h"
#include "../string_manager_client.h" #include "../string_manager_client.h"
#include "nel/gui/interface_expr.h" #include "nel/gui/interface_expr.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "ctrl_text_button.h" #include "ctrl_text_button.h"
#include "filtered_chat_summary.h" #include "filtered_chat_summary.h"
#include "input_handler_manager.h" #include "input_handler_manager.h"

View file

@ -32,7 +32,7 @@
#include "group_container.h" #include "group_container.h"
#include "group_list.h" #include "group_list.h"
#include "dbgroup_select_number.h" #include "dbgroup_select_number.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "ctrl_text_button.h" #include "ctrl_text_button.h"
#include "ctrl_col_pick.h" #include "ctrl_col_pick.h"
#include "nel/gui/ctrl_draggable.h" #include "nel/gui/ctrl_draggable.h"

View file

@ -27,7 +27,7 @@
#include "nel/gui/action_handler.h" #include "nel/gui/action_handler.h"
#include "group_container.h" #include "group_container.h"
#include "../actions_client.h" #include "../actions_client.h"
#include "ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "interface_options_ryzom.h" #include "interface_options_ryzom.h"

View file

@ -38,7 +38,7 @@
#include "interface_v3/group_editbox.h" #include "interface_v3/group_editbox.h"
#include "interface_v3/group_quick_help.h" #include "interface_v3/group_quick_help.h"
#include "interface_v3/view_text.h" #include "interface_v3/view_text.h"
#include "interface_v3/ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "interface_v3/ctrl_text_button.h" #include "interface_v3/ctrl_text_button.h"
#include "sound_manager.h" #include "sound_manager.h"
#include "far_tp.h" #include "far_tp.h"