diff --git a/rsrc/dialogs/cast-spell.xml b/rsrc/dialogs/cast-spell.xml index b24dda7d7..448104671 100644 --- a/rsrc/dialogs/cast-spell.xml +++ b/rsrc/dialogs/cast-spell.xml @@ -36,44 +36,44 @@ Pick spell to cast. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Caster: Target: HP: SP: Status: diff --git a/rsrc/dialogs/choose-bg.xml b/rsrc/dialogs/choose-bg.xml index 40a21f5dd..b20feef86 100644 --- a/rsrc/dialogs/choose-bg.xml +++ b/rsrc/dialogs/choose-bg.xml @@ -4,28 +4,28 @@ Select background pattern: - Dark grey stone - Black texture - Grey stone with blue veins - Pink stone with white veins - Rough dark grey stone - Black stone / Basalt - White stone / Chalk - Light grey stone - Wood mosaic / parquet floor - Dark / petrified wood - Medium stone / Granite + Dark grey stone + Black texture + Grey stone with blue veins + Pink stone with white veins + Rough dark grey stone + Black stone / Basalt + White stone / Chalk + Light grey stone + Wood mosaic / parquet floor + Dark / petrified wood + Medium stone / Granite - Checkerboard - Grey marble - Mosaic tiles - Veined rock / Marble - Pitted / Cracked stone - Light grey stone with highlights - White marble - Reddish-grey texture - Light wood grain - Sandstone + Checkerboard + Grey marble + Mosaic tiles + Veined rock / Marble + Pitted / Cracked stone + Light grey stone with highlights + White marble + Reddish-grey texture + Light wood grain + Sandstone diff --git a/rsrc/dialogs/choose-pict.xml b/rsrc/dialogs/choose-pict.xml index b636803fe..5ee264f34 100644 --- a/rsrc/dialogs/choose-pict.xml +++ b/rsrc/dialogs/choose-pict.xml @@ -4,42 +4,42 @@ Select a graphic: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rsrc/dialogs/choose-string.xml b/rsrc/dialogs/choose-string.xml index 766eda388..a367b4241 100644 --- a/rsrc/dialogs/choose-string.xml +++ b/rsrc/dialogs/choose-string.xml @@ -4,46 +4,46 @@ Select: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Really reset instant help messages? + + diff --git a/rsrc/dialogs/edit-item-abils.xml b/rsrc/dialogs/edit-item-abils.xml index 4ade2c1a9..25b04a5d4 100644 --- a/rsrc/dialogs/edit-item-abils.xml +++ b/rsrc/dialogs/edit-item-abils.xml @@ -29,28 +29,28 @@ Item use properties - Help single PC - Harm single PC - Help whole party - Harm whole party + Help single PC + Harm single PC + Help whole party + Harm whole party Other properties: - Always identified - Magical - Cursed - Conceal ability - Shops won't buy - Rechargeable + Always identified + Magical + Cursed + Conceal ability + Shops won't buy + Rechargeable Item treasure class: (0 is lowest level of treasure, 4 is highest) - Type 0: Junk, Not left - Type 1: Lousy, 1 - 20 gp - Type 2: So-so, 20-200 gp - Type 3: Good, 200+ gp - Type 4: Great, 2500+ gp - Type 5: Unique/Rare, Not left + Type 0: Junk, Not left + Type 1: Lousy, 1 - 20 gp + Type 2: So-so, 20-200 gp + Type 3: Good, 200+ gp + Type 4: Great, 2500+ gp + Type 5: Unique/Rare, Not left diff --git a/rsrc/dialogs/edit-item.xml b/rsrc/dialogs/edit-item.xml index 91ec9329f..62440ac44 100644 --- a/rsrc/dialogs/edit-item.xml +++ b/rsrc/dialogs/edit-item.xml @@ -24,37 +24,37 @@ NOTE: All these LEDs have been shifted 100 pixels left to account for the labels swapping sides --> - No Item - 1-Hand weapon - 2-Hand weapon - Gold - Bow - Arrows - Thrown missile - Potion/Magic Item - Scroll/Magic Item - Wand - Tool - Food - Shield - Armor - Helm - Gloves + No Item + 1-Hand weapon + 2-Hand weapon + Gold + Bow + Arrows + Thrown missile + Potion/Magic Item + Scroll/Magic Item + Wand + Tool + Food + Shield + Armor + Helm + Gloves - Shield 2 - Boots - Ring - Necklace - Weapon Poison - Non-Use Object - Pants - Crossbow - Bolts - Missile (no ammo) - Special Item - Quest + Shield 2 + Boots + Ring + Necklace + Weapon Poison + Non-Use Object + Pants + Crossbow + Bolts + Missile (no ammo) + Special Item + Quest Edit an Item Type diff --git a/rsrc/dialogs/edit-monster-abils.xml b/rsrc/dialogs/edit-monster-abils.xml index a81622e87..a0a67396f 100644 --- a/rsrc/dialogs/edit-monster-abils.xml +++ b/rsrc/dialogs/edit-monster-abils.xml @@ -14,9 +14,9 @@ Poison: - Mindless - Amorphous - Invulnerable + Mindless + Amorphous + Invulnerable Edit Monster Abilities Monster number: @@ -47,16 +47,16 @@ Summon type: - Weak (no summon) - Type 1 - Type 2 - Type 3 - Unique (no summon) + Weak (no summon) + Type 1 + Type 2 + Type 3 + Unique (no summon) - + This monster is naturally and permanently invisible. - + This monster is a guard - when the town goes hostile, it will hunt the party down. Special node to call when monster first seen diff --git a/rsrc/dialogs/edit-monster.xml b/rsrc/dialogs/edit-monster.xml index cfa58ae1c..dfd7a94d5 100644 --- a/rsrc/dialogs/edit-monster.xml +++ b/rsrc/dialogs/edit-monster.xml @@ -33,10 +33,10 @@ - Friendly, Docile - Hostile, Type A - Friendly, Will Fight - Hostile, Type B + Friendly, Docile + Hostile, Type A + Friendly, Will Fight + Hostile, Type B diff --git a/rsrc/dialogs/edit-outdoor-details.xml b/rsrc/dialogs/edit-outdoor-details.xml index a520b753a..3c17ac250 100644 --- a/rsrc/dialogs/edit-outdoor-details.xml +++ b/rsrc/dialogs/edit-outdoor-details.xml @@ -11,10 +11,10 @@ Ambient Sound: - None - Drips - Birdsong - Custom + None + Drips + Birdsong + Custom Background: (-1 = scenario default) diff --git a/rsrc/dialogs/edit-placed-item.xml b/rsrc/dialogs/edit-placed-item.xml index bcff797c5..267f33e62 100644 --- a/rsrc/dialogs/edit-placed-item.xml +++ b/rsrc/dialogs/edit-placed-item.xml @@ -15,9 +15,9 @@ Special Flags: - Always here - Someone's property - Contained in something + Always here + Someone's property + Contained in something Item number: diff --git a/rsrc/dialogs/edit-quest.xml b/rsrc/dialogs/edit-quest.xml index 6a841e0db..e301c7c05 100644 --- a/rsrc/dialogs/edit-quest.xml +++ b/rsrc/dialogs/edit-quest.xml @@ -18,9 +18,9 @@ Gold: - Deadline is relative to start day - Player is given quest when scenario starts - Include in a job bank: + Deadline is relative to start day + Player is given quest when scenario starts + Include in a job bank: @@ -49,8 +49,8 @@ Default backgrounds:
Set the default patterns to be shown behind the game screen.
- - - - + + + + diff --git a/rsrc/dialogs/edit-shop.xml b/rsrc/dialogs/edit-shop.xml index 4db5523a6..226fdacdf 100644 --- a/rsrc/dialogs/edit-shop.xml +++ b/rsrc/dialogs/edit-shop.xml @@ -13,21 +13,21 @@
Shop type: - Standard shop (living only) - Healing/Alchemy (dead can shop) - Randomly generated + Standard shop (living only) + Healing/Alchemy (dead can shop) + Randomly generated Message to show: - Shopping - Healing - Mage Spells - Priest Spells - Mixed Spells - Alchemy - Training + Shopping + Healing + Mage Spells + Priest Spells + Mixed Spells + Alchemy + Training - diff --git a/rsrc/dialogs/edit-terrain.xml b/rsrc/dialogs/edit-terrain.xml index c7dd5d9ff..34779c7d9 100644 --- a/rsrc/dialogs/edit-terrain.xml +++ b/rsrc/dialogs/edit-terrain.xml @@ -16,24 +16,24 @@ Terrain blockage: - Clear - Walk through, opaque - Clear, special - Clear, blocked - Blocked, obstructed - Blocked, opaque + Clear + Walk through, opaque + Clear, special + Clear, blocked + Blocked, obstructed + Blocked, opaque - Can fly over? - Can boat over? - Blocked to horses? - Archetype? + Can fly over? + Can boat over? + Blocked to horses? + Archetype? Step sound: - Footstep - Squish - Crunch - Silence - Big Splash + Footstep + Squish + Crunch + Silence + Big Splash Shortcut key: @@ -53,30 +53,30 @@ Special properties: - None - Change when step on - Damaging terrain - Is a bridge - Change while occupied - Dangerous terrain - Reserved - Crumbling terrain - Lockable terrain - Unlockable terrain - Reserved - Is a sign - Call special when step - Reserved - Is a container - Wilderness (Caves) - Wilderness (Surface) - Waterfall (Caves) - Waterfall (Surface) - Conveyor Belt - Blocked to monsters - Town entrance - Change when used - Call special when used + None + Change when step on + Damaging terrain + Is a bridge + Change while occupied + Dangerous terrain + Reserved + Crumbling terrain + Lockable terrain + Unlockable terrain + Reserved + Is a sign + Call special when step + Reserved + Is a container + Wilderness (Caves) + Wilderness (Surface) + Waterfall (Caves) + Waterfall (Surface) + Conveyor Belt + Blocked to monsters + Town entrance + Change when used + Call special when used Extra values: *flag1 diff --git a/rsrc/dialogs/edit-town-advanced.xml b/rsrc/dialogs/edit-town-advanced.xml index e343120e0..d50995aa2 100644 --- a/rsrc/dialogs/edit-town-advanced.xml +++ b/rsrc/dialogs/edit-town-advanced.xml @@ -39,30 +39,30 @@ Exit town specials: (These are the numbers of the town special nodes to call when the party tries to leave town in the given direction.)
- - - - - - - + + + + + + + Top Left Bottom Right X Y - + - + Town Properties: - + Town hidden? (Can't be seen until it's made visible with a special encounter.) - No automap in this town - Defy scrying (Magic Map doesn't work) - Magical barriers are stronger in this town - You can create new PCs in this town + No automap in this town + Defy scrying (Magic Map doesn't work) + Magical barriers are stronger in this town + You can create new PCs in this town diff --git a/rsrc/dialogs/edit-townperson-advanced.xml b/rsrc/dialogs/edit-townperson-advanced.xml index 84e6b5bdf..058a68f99 100644 --- a/rsrc/dialogs/edit-townperson-advanced.xml +++ b/rsrc/dialogs/edit-townperson-advanced.xml @@ -40,15 +40,15 @@ Creature timing: - Always here - Appear on given day - Disappear on day - Sometimes here A - Sometimes here B - Sometimes here C - Appear when event - Disappear when event - Appear after town dies + Always here + Appear on given day + Disappear on day + Sometimes here A + Sometimes here B + Sometimes here C + Appear when event + Disappear when event + Appear after town dies diff --git a/rsrc/dialogs/edit-townperson.xml b/rsrc/dialogs/edit-townperson.xml index 1ec9a5b67..2e4bd106d 100644 --- a/rsrc/dialogs/edit-townperson.xml +++ b/rsrc/dialogs/edit-townperson.xml @@ -15,14 +15,14 @@ Editing a townsperson/monster - Friendly, Docile - Hostile, Type A - Friendly, Will Fight - Hostile, Type B + Friendly, Docile + Hostile, Type A + Friendly, Will Fight + Hostile, Type B - No - Yes + No + Yes diff --git a/rsrc/dialogs/edit-vehicle.xml b/rsrc/dialogs/edit-vehicle.xml index dbe393dbc..cb850722b 100644 --- a/rsrc/dialogs/edit-vehicle.xml +++ b/rsrc/dialogs/edit-vehicle.xml @@ -13,7 +13,7 @@ Location - Not Party Property + Not Party Property diff --git a/rsrc/dialogs/item-info.xml b/rsrc/dialogs/item-info.xml index 4ff13661e..4c9740c08 100644 --- a/rsrc/dialogs/item-info.xml +++ b/rsrc/dialogs/item-info.xml @@ -26,8 +26,8 @@ diff --git a/rsrc/dialogs/pref-scenario.xml b/rsrc/dialogs/pref-scenario.xml index 31f1cbe37..ca5070c2d 100644 --- a/rsrc/dialogs/pref-scenario.xml +++ b/rsrc/dialogs/pref-scenario.xml @@ -5,15 +5,15 @@ BoE Scenario Editor Preferences - No Sounds + No Sounds Scale UI: - 1 - 1.5 - 2 - 3 - 4 - + 1 + 1.5 + 2 + 3 + 4 + diff --git a/rsrc/dialogs/preferences.xml b/rsrc/dialogs/preferences.xml index 9a792f5fd..0d1eabbbc 100644 --- a/rsrc/dialogs/preferences.xml +++ b/rsrc/dialogs/preferences.xml @@ -5,56 +5,52 @@ Blades of Exile Preferences - Display alignment: - + Display alignment: + - Top Left - Top Right - Center - Bottom Left - Bottom Right - Small Window (not full screen) + Top Left + Top Right + Center + Bottom Left + Bottom Right + Small Window (not full screen) - Game speed: - - Fast - Medium - Slow - Quite Slow - - For older machines: - - No graphics frills (lose special effects) - - Turn off terrain animation - Turn of frills on shore - No Sounds - Show room descriptions more than once - Never show instant help - - Reset instant help (all help windows will reappear) - - Make game easier (monsters much weaker) - Fewer wandering monsters - Skip splash screen on startup - Scale UI: + Scale: + UI - 1 - 1.5 - 2 - 3 - 4 - + 1 + 1.5 + 2 + 3 + 4 + - Scale Map: + Minimap - 1 - 1.5 - 2 - 3 - 4 - + 1 + 1.5 + 2 + 3 + 4 + - - + Game speed: + + Fast + Medium + Slow + Quite Slow + + Miscellaneous: + No Sounds + Show room descriptions more than once + Make game easier (monsters much weaker) + Fewer wandering monsters + Skip splash screen on startup + Never show instant help + + + diff --git a/rsrc/dialogs/tip-of-day.xml b/rsrc/dialogs/tip-of-day.xml index d6e2cab72..f13dd6d91 100644 --- a/rsrc/dialogs/tip-of-day.xml +++ b/rsrc/dialogs/tip-of-day.xml @@ -6,5 +6,5 @@ Tip of the Day: - See tips upon startup + See tips upon startup diff --git a/rsrc/schemas/dialog.xsd b/rsrc/schemas/dialog.xsd index 653c44b45..43ab88572 100644 --- a/rsrc/schemas/dialog.xsd +++ b/rsrc/schemas/dialog.xsd @@ -63,6 +63,12 @@ + + + + + + @@ -207,6 +213,7 @@ + @@ -229,6 +236,7 @@ + diff --git a/src/dialogxml/widgets/button.cpp b/src/dialogxml/widgets/button.cpp index 5dcb5df43..da8e42c4b 100644 --- a/src/dialogxml/widgets/button.cpp +++ b/src/dialogxml/widgets/button.cpp @@ -21,20 +21,32 @@ cButton::cButton(sf::RenderWindow& parent) : cControl(CTRL_BTN,parent), wrapLabel(false), type(BTN_REG), + textSize(defaultTextSize(type)), textClr(sf::Color::Black), - fromList("none") {} + fromList("none") { +} cButton::cButton(cDialog& parent) : cControl(CTRL_BTN,parent), wrapLabel(false), type(BTN_REG), + textSize(defaultTextSize(type)), textClr(parent.getDefTextClr()), - fromList("none") {} + fromList("none") { +} +/* This constructor is only called for LEDs. */ cButton::cButton(cDialog& parent,eControlType t) : cControl(t,parent), fromList("none"), - wrapLabel(false) {/* This constructor is only called for LEDs. */} + wrapLabel(false) { +} + +short cButton::defaultTextSize(eBtnType type) { + if(type == BTN_TINY) return 9; + else if(type == BTN_PUSH) return 10; + else return 12; +} bool cButton::isClickable() const { return true; @@ -48,6 +60,8 @@ bool cButton::isScrollable() const { return false; } +const int TINY_TEXT_OFFSET = 18; + void cButton::draw(){ rectangle from_rect, to_rect; @@ -55,9 +69,7 @@ void cButton::draw(){ if(visible){ TextStyle style; - if(type == BTN_TINY) style.pointSize = 9; - else if(type == BTN_PUSH) style.pointSize = 10; - else style.pointSize = 12; + style.pointSize = textSize; from_rect = btnRects[type][depressed]; to_rect = frame; if(type == BTN_TINY) { @@ -70,7 +82,7 @@ void cButton::draw(){ eTextMode textMode = eTextMode::CENTRE; if(type == BTN_TINY) { textMode = wrapLabel ? eTextMode::WRAP : eTextMode::LEFT_TOP; - to_rect.left += 18; + to_rect.left += TINY_TEXT_OFFSET; style.colour = textClr; } else if(type == BTN_PUSH) { to_rect.top += 42; @@ -116,7 +128,7 @@ bool cButton::manageFormat(eFormat prop, bool set, boost::any* val) { bool cButton::parseAttribute(ticpp::Attribute& attr, std::string tagName, std::string fname) { std::string name = attr.Name(); - if(name == "type") { + if(name == "type"){ std::string val = attr.Value(); if(val == "small") setBtnType(BTN_SM); else if(val == "regular") setBtnType(BTN_REG); @@ -133,11 +145,16 @@ bool cButton::parseAttribute(ticpp::Attribute& attr, std::string tagName, std::s else if(val == "push") setBtnType(BTN_PUSH); else throw xBadVal(tagName, name, val, attr.Row(), attr.Column(), fname); return true; - } else if(name == "def-key") { + }else if(name == "text-size"){ + std::string val = attr.Value(); + short size = std::stoi(val); + textSize = size; + return true; + }else if(name == "def-key"){ std::string val = attr.Value(); - try { + try{ attachKey(parseKey(val)); - } catch(int) { + }catch(int){ throw xBadVal(tagName, name, val, attr.Row(), attr.Column(), fname); } return true; @@ -161,16 +178,22 @@ static const std::set labelledButtons{BTN_TINY, BTN_LED, BTN_PUSH}; void cButton::validatePostParse(ticpp::Element& elem, std::string fname, const std::set& attrs, const std::multiset& elems) { cControl::validatePostParse(elem, fname, attrs, elems); if(getType() == CTRL_BTN && !attrs.count("type")) throw xMissingAttr(elem.Value(), "type", elem.Row(), elem.Column(), fname); + if(type == BTN_PUSH && !getText().empty() && !attrs.count("width")) + throw xMissingAttr(elem.Value(), "width", elem.Row(), elem.Column(), fname); if(labelledButtons.count(type)) { if(!attrs.count("color") && !attrs.count("colour") && parent->getBg() == cDialog::BG_DARK) setColour(sf::Color::White); - if(!getText().empty() && !attrs.count("width")) - throw xMissingAttr(elem.Value(), "width", elem.Row(), elem.Column(), fname); } } location cButton::getPreferredSize() const { - return {btnRects[type][0].width(), btnRects[type][0].height()}; + int width = btnRects[type][0].width(); + if(type == BTN_TINY && !getText().empty()){ + TextStyle style; + style.pointSize = textSize; + width = TINY_TEXT_OFFSET + string_length(getText(), style); + } + return {width, btnRects[type][0].height()}; } void cButton::recalcRect() { diff --git a/src/dialogxml/widgets/button.hpp b/src/dialogxml/widgets/button.hpp index 91be9a766..177ac4581 100644 --- a/src/dialogxml/widgets/button.hpp +++ b/src/dialogxml/widgets/button.hpp @@ -74,9 +74,12 @@ class cButton : public cControl { cButton(cDialog& parent,eControlType t); private: bool manageFormat(eFormat prop, bool set, boost::any* val) override; + static short defaultTextSize(eBtnType type); std::string fromList; static rectangle btnRects[13][2]; protected: + /// Size of the button's descriptive text + short textSize; /// Determines whether the button's label should be word wrapped. bool wrapLabel; /// The button's text colour; only used by LED and tiny buttons diff --git a/src/dialogxml/widgets/led.cpp b/src/dialogxml/widgets/led.cpp index 87513e7c9..a0210f270 100644 --- a/src/dialogxml/widgets/led.cpp +++ b/src/dialogxml/widgets/led.cpp @@ -28,8 +28,8 @@ void cLed::init(){ cLed::cLed(cDialog& parent) : cButton(parent,CTRL_LED), state(led_off), - textFont(FONT_BOLD), - textSize(10) { + textFont(FONT_BOLD) { + textSize = 10; type = BTN_LED; using namespace std::placeholders; attachEventHandler(std::bind(&cLed::defaultClickHandler, this, _1, _2, _3)); @@ -86,6 +86,8 @@ bool cLed::manageFormat(eFormat prop, bool set, boost::any* val) { return true; } +const int LED_TEXT_SPACE = 4; // Possibly could be 6 + void cLed::draw(){ rectangle from_rect, to_rect; @@ -96,15 +98,27 @@ void cLed::draw(){ style.pointSize = textSize; style.lineHeight = textSize - 1; style.font = textFont; + style.colour = textClr; from_rect = ledRects[state][depressed]; to_rect = frame; - to_rect.right = to_rect.left + 14; - to_rect.bottom = to_rect.top + 10; - rect_draw_some_item(*ResMgr::graphics.get(buttons[btnGW[BTN_LED]]),from_rect,*inWindow,to_rect); - style.colour = textClr; - to_rect.right = frame.right; - to_rect.left = frame.left + 18; // Possibly could be 20 - win_draw_string(*inWindow,to_rect,getText(),wrapLabel ? eTextMode::WRAP : eTextMode::LEFT_TOP,style); + int text_width = string_length(getText(), style); + if(textOnRight){ + to_rect.right = to_rect.left + from_rect.width(); + to_rect.bottom = to_rect.top + from_rect.height(); + rect_draw_some_item(*ResMgr::graphics.get(buttons[btnGW[BTN_LED]]),from_rect,*inWindow,to_rect); + }else{ + to_rect.right = text_width; + win_draw_string(*inWindow,to_rect,getText(),wrapLabel ? eTextMode::WRAP : eTextMode::LEFT_TOP,style); + } + if(textOnRight){ + to_rect.left = frame.left + from_rect.width() + LED_TEXT_SPACE; + to_rect.right = frame.right; + win_draw_string(*inWindow,to_rect,getText(),wrapLabel ? eTextMode::WRAP : eTextMode::LEFT_TOP,style); + }else{ + to_rect.left = frame.left + text_width + LED_TEXT_SPACE; + to_rect.right = to_rect.left + from_rect.width(); + rect_draw_some_item(*ResMgr::graphics.get(buttons[btnGW[BTN_LED]]),from_rect,*inWindow,to_rect); + } } inWindow->setActive(); @@ -134,13 +148,16 @@ eLedState cLed::getState() const { } bool cLed::parseAttribute(ticpp::Attribute& attr, std::string tagName, std::string fname) { - if(attr.Name() == "state") { + if(attr.Name() == "state"){ std::string val = attr.Value(); if(val == "red") setState(led_red); else if(val == "green") setState(led_green); else if(val == "off") setState(led_off); else throw xBadVal(tagName, attr.Name(), val, attr.Row(), attr.Column(), fname); return true; + }else if(attr.Name() == "text-side"){ + textOnRight = (attr.Value() == "right"); + return true; } return cButton::parseAttribute(attr, tagName, fname); } @@ -152,5 +169,11 @@ bool cLed::parseContent(ticpp::Node& content, int n, std::string tagName, std::s } location cLed::getPreferredSize() const { - return {ledRects[0][0].width(), ledRects[0][0].height()}; + int width = ledRects[0][0].width(); + if(!getText().empty()){ + TextStyle style; + style.pointSize = textSize; + width = LED_TEXT_SPACE + ledRects[state][depressed].width() + string_length(getText(), style); + } + return {width, ledRects[0][0].height()}; } diff --git a/src/dialogxml/widgets/led.hpp b/src/dialogxml/widgets/led.hpp index 7223f6c36..21f2d3233 100644 --- a/src/dialogxml/widgets/led.hpp +++ b/src/dialogxml/widgets/led.hpp @@ -60,7 +60,7 @@ class cLed : public cButton { bool manageFormat(eFormat prop, bool set, boost::any* val) override; eLedState state; eFont textFont; - short textSize; + bool textOnRight = true; static rectangle ledRects[3][2]; }; diff --git a/src/doxy/mainpage.md b/src/doxy/mainpage.md index eddf4d582..bcaf0329d 100644 --- a/src/doxy/mainpage.md +++ b/src/doxy/mainpage.md @@ -109,6 +109,7 @@ The `