Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
feat(gameclient): right panel in the bezel, experience bar and rank stars drawn by the page
Olcay Seyganbb54b8d207a4
diff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.strindex aca07a6ea..e85b1f070 100644--- a/GeneralsMD/Code/Data/Patch.str+++ b/GeneralsMD/Code/Data/Patch.str@@ -1132,11 +1132,6 @@ GUI:BarBeacon"Beacon"END-// opens and folds away the general's powers ready to fire, over the portrait-GUI:BarSkills-"Skills"-END-// the network box in the top right corner: frames ready out of the input delay, the room's frame// rate, and the traffic in and out in kilobytes a secondGUI:BarNetReadydiff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.strindex 1c27972b6..471b0e362 100644--- a/GeneralsMD/Code/Data/Turkish/Generals.str+++ b/GeneralsMD/Code/Data/Turkish/Generals.str@@ -15657,10 +15657,6 @@ GUI:BarBeacon"İşaret"END-GUI:BarSkills-"Yetenekler"-END-GUI:BarNetReady"hazır"ENDdiff --git a/GeneralsMD/Code/Data/Window/Html/ControlBar.html b/GeneralsMD/Code/Data/Window/Html/ControlBar.htmlindex b2927b57e..152294bde 100644--- a/GeneralsMD/Code/Data/Window/Html/ControlBar.html+++ b/GeneralsMD/Code/Data/Window/Html/ControlBar.html@@ -1,9 +1,9 @@<!DOCTYPE html><!--The command bar's frame, drawn where its three plates used to be, and the bar's own buttons. The- command buttons, the radar, the money, the power bar and the portrait are still the bar's windows- and paint over this page. The promotion, minimise and beacon buttons and the under-attack light- are the page's to draw: their windows take the clicks and draw nothing. The menu and idle worker+ command buttons, the radar, the money and the portrait are still the bar's windows and paint over+ this page. The promotion and beacon buttons, the under-attack light, the power bar and the+ experience bar are the page's to draw: their windows take the clicks and draw nothing. The menu and idle workerbuttons are the page's altogether, pressed through data-click="press:Name"; the chat button isgone and Enter still opens the chat. Same materials as Window/Html/Spectator.html, whose headersays what the renderer draws and what not.@@ -22,12 +22,14 @@"yellow" or "red"; the watched player's while watchingdata-each="powercells" the same production as 40 cells, each {{lit}} "lit" up to it, standing at{{x}} pixels inside the frame's lip and {{w}} wide- {{skillsbutton.x}} ... the skills button's place in the right panel's corner; data-click- "flip:skills" folds the general's powers away and back, and- {{flip:skills}} is "flipped" while they are folded+ {{expframe.x}} ... the experience bar's groove down the right panel, .w and .h its inside,+ {{expframe.innerw}} the width inside its lip; data-each="expcells" its+ ten rungs from the bottom up, each {{lit}} "lit" up to the way from this+ rank to the next, at {{y}} inside the lip, {{h}} tall, {{segh}} without+ its black line+ data-each="rankstars" a star for every rank there is, {{lit}} "lit" up to the one reacheddata-each="commandcells" the fourteen command buttons' places, shown or not, each {{cell.x}} .y .w .h- data-each="skillcells" the grid's nine empty places behind the powers, each {{cell.x}} .y .w .h;- none while the skills button has them folded away+ data-each="skillcells" the grid's nine empty places behind the general's powers, each {{cell.x}} .y .w .h{{signals.x}} ... the column of smoke signal buttons against the left panel;data-click="signal:attack", "signal:defend" or "signal:look" sends oneto the middle of the view; {{signals.shown}} is "hidden" where the keys@@ -49,8 +51,8 @@.bt .br .bb .bl the border's four widths, out to the screen's edge on thesides against it{{alerttab.x}} ... tabs standing on a border's top edge, outside it: the under-attack light- {{skillsbutton.x}} ... on the radar panel's, the skills button on the right panel's at its right- hand end, with the promotion button moved beside it+ {{starstab.x}} ... on the radar panel's at its left hand end, the rank's stars on the right+ panel's at its right hand end, with the promotion button's window under it{{workertab.x}} ... the idle worker's step, against the centre's border at its bottom left{{powerblock.x}} ... the power bar's block, the centre's bezel carried on upward as wide as it{{powerframe.x}} ... the power bar's frame standing on the centre's border, and the money's@@ -201,8 +203,6 @@.button.pushed { background: linear-gradient(to bottom, #2a3036, #4b535e); border-top-color: #0c1114; border-left-color: #0c1114; }.button.disabled { color: #6f7782; }.button .cap { position: absolute; left: 0; right: 0; top: 50%; margin-top: -5px; line-height: 10px; }- .button .stars { font-size: 10px; }- .button.promotion.ready.lit { background: linear-gradient(to bottom, #f6e08a, #a4832a); color: #1a1406; border-color: #fff4b8; }/* the menu: three bars in a square cap in the screen's top left corner */.menu { left: 4px; top: 4px; width: 18px; height: 16px; }@@ -253,9 +253,26 @@.alert.disabled .led { border-color: #ff9a80; background: linear-gradient(to bottom, #ff6a50, #d01a08); }.alert.disabled .glint { background-color: #ffe4dc; }- /* the skills button is lit while the powers are out, and dark once folded away; the grid's empty- places stand behind the powers, and go with them */- .skills.flipped { color: #6f7782; }+ /* the rank: a star for every rank there is in a tab on the right panel's bezel, gold up to the one+ reached and sunk dark past it. The tab is the promotion button: under the pointer its stars+ brighten, and while a promotion waits to be spent the tab blinks gold */+ .rank .stars { position: absolute; left: 0; right: 0; top: 1px; line-height: 12px; font-size: 11px; text-align: center; }+ .rank .star { color: #2a2f35; }+ .rank .star.lit { color: #f2cf4a; }+ .rank.hilite .star.lit { color: #fff0a0; }+ .rank.hilite .star { color: #4b535e; }+ .rank.ready.lit { background: linear-gradient(to bottom, #f6e08a, #a4832a); border-top-color: #fff4b8; }+ .rank.ready.lit .star { color: #5a4410; }+ .rank.ready.lit .star.lit { color: #ffffff; }++ /* the experience bar: rungs up the right panel's groove, lit gold from the bottom up to the way+ from this rank to the next, a black line over each */+ .rungs { position: absolute; left: 1px; top: 1px; bottom: 1px; }+ .rungs .rung { position: absolute; left: 0; }+ .rungs .seg { margin-top: 1px; background-color: #15130c; }+ .rungs .lit .seg { background: linear-gradient(to right, #8a6a14, #f6d860, #b08a24); }++ /* the grid's empty places stand behind the powers */.skillcell { margin: 1px 0 0 1px; }/* the smoke signals: a step on the radar's bezel's right, dark down its own right, and a joint@@ -327,11 +344,21 @@<div class="inset"></div><div class="joint"></div></div>- <div class="piece frame solid {{right.shown}}" style="left: {{right.x}}px; top: {{right.y}}px; width: {{right.w}}px; height: {{right.h}}px; border-width: {{right.bt}}px {{right.br}}px {{right.bb}}px {{right.bl}}px"></div>+ <div class="piece frame bezel solid {{right.shown}}" style="left: {{right.x}}px; top: {{right.y}}px; width: {{right.w}}px; height: {{right.h}}px; border-width: {{right.bt}}px {{right.br}}px {{right.bb}}px {{right.bl}}px">+ <div class="steel" style="left: -{{right.bl}}px; right: -{{right.br}}px; top: -{{right.bt}}px; bottom: -{{right.bb}}px"></div>+ <div class="shine" style="left: -{{right.bl}}px; right: -{{right.br}}px; top: -{{right.bt}}px"></div>+ <div class="lit" style="left: -{{right.bl}}px; top: -{{right.bt}}px; bottom: -{{right.bb}}px"></div>+ <div class="sunk" style="width: {{right.w}}px; height: {{right.h}}px"></div>+ </div>+ <div class="piece groove solid stack {{expframe.shown}}" style="left: {{expframe.x}}px; top: {{expframe.y}}px; width: {{expframe.w}}px; height: {{expframe.h}}px">+ <div class="rungs" style="width: {{expframe.innerw}}px"><div class="rung {{lit}}" data-each="expcells" style="top: {{y}}px; height: {{h}}px; width: {{expframe.innerw}}px"><div class="seg" style="width: {{expframe.innerw}}px; height: {{segh}}px"></div></div></div>+ <div class="lip"></div>+ </div>+ <div class="piece tab rank {{starstab.shown}} {{promotion}} {{blink}} {{ButtonGeneral.state}}" style="left: {{starstab.x}}px; top: {{starstab.y}}px; width: {{starstab.w}}px; height: {{starstab.h}}px">+ <div class="stars"><span class="star {{lit}}" data-each="rankstars">★</span></div>+ </div><div class="piece button {{ButtonPlaceBeacon.shown}} {{ButtonPlaceBeacon.state}}" style="left: {{ButtonPlaceBeacon.x}}px; top: {{ButtonPlaceBeacon.y}}px; width: {{ButtonPlaceBeacon.w}}px; height: {{ButtonPlaceBeacon.h}}px"><div class="cap">{{text:GUI:BarBeacon}}</div></div>- <div class="piece button promotion {{promotion}} {{blink}} {{ButtonGeneral.shown}} {{ButtonGeneral.state}}" style="left: {{ButtonGeneral.x}}px; top: {{ButtonGeneral.y}}px; width: {{ButtonGeneral.w}}px; height: {{ButtonGeneral.h}}px"><div class="cap stars">★★★</div></div>- <div class="piece button skills {{skillsbutton.shown}} {{flip:skills}}" data-click="flip:skills" style="left: {{skillsbutton.x}}px; top: {{skillsbutton.y}}px; width: {{skillsbutton.w}}px; height: {{skillsbutton.h}}px"><div class="cap">{{text:GUI:BarSkills}}</div></div><div class="piece step signals solid {{signals.shown}}" style="left: {{signals.x}}px; top: {{signals.y}}px; width: {{signals.w}}px; height: {{signals.h}}px"><div class="joint"></div>diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.hindex 2b7d1fcc1..3bf53217e 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h@@ -1211,7 +1211,6 @@ protected:HtmlOverlay * m_controlBarOverlay;Bool m_controlBarPageLoaded;Bool m_controlBarPageShown; ///< drawn this frame, so its buttons can be clicked- std::set< std::string > m_controlBarFlipped; ///< names a data-click="flip:name" on that page has flippedstd::string m_controlBarPage;Bool m_signalsWereShown; ///< the smoke signal column was up last frameUnsignedInt m_signalsRiseStartMs; ///< when it last came up, the start of its buttons' risediff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cppindex 880d26ee8..d7e7cb819 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp@@ -104,6 +104,7 @@#include "GameLogic/IncomingDamage.h"#include "GameLogic/Weapon.h"#include "GameLogic/Object.h"+#include "GameLogic/RankInfo.h"#include "GameLogic/GameLogic.h"#include "GameLogic/PartitionManager.h"#include "GameLogic/PolygonTrigger.h"@@ -3874,7 +3875,6 @@ void InGameUI::reset( void )m_scoreboardOpen = FALSE;m_scoreboardPageLoaded = FALSE;m_controlBarPageLoaded = FALSE;- m_controlBarFlipped.clear();m_signalsWereShown = FALSE;m_spectatorPageLoaded = FALSE;m_spectatorFlipped.clear();@@ -10179,7 +10179,7 @@ static const char *const CONTROL_BAR_WINDOWS[] =* clicks; only their pictures are the page's. */static const char *const CONTROL_BAR_CUSTOM[] ={- "ButtonGeneral", "ButtonLarge", "ButtonPlaceBeacon", "WinUAttack", "PowerWindow"+ "ButtonGeneral", "ButtonLarge", "ButtonPlaceBeacon", "WinUAttack", "PowerWindow", "GeneralsExp", "ExpBarForeground"};/** How far along its scale a power figure reaches, 0 to 1: the power bar's own logarithmic scale,@@ -10243,6 +10243,59 @@ static void putPowerBar( HtmlValues &values, std::vector< HtmlValues > &cells )values[ "power.state" ] = "green";}+//-------------------------------------------------------------------------------------------------+/** The general's experience as the page draws it, in the groove {{expframe.x}} ... puts down the+ * right panel: `cells` from the bottom up, each {{lit}} "lit" up to the way from this rank to the+ * next, at {{y}} and {{h}} pixels inside the lip, and `stars` one per rank, {{lit}} up to the rank+ * reached. The groove's border goes on top of its size in the page, so expframe.w and .h are cut+ * to its inside here. Watching, it is the watched player's. */+//-------------------------------------------------------------------------------------------------+static void putExperienceBar( HtmlValues &values, std::vector< HtmlValues > &cells, std::vector< HtmlValues > &stars )+{+ enum { FRAME_BORDER = 2, FRAME_LIP = 1, EXPERIENCE_CELLS = 10, FULL = 100 };++ const Int width = atoi( values[ "expframe.w" ].c_str() ) - 2 * FRAME_BORDER;+ const Int height = atoi( values[ "expframe.h" ].c_str() ) - 2 * FRAME_BORDER;+ values[ "expframe.w" ] = std::to_string( max( 0, width ) );+ values[ "expframe.h" ] = std::to_string( max( 0, height ) );+ values[ "expframe.innerw" ] = std::to_string( max( 0, width - 2 * FRAME_LIP ) );++ const Player *player = TheControlBar->isObserverControlBarOn() ? TheControlBar->getObserverLookAtPlayer()+ : ThePlayerList->getLocalPlayer();+ cells.clear();+ stars.clear();+ if( player == NULL )+ return;++ // a script can disable a level, which leaves its points required at -1: a rank with no way on+ // counts as full, where the bar's own drawing divided by it+ const Int span = player->getSkillPointsLevelUp() - player->getSkillPointsLevelDown();+ const Int progress = span > 0 ? ( player->getSkillPoints() - player->getSkillPointsLevelDown() ) * FULL / span : FULL;+ const Int lit = min( (Int)EXPERIENCE_CELLS, max( 0, progress ) * EXPERIENCE_CELLS / FULL );+ const Int column = height - 2 * FRAME_LIP;+ for( Int cell = 0; cell < EXPERIENCE_CELLS && column > 0; cell++ )+ {+ // cell 0 is the bottom one; each is cut from the column so they add up to it exactly, and its+ // segment is a pixel shorter, the black line over it+ enum { CELL_GAP = 1 };+ const Int top = column - ( cell + 1 ) * column / EXPERIENCE_CELLS;+ const Int cellHeight = column - cell * column / EXPERIENCE_CELLS - top;+ HtmlValues entry;+ entry[ "lit" ] = cell < lit ? "lit" : "";+ entry[ "y" ] = std::to_string( top );+ entry[ "h" ] = std::to_string( cellHeight );+ entry[ "segh" ] = std::to_string( max( 0, cellHeight - CELL_GAP ) );+ cells.push_back( entry );+ }++ for( Int rank = 1; rank <= TheRankInfoStore->getRankLevelCount(); rank++ )+ {+ HtmlValues entry;+ entry[ "lit" ] = rank <= player->getRankLevel() ? "lit" : "";+ stars.push_back( entry );+ }+}+/** The bar's windows the page stands down altogether. The menu and idle worker buttons are the* page's own, pressed through data-click="press:Name" because they sit where the bar's frame takes* no clicks; the chat button is gone, and Enter still opens the chat; the minimise button is gone,@@ -10296,22 +10349,20 @@ static void placeSignalAtView( const std::string &kind )static const char *const CONTROL_BAR_LEFT[] = { "LeftHUD", NULL };static const char *const CONTROL_BAR_RIGHT[] = { "RightHUD", "GeneralsExp", "ExpBarForeground", NULL };static const char *const CONTROL_BAR_CENTRE[] = { "ObserverPlayerListWindow", "ButtonPlaceBeacon", NULL };+static const char *const CONTROL_BAR_EXPERIENCE[] = { "GeneralsExp", "ExpBarForeground", NULL };static const Int COMMAND_BUTTONS = 14; ///< ButtonCommand01 to 14, the grid a player sees-/** The promotion button, small, on the right panel's border beside the page's own skills button,- * which takes the outermost place. 800x600 pixels. */+/** The pieces standing round the panels, 800x600 pixels. */enum{- CORNER_BUTTON_WIDTH = 32,- CORNER_BUTTON_GAP = 2,+ STARS_TAB_WIDTH = 62, ///< the rank's stars, a tab on the right panel's border, which is the promotion buttonSKILL_GRID_WIDTH = 150, ///< the general's powers, three to a row, against the screen's right edge- SKILL_GRID_GAP = 30, ///< between them and the skills button+ SKILL_GRID_GAP = 30, ///< between them and the stars' tabSIGNAL_BUTTON_SIZE = 24, ///< each smoke signal button's height, a row of the columnSIGNAL_BUTTON_WIDTH = 40, ///< and its width, room for its pictureSIGNAL_BUTTONS = 3, ///< attack, defend, lookSKILL_GRID_ROWS = 3, ///< the empty places drawn behind the powersSKILL_GRID_COLUMNS = 3,- SKILLS_BUTTON_WIDTH = 58, ///< wide enough for its name in either languageALERT_TAB_WIDTH = 54, ///< the under-attack light, a lamp on the radar panel's borderWORKER_TAB_WIDTH = 39, ///< the idle worker's step, against the command grid panel's border, as wide as the signals' columnWORKER_STEP_HEIGHT = 30, ///< and its height, its key's bottom GRID_BOTTOM_GAP over the screen's bottom edge@@ -10319,7 +10370,6 @@ enum///< the grid's two pixel well and four of steel under it; at 4 the well's lit///< bottom edge sat on the screen's last row and the grid looked cut off};-static const char *const SKILLS_FOLDED = "skills"; ///< the flip the skills button toggles; flipped is folded awaystatic const UnsignedInt SIGNAL_RISE_MS = 360; ///< each smoke signal button's climb out of the screen's bottom edgestatic const UnsignedInt SIGNAL_RISE_STAGGER_MS = 90; ///< between one button starting and the next@@ -10336,7 +10386,6 @@ static void putSignalRise( HtmlValues &values, UnsignedInt elapsedMs )values[ "signal" + std::to_string( button ) + ".drop" ] = std::to_string( REAL_TO_INT( remaining * SIGNAL_BUTTON_SIZE * SIGNAL_BUTTONS ) );}}-static const char *const CORNER_BUTTONS[] = { "ButtonGeneral" };static void drawNothing( GameWindow *window, WinInstanceData *instData ){@@ -10665,8 +10714,6 @@ Bool InGameUI::drawControlBarPage( const IRegion2D *panels, const Bool *shown, Ivalues[ "promotion" ] = !watching && TheControlBar->isGeneralStarFlashing() ? "ready" : "";values[ "watching" ] = watching ? "watching" : "";values.insert( m_hudValues.begin(), m_hudValues.end() );- for( std::set< std::string >::const_iterator name = m_controlBarFlipped.begin(); name != m_controlBarFlipped.end(); ++name )- values[ FLIP_ACTION + *name ] = "flipped";values[ "blink" ] = TheGameLogic->getFrame() % LOGICFRAMES_PER_SECOND > LOGICFRAMES_PER_SECOND / 2 ? "lit" : "";for( Int panel = 0; panel < panelCount; panel++ )putPageRect( values, "panel" + std::to_string( panel ), panels[ panel ], shown[ panel ] );@@ -10728,24 +10775,24 @@ Bool InGameUI::drawControlBarPage( const IRegion2D *panels, const Bool *shown, Iconst IRegion2D rightBox = framed( content, border, FALSE, TRUE );putFrame( values, "right", content, rightBox, rightFound && rightShown );- // the page's skills button stands on the right panel's border at its right hand end, and the- // promotion button beside it; a bar with no portrait showing leaves the promotion button where it was- const Int cornerWidth = REAL_TO_INT( CORNER_BUTTON_WIDTH * scale );- const Int cornerGap = REAL_TO_INT( CORNER_BUTTON_GAP * scale );- const IRegion2D skills = tabOn( rightBox, SKILLS_BUTTON_WIDTH, TRUE );- const Int cornerHeight = skills.hi.y - skills.lo.y;- putPageRect( values, "skillsbutton", skills, rightFound && rightShown );-- // the general's powers ready to fire, three to a row over the right panel, while the skills- // button has not folded them away+ // the experience bar's groove down the column the bar's own window and its foreground picture+ // shared, the medal on top included, and the rank's stars in a tab on the panel's border at its+ // right hand end, the way the under-attack light stands on the radar's at its left+ IRegion2D experience;+ const Bool experienceFound = controlBarUnion( CONTROL_BAR_EXPERIENCE, experience );+ putPageRect( values, "expframe", experience, experienceFound && rightFound && rightShown );+ putExperienceBar( values, lists[ "expcells" ], lists[ "rankstars" ] );+ const IRegion2D starsTab = tabOn( rightBox, STARS_TAB_WIDTH, TRUE );+ putPageRect( values, "starstab", starsTab, rightFound && rightShown );++ // the general's powers ready to fire, three to a row over the right panelIRegion2D powers;powers.hi.x = TheDisplay->getWidth();powers.lo.x = powers.hi.x - REAL_TO_INT( SKILL_GRID_WIDTH * scale );- powers.hi.y = skills.lo.y - REAL_TO_INT( SKILL_GRID_GAP * scale );+ powers.hi.y = starsTab.lo.y - REAL_TO_INT( SKILL_GRID_GAP * scale );powers.lo.y = powers.hi.y;- const Bool powersOpen = m_controlBarFlipped.find( SKILLS_FOLDED ) == m_controlBarFlipped.end();ICoord2D cell;- TheControlBar->placeSpecialPowerShortcutGrid( powersOpen && rightFound ? &powers : NULL, &cell );+ TheControlBar->placeSpecialPowerShortcutGrid( rightFound ? &powers : NULL, &cell );// the grid's empty places, three by three, drawn behind the powers the way the command grid's// well stands behind its buttons@@ -10765,25 +10812,16 @@ Bool InGameUI::drawControlBarPage( const IRegion2D *panels, const Bool *shown, I}}- if( rightFound )+ // the promotion button is the stars' tab: its window moves under the tab and takes the click that+ // opens the promotion screen+ GameWindow *promotion = controlBarWindow( "ButtonGeneral" );+ if( rightFound && promotion ){- const Int width = cornerWidth;- const Int height = cornerHeight;- Int x = skills.lo.x - cornerGap;- for( Int each = 0; each < (Int)ARRAY_SIZE( CORNER_BUTTONS ); each++ )- {- GameWindow *button = controlBarWindow( CORNER_BUTTONS[ each ] );- if( button == NULL )- continue;-- x -= width;- Int parentX = 0, parentY = 0;- if( button->winGetParent() )- button->winGetParent()->winGetScreenPosition( &parentX, &parentY );- button->winSetPosition( x - parentX, skills.lo.y - parentY );- button->winSetSize( width, height );- x -= cornerGap;- }+ Int parentX = 0, parentY = 0;+ if( promotion->winGetParent() )+ promotion->winGetParent()->winGetScreenPosition( &parentX, &parentY );+ promotion->winSetPosition( starsTab.lo.x - parentX, starsTab.lo.y - parentY );+ promotion->winSetSize( starsTab.hi.x - starsTab.lo.x, starsTab.hi.y - starsTab.lo.y );}for( Int each = 0; each < (Int)ARRAY_SIZE( CONTROL_BAR_WINDOWS ); each++ )@@ -10832,13 +10870,6 @@ Bool InGameUI::handleControlBarPageClick( const ICoord2D *mouse, Bool act )return FALSE;const std::string action = m_controlBarOverlay->click( *mouse );- if( action.compare( 0, FLIP_ACTION.size(), FLIP_ACTION ) == 0 )- {- const std::string name = action.substr( FLIP_ACTION.size() );- if( act && m_controlBarFlipped.erase( name ) == 0 )- m_controlBarFlipped.insert( name );- return TRUE;- }if( action.compare( 0, SIGNAL_ACTION.size(), SIGNAL_ACTION ) == 0 ){if( act )