diff options
author | Ton Roosendaal <ton@blender.org> | 2005-11-20 13:04:45 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-11-20 13:04:45 +0300 |
commit | 77332fa698fb79cc1d0c1539161e0e85c93b68f7 (patch) | |
tree | b02b7ce3c8245c51ff96eb4f45d4532846e8ff78 /source/blender/src/resources.c | |
parent | a86b0af575c6dad58b8c6ef223d20f5e76a055ed (diff) |
Patch by Matt Ebb: upgraded usablitiy of text button.
Textbuttons now allow a selection too (like any textbutton in other UIs).
By default, on activating a textbutton, the entire button text is selected
when you enter the button. A single arrowkey or LMB click reveils the
cursor then. Here's more user notes:
LMB click: If inside the button, places the text cursor at the clicked
position. If outside the button, confirms/finishes editing
LMB drag: Selects the text between the start and end point of the drag.
Backspace: Deletes selected text, or backspaces a character
Shift Backspace: Deletes all, as before.
Delete: Deletes selected text or forward deletes a character
Shift LeftArrow: Extends the selection left
Shift RightArrow: Extends the selection right
LeftArrow: If there's a selection, move the cursor to the left edge of the
selection, otherwise move the cursor left a character.
RightArrow: If there's a selection, move the cursor to the right edge of
the selection, otherwise move the cursor right a character.
UpArrow/Home: Move the cursor to the beginning of the line
DownArrow/End: Move the cursor to the end of the line
Ctrl Left arrow and Ctrl Right arrow to jump between directory separators
Diffstat (limited to 'source/blender/src/resources.c')
-rw-r--r-- | source/blender/src/resources.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/src/resources.c b/source/blender/src/resources.c index 6075b5e1d59..078bcec2aaa 100644 --- a/source/blender/src/resources.c +++ b/source/blender/src/resources.c @@ -674,6 +674,8 @@ char *BIF_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) cp= btheme->tui.num; break; case TH_BUT_TEXTFIELD: cp= btheme->tui.textfield; break; + case TH_BUT_TEXTFIELD_HI: + cp= btheme->tui.textfield_hi; break; case TH_BUT_POPUP: cp= btheme->tui.popup; break; case TH_BUT_TEXT: @@ -872,6 +874,7 @@ void BIF_InitTheme(void) SETCOL(btheme->tui.setting2, 0xA1,0x99,0xA7, 255); SETCOL(btheme->tui.num, 0x90,0x90,0x90, 255); SETCOL(btheme->tui.textfield, 0x90,0x90,0x90, 255); + SETCOL(btheme->tui.textfield_hi,0xc6,0x77,0x77, 255); SETCOL(btheme->tui.popup, 0xA0,0xA0,0xA0, 255); SETCOL(btheme->tui.text, 0,0,0, 255); @@ -1038,6 +1041,7 @@ char *BIF_ThemeColorsPup(int spacetype) sprintf(str, "Special Setting 2 %%x%d|", TH_BUT_SETTING2); strcat(cp, str); sprintf(str, "Number Input %%x%d|", TH_BUT_NUM); strcat(cp, str); sprintf(str, "Text Input %%x%d|", TH_BUT_TEXTFIELD); strcat(cp, str); + sprintf(str, "Text Input Highlight %%x%d|", TH_BUT_TEXTFIELD_HI); strcat(cp, str); sprintf(str, "Popup %%x%d|", TH_BUT_POPUP); strcat(cp, str); sprintf(str, "Text %%x%d|", TH_BUT_TEXT); strcat(cp, str); sprintf(str, "Text Highlight %%x%d|", TH_BUT_TEXT_HI); strcat(cp, str); |