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
03ff3dc5
Commit
03ff3dc5
authored
15 years ago
by
James Cook
Browse files
Options
Downloads
Patches
Plain Diff
Added hand-cursor to clickable text boxes, fixed hover_color warnings for login screen.
Reviewed with Richard.
parent
382174ce
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llui/lltextbox.cpp
+26
-0
26 additions, 0 deletions
indra/llui/lltextbox.cpp
indra/llui/lltextbox.h
+8
-13
8 additions, 13 deletions
indra/llui/lltextbox.h
indra/newview/skins/default/xui/en/panel_login.xml
+0
-33
0 additions, 33 deletions
indra/newview/skins/default/xui/en/panel_login.xml
with
34 additions
and
46 deletions
indra/llui/lltextbox.cpp
+
26
−
0
View file @
03ff3dc5
...
...
@@ -45,6 +45,9 @@ LLTextBox::LLTextBox(const LLTextBox::Params& p)
mClickedCallback
(
NULL
)
{}
LLTextBox
::~
LLTextBox
()
{}
BOOL
LLTextBox
::
handleMouseDown
(
S32
x
,
S32
y
,
MASK
mask
)
{
BOOL
handled
=
LLTextBase
::
handleMouseDown
(
x
,
y
,
mask
);
...
...
@@ -97,6 +100,18 @@ BOOL LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask)
return
handled
;
}
BOOL
LLTextBox
::
handleHover
(
S32
x
,
S32
y
,
MASK
mask
)
{
BOOL
handled
=
LLTextBase
::
handleHover
(
x
,
y
,
mask
);
if
(
!
handled
&&
mClickedCallback
)
{
// Clickable text boxes change the cursor to a hand
LLUI
::
getWindow
()
->
setCursor
(
UI_CURSOR_HAND
);
return
TRUE
;
}
return
handled
;
}
void
LLTextBox
::
setText
(
const
LLStringExplicit
&
text
)
{
// does string argument insertion
...
...
@@ -105,6 +120,11 @@ void LLTextBox::setText(const LLStringExplicit& text)
LLTextBase
::
setText
(
mText
.
getString
());
}
void
LLTextBox
::
setClickedCallback
(
boost
::
function
<
void
(
void
*
)
>
cb
,
void
*
userdata
/*= NULL */
)
{
mClickedCallback
=
boost
::
bind
(
cb
,
userdata
);
}
S32
LLTextBox
::
getTextPixelWidth
()
{
return
getContentsRect
().
getWidth
();
...
...
@@ -115,6 +135,12 @@ S32 LLTextBox::getTextPixelHeight()
return
getContentsRect
().
getHeight
();
}
LLSD
LLTextBox
::
getValue
()
const
{
return
LLSD
(
getText
());
}
BOOL
LLTextBox
::
setTextArg
(
const
std
::
string
&
key
,
const
LLStringExplicit
&
text
)
{
mText
.
setArg
(
key
,
text
);
...
...
This diff is collapsed.
Click to expand it.
indra/llui/lltextbox.h
+
8
−
13
View file @
03ff3dc5
...
...
@@ -33,8 +33,6 @@
#ifndef LL_LLTEXTBOX_H
#define LL_LLTEXTBOX_H
#include
"v4color.h"
#include
"llstring.h"
#include
"lluistring.h"
#include
"lltextbase.h"
...
...
@@ -54,28 +52,25 @@ class LLTextBox :
friend
class
LLUICtrlFactory
;
public
:
virtual
~
LLTextBox
()
{}
virtual
~
LLTextBox
()
;
virtual
BOOL
handleMouseDown
(
S32
x
,
S32
y
,
MASK
mask
);
virtual
BOOL
handleMouseUp
(
S32
x
,
S32
y
,
MASK
mask
);
/*virtual*/
BOOL
handleMouseDown
(
S32
x
,
S32
y
,
MASK
mask
);
/*virtual*/
BOOL
handleMouseUp
(
S32
x
,
S32
y
,
MASK
mask
);
/*virtual*/
BOOL
handleHover
(
S32
x
,
S32
y
,
MASK
mask
);
/*virtual*/
void
setText
(
const
LLStringExplicit
&
text
);
/*virtual*/
void
setText
(
const
LLStringExplicit
&
text
);
void
setRightAlign
()
{
mHAlign
=
LLFontGL
::
RIGHT
;
}
void
setHAlign
(
LLFontGL
::
HAlign
align
)
{
mHAlign
=
align
;
}
void
setClickedCallback
(
boost
::
function
<
void
(
void
*
)
>
cb
,
void
*
userdata
=
NULL
){
mClickedCallback
=
boost
::
bind
(
cb
,
userdata
);
}
// mouse down and up within button
//const LLFontGL* getFont() const { return mDefaultFont; }
//void setFont(const LLFontGL* font) { mDefaultFont = font; }
void
setClickedCallback
(
boost
::
function
<
void
(
void
*
)
>
cb
,
void
*
userdata
=
NULL
);
void
reshapeToFitText
();
//const std::string& getText() const { return mText.getString(); }
S32
getTextPixelWidth
();
S32
getTextPixelHeight
();
virtual
LLSD
getValue
()
const
{
return
LLSD
(
getText
());
}
virtual
BOOL
setTextArg
(
const
std
::
string
&
key
,
const
LLStringExplicit
&
text
);
/*
virtual
*/
LLSD
getValue
()
const
;
/*
virtual
*/
BOOL
setTextArg
(
const
std
::
string
&
key
,
const
LLStringExplicit
&
text
);
protected
:
void
onUrlLabelUpdated
(
const
std
::
string
&
url
,
const
std
::
string
&
label
);
...
...
This diff is collapsed.
Click to expand it.
indra/newview/skins/default/xui/en/panel_login.xml
+
0
−
33
View file @
03ff3dc5
...
...
@@ -23,19 +23,15 @@
border_visible=
"false"
bottom=
"600"
follows=
"all"
layout=
"topleft"
left=
"0"
name=
"login_html"
right=
"-1"
start_url=
""
top=
"1"
/>
<text
type=
"string"
length=
"1"
follows=
"left|bottom"
font=
"SansSerif"
height=
"16"
layout=
"topleft"
left=
"32"
name=
"first_name_text"
top=
"530"
...
...
@@ -46,7 +42,6 @@
follows=
"left|bottom"
handle_edit_keys_directly=
"true"
height=
"20"
layout=
"topleft"
left_delta=
"0"
max_length=
"31"
name=
"first_name_edit"
...
...
@@ -55,12 +50,9 @@
top_pad=
"2"
width=
"120"
/>
<text
type=
"string"
length=
"1"
follows=
"left|bottom"
font=
"SansSerif"
height=
"16"
layout=
"topleft"
left=
"164"
name=
"last_name_text"
top=
"530"
...
...
@@ -72,7 +64,6 @@
font=
"SansSerif"
handle_edit_keys_directly=
"true"
height=
"20"
layout=
"topleft"
left_delta=
"0"
max_length=
"31"
name=
"last_name_edit"
...
...
@@ -81,12 +72,9 @@
top_pad=
"2"
width=
"120"
/>
<text
type=
"string"
length=
"1"
follows=
"left|bottom"
font=
"SansSerif"
height=
"16"
layout=
"topleft"
left=
"296"
name=
"password_text"
top=
"530"
...
...
@@ -98,7 +86,6 @@
font=
"SansSerif"
handle_edit_keys_directly=
"true"
height=
"20"
layout=
"topleft"
left_delta=
"0"
max_length=
"16"
name=
"password_edit"
...
...
@@ -124,12 +111,9 @@
name=
"server_combo"
width=
"100"
/>
<text
type=
"string"
length=
"1"
follows=
"left|bottom"
font=
"SansSerif"
height=
"16"
layout=
"topleft"
left=
"32"
name=
"start_location_text"
top=
"576"
...
...
@@ -141,7 +125,6 @@
control_name=
"LoginLocation"
follows=
"left|bottom"
height=
"23"
layout=
"topleft"
left_pad=
"0"
max_chars=
"128"
name=
"start_location_combo"
...
...
@@ -165,20 +148,14 @@
follows=
"left|bottom"
height=
"16"
label=
"Remember password"
layout=
"topleft"
left_pad=
"10"
name=
"remember_check"
top_delta=
"3"
width=
"138"
/>
<text
type=
"string"
length=
"1"
follows=
"right|bottom"
halign=
"right"
height=
"16"
hover=
"true"
hover_color=
"0.2 0.45 0.72 1"
layout=
"topleft"
left=
"-210"
name=
"create_new_account_text"
top=
"539"
...
...
@@ -186,14 +163,9 @@
Create a new account
</text>
<text
type=
"string"
length=
"1"
follows=
"right|bottom"
halign=
"right"
height=
"16"
hover=
"true"
hover_color=
"0.2 0.45 0.72 1"
layout=
"topleft"
left_delta=
"0"
name=
"forgot_password_text"
top_pad=
"4"
...
...
@@ -201,14 +173,9 @@
Forgot your name or password?
</text>
<text
type=
"string"
length=
"1"
follows=
"right|bottom"
halign=
"right"
height=
"16"
hover=
"true"
hover_color=
"0.2 0.45 0.72 1"
layout=
"topleft"
left=
"-310"
name=
"channel_text"
top=
"579"
...
...
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