Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Aayush
purr-data
Commits
a2ad0b55
Commit
a2ad0b55
authored
Jan 08, 2016
by
Jonathan Wilkes
Browse files
allow gatom to have an "activated" text color
parent
1d9b01aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
pd/nw/css/default.css
View file @
a2ad0b55
...
...
@@ -264,6 +264,11 @@ text {
fill
:
blue
;
}
/* gatom "activated" text (i.e., when it has the keyboard focus) */
.atom.activated
text
{
fill
:
red
;
}
/* test of xlet hover animation... this should
probably use the web animation API instead. That
way the animation won't get cut off when you
...
...
pd/nw/pdgui.js
View file @
a2ad0b55
...
...
@@ -3193,6 +3193,16 @@ function gui_gatom_dialog(did, attr_array) {
attr_array_to_object
(
attr_array
));
}
function
gui_gatom_activate
(
cid
,
tag
,
state
)
{
var
g
=
get_gobj
(
cid
,
tag
);
if
(
state
!==
0
)
{
g
.
classList
.
add
(
"
activated
"
);
}
else
{
g
.
classList
.
remove
(
"
activated
"
);
}
post
(
"
activating gatom: cid is
"
+
cid
+
"
and tag is
"
+
tag
+
"
and t is
"
+
t
);
}
function
gui_iemgui_dialog
(
did
,
attr_array
)
{
//for (var i = 0; i < attr_array.length; i++) {
// attr_array[i] = '"' + attr_array[i] + '"';
...
...
pd/src/g_text.c
View file @
a2ad0b55
...
...
@@ -878,6 +878,10 @@ static void gatom_retext(t_gatom *x, int senditup, int recolor)
{
//sys_vgui(".x%lx.c itemconfigure %s -fill %s\n", canvas,
// rtext_gettag(y), "$pd_colors(text)");
gui_vmess
(
"gui_gatom_activate"
,
"xsi"
,
canvas
,
rtext_gettag
(
y
),
0
);
}
binbuf_clear
(
x
->
a_text
.
te_binbuf
);
binbuf_add
(
x
->
a_text
.
te_binbuf
,
1
,
&
x
->
a_atom
);
...
...
@@ -1818,6 +1822,10 @@ static int text_click(t_gobj *z, struct _glist *glist,
/* Change the gatom blue when it's clicked? Need to test... */
sys_vgui
(
".x%lx.c itemconfigure %s -fill %s
\n
"
,
canvas
,
rtext_gettag
(
y
),
"$pd_colors(selection)"
);
gui_vmess
(
"gui_gatom_activate"
,
"xsi"
,
canvas
,
rtext_gettag
(
y
),
1
);
gatom_click
((
t_gatom
*
)
x
,
(
t_floatarg
)
xpix
,
(
t_floatarg
)
ypix
,
(
t_floatarg
)
shift
,
(
t_floatarg
)
0
,
(
t_floatarg
)
alt
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment