mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Added ChangeKeywordModeAction;
Hopefully fixed the 'Invalid multibyte character' build error on linux (I was using left/right-angle-brackets in string constants); Fixed 'cost' keywords; git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@263 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -190,3 +190,17 @@ void KeywordReminderTextValue::highlight(const String& code, const vector<Script
|
||||
// set
|
||||
value = new_value;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Changing keywords : mode
|
||||
|
||||
ChangeKeywordModeAction::ChangeKeywordModeAction(Keyword& keyword, const String& new_mode)
|
||||
: keyword(keyword), mode(new_mode)
|
||||
{}
|
||||
|
||||
String ChangeKeywordModeAction::getName(bool to_undo) const {
|
||||
return _("Keyword mode");
|
||||
}
|
||||
|
||||
void ChangeKeywordModeAction::perform(bool to_undo) {
|
||||
swap(keyword.mode, mode);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,15 @@ class KeywordReminderTextValue : public KeywordTextValue {
|
||||
|
||||
/// Changing the mode of a keyword
|
||||
class ChangeKeywordModeAction : public Action {
|
||||
public:
|
||||
ChangeKeywordModeAction(Keyword& keyword, const String& new_mode);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
|
||||
//private:
|
||||
Keyword& keyword;
|
||||
String mode;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
|
||||
Reference in New Issue
Block a user