Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
f697eb37
Commit
f697eb37
authored
10 years ago
by
Cinder
Browse files
Options
Downloads
Patches
Plain Diff
Update syntax coloring in the preview script on the fly.
parent
5850397c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llfloaterscriptedprefs.cpp
+7
-4
7 additions, 4 deletions
indra/newview/llfloaterscriptedprefs.cpp
indra/newview/llfloaterscriptedprefs.h
+3
-0
3 additions, 0 deletions
indra/newview/llfloaterscriptedprefs.h
with
10 additions
and
4 deletions
indra/newview/llfloaterscriptedprefs.cpp
+
7
−
4
View file @
f697eb37
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
LLFloaterScriptEdPrefs
::
LLFloaterScriptEdPrefs
(
const
LLSD
&
key
)
LLFloaterScriptEdPrefs
::
LLFloaterScriptEdPrefs
(
const
LLSD
&
key
)
:
LLFloater
(
key
)
:
LLFloater
(
key
)
,
mEditor
(
NULL
)
{
{
mCommitCallbackRegistrar
.
add
(
"ScriptPref.applyUIColor"
,
boost
::
bind
(
&
LLFloaterScriptEdPrefs
::
applyUIColor
,
this
,
_1
,
_2
));
mCommitCallbackRegistrar
.
add
(
"ScriptPref.applyUIColor"
,
boost
::
bind
(
&
LLFloaterScriptEdPrefs
::
applyUIColor
,
this
,
_1
,
_2
));
mCommitCallbackRegistrar
.
add
(
"ScriptPref.getUIColor"
,
boost
::
bind
(
&
LLFloaterScriptEdPrefs
::
getUIColor
,
this
,
_1
,
_2
));
mCommitCallbackRegistrar
.
add
(
"ScriptPref.getUIColor"
,
boost
::
bind
(
&
LLFloaterScriptEdPrefs
::
getUIColor
,
this
,
_1
,
_2
));
...
@@ -41,11 +42,11 @@ LLFloaterScriptEdPrefs::LLFloaterScriptEdPrefs(const LLSD& key)
...
@@ -41,11 +42,11 @@ LLFloaterScriptEdPrefs::LLFloaterScriptEdPrefs(const LLSD& key)
BOOL
LLFloaterScriptEdPrefs
::
postBuild
()
BOOL
LLFloaterScriptEdPrefs
::
postBuild
()
{
{
LLScriptEditor
*
e
ditor
=
getChild
<
LLScriptEditor
>
(
"Script Preview"
);
mE
ditor
=
getChild
<
LLScriptEditor
>
(
"Script Preview"
);
if
(
e
ditor
)
if
(
mE
ditor
)
{
{
e
ditor
->
initKeywords
();
mE
ditor
->
initKeywords
();
e
ditor
->
loadKeywords
();
mE
ditor
->
loadKeywords
();
}
}
return
TRUE
;
return
TRUE
;
}
}
...
@@ -54,6 +55,8 @@ void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
...
@@ -54,6 +55,8 @@ void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
{
{
LLUIColorTable
::
instance
().
setColor
(
param
.
asString
(),
LLColor4
(
ctrl
->
getValue
()));
LLUIColorTable
::
instance
().
setColor
(
param
.
asString
(),
LLColor4
(
ctrl
->
getValue
()));
// *TODO: Signal all active script editors to change colors on the fly.
// *TODO: Signal all active script editors to change colors on the fly.
mEditor
->
initKeywords
();
mEditor
->
loadKeywords
();
}
}
void
LLFloaterScriptEdPrefs
::
getUIColor
(
LLUICtrl
*
ctrl
,
const
LLSD
&
param
)
void
LLFloaterScriptEdPrefs
::
getUIColor
(
LLUICtrl
*
ctrl
,
const
LLSD
&
param
)
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llfloaterscriptedprefs.h
+
3
−
0
View file @
f697eb37
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include
"llfloater.h"
#include
"llfloater.h"
class
LLScriptEditor
;
class
LLUICtrl
;
class
LLUICtrl
;
class
LLFloaterScriptEdPrefs
:
public
LLFloater
class
LLFloaterScriptEdPrefs
:
public
LLFloater
...
@@ -43,6 +44,8 @@ class LLFloaterScriptEdPrefs : public LLFloater
...
@@ -43,6 +44,8 @@ class LLFloaterScriptEdPrefs : public LLFloater
void
applyUIColor
(
LLUICtrl
*
ctrl
,
const
LLSD
&
param
);
void
applyUIColor
(
LLUICtrl
*
ctrl
,
const
LLSD
&
param
);
void
getUIColor
(
LLUICtrl
*
ctrl
,
const
LLSD
&
param
);
void
getUIColor
(
LLUICtrl
*
ctrl
,
const
LLSD
&
param
);
LLScriptEditor
*
mEditor
;
};
};
#endif // LL_FLOATERSCRIPTEDPREFS_H
#endif // LL_FLOATERSCRIPTEDPREFS_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment